Last edit by: Adam Smith
If you have general questions about how to earn SQM/SQS/SQD, please see the status qualification thread.
If you have received an incorrect amount of SQx/points, please see the thread on missing/incorrect flight activity.
Calculator for SQM, SQD, and Aeroplan points
SQM/SQD Cowculator and its source code
canadiancow's TODO list:
Adam Smith's TODO list:
If you have received an incorrect amount of SQx/points, please see the thread on missing/incorrect flight activity.
Calculator for SQM, SQD, and Aeroplan points
SQM/SQD Cowculator and its source code
canadiancow's TODO list:
- SAS Go Light fares
- Basic economy on any airline other than AC (is it just need a fare basis that ends in GT?)
- Ineligible codeshares, like EY-marketed, EY-operated, AC-ticketed
Adam Smith's TODO list:
- Add earning for VA
- Check earning rates for AC basic economy
Calculator for SQM, Aeroplan miles, & SQD
#241
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
I've updated the spreadsheet with the new Etihad partnership. Until the cowculator is fully functional, I'll continue to keep it updated.
I've also added the cowculator to the wiki.
I've also added the cowculator to the wiki.
#242
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
#243
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
#244
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
It's always referred to https://flyertalk.canadiancow.com/eyw/
I mean I don't really care. Honestly we can just call this the cowtool. And that. And everything else.
I mean I don't really care. Honestly we can just call this the cowtool. And that. And everything else.
#245
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
It's always referred to https://flyertalk.canadiancow.com/eyw/
I mean I don't really care. Honestly we can just call this the cowtool. And that. And everything else.
#246
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
EY flights must be ticketed by EY or ticketed and marketed by AC to be eligible.
Is there any such restriction for CX?
Edit:
Also, the cowculator has been updated. It now shows Aeroplan miles, and handles partners that award Aeroplan but not AQM.
Still missing:
My goal is to open-source this cowculator, but I need to decouple it from the cowtool first, and clean it up a bit so that people can contribute AQM% rules and city distances without having to learn a programming language.
Is there any such restriction for CX?
Edit:
Also, the cowculator has been updated. It now shows Aeroplan miles, and handles partners that award Aeroplan but not AQM.
Still missing:
- It does not let you specify whether you have Altitude status, so assumes you get the 250 mile minimum
- It does not let you specify whether you selected bonus Aeroplan miles, so assumes 0%
- If you happen to have an EY-marketed, AC-ticketed flight, it's not eligible, but there's no way to specify that at all right now, so it will show up as earning Aeroplan miles
- For SA, Aeroplan says "Within South Africa is defined as flights btwn Johannesburg, Cape Town, Durban, East London and Port Elizabeth." I am treating that as "domestic", but I don't know if there are exceptions that I may not be catching (the only other chart is "international", so I assume it's safe)
- For TP, I am only special-casing LIS-OPO and OPO-LIS. Aeroplan is a little confusing here.
- I am not handling SAS Go Light fares
- I am almost certainly not handling basic economy on any airline other than AC (do I just need a fare basis that ends in GT?)
My goal is to open-source this cowculator, but I need to decouple it from the cowtool first, and clean it up a bit so that people can contribute AQM% rules and city distances without having to learn a programming language.
Last edited by canadiancow; Jun 4, 2020 at 2:06 am
#247
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
Also, the cowculator has been updated.
Things I'm unsure about and could use input on interpreting Aeroplan's rules:
- For SA, Aeroplan says "Within South Africa is defined as flights btwn Johannesburg, Cape Town, Durban, East London and Port Elizabeth." I am treating that as "domestic", but I don't know if there are exceptions that I may not be catching (the only other chart is "international", so I assume it's safe)
At least that's how it was when I checked this out after they first made that change to SA Express.
- For TP, I am only special-casing LIS-OPO and OPO-LIS. Aeroplan is a little confusing here.
Things I'm not even sure how to detect.
- I am not handling SAS Go Light fares
- I am almost certainly not handling basic economy on any airline other than AC (do I just need a fare basis that ends in GT?)
That's why I left the override column. Have a Go Light U fare on SK, and the calculator says you'll earn 50%? Just override it to 0%. VA flight that should earn miles, but calculator says 0%? Override it and put 100% or whatever. Back when there were a lot more of those exceptions, I had text flags that would pop up and warn that there might be an issue that might require an override, but I think I eliminated that when I did the big update (with big assistance from Bohemian1 ) a number of months back.
Could that be an easier way for you to resolve some of these things? Add an override option and maybe a text flag? If someone selects SK and it's a fare class that may be Go Light, pop up a thing saying "Note that SK Go Light fares earn no miles. If you purchased a Go Light fare, override the calculated earning rate with 0%.", or something like that? It might save you doing a lot of coding just to handle a few esoteric cases.
My goal is to open-source this cowculator, but I need to decouple it from the cowtool first, and clean it up a bit so that people can contribute AQM% rules and city distances without having to learn a programming language.
#248
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
Okay I fixed the things you clarified. I moved my list of missing features the wiki so I don't have to keep posting updates.
For an override column, I suppose the easiest (from the user's perspective) is to just make the percentages editable, but that means there needs to be client-side logic (i.e. javascript, of which there is currently none) to update the totals. Me not being a front-end web engineer poses some slight challenges here
For an override column, I suppose the easiest (from the user's perspective) is to just make the percentages editable, but that means there needs to be client-side logic (i.e. javascript, of which there is currently none) to update the totals. Me not being a front-end web engineer poses some slight challenges here
#249
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
(Although I'm slightly sad at how you're rendering my m4d Excel sk1llz obsolete )
For an override column, I suppose the easiest (from the user's perspective) is to just make the percentages editable, but that means there needs to be client-side logic (i.e. javascript, of which there is currently none) to update the totals. Me not being a front-end web engineer poses some slight challenges here
#250
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
Could you just add the ability to type in an override after the fare class/brand? Like, could you type in "SK,CPH,ARN,M,0%" to override the default calculated percentage? Or maybe it needs a second comma to effectively leave the fare brand blank, I don't know how the code works. Or use a semicolon to separate any overrides. Or slash. I don't know. I'm not a programmer, just a simple finance guy.
Right now, only the AC calculator looks at the brand, but I could just as easily allow "BA" to be parsed for all airline calculators as a 0% earning flight. Or I could allow specifying a number instead of a brand to force that %.
Are there are fares on any airline that earn Aeroplan at a different rate than AQM (other than things like CX/EY where AQM is 0)?
Or any fares on *A that earn Aeroplan but no AQM?
This is all very easy to do from a pure back-end approach (like if I had full PNR and eticket information already). The only challenge is allowing people to enter data in a way that makes sense to them.
#251
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
Or any fares on *A that earn Aeroplan but no AQM?
The only challenge is allowing people to enter data in a way that makes sense to them.
#252
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
Oops. Fixed.
Bearing in mind I intend to make this simpler, this is UA's calculator right now:
Very simply to specify a different aqmPercent than aeroplanPercent. I just wouldn't want to have to deal with overriding both.
Bearing in mind I intend to make this simpler, this is UA's calculator right now:
Code:
private val uaCalculator: EarningCalculator = { _, _, _, _, _, _, fareClass, _, ticketNumber -> val isAqdEligible = ticketNumber.startsWith("014") when (fareClass) { "J", "C", "D", "Z", "P" -> EarningResult(aqmPercent = 150, minimumMiles = 375, isAqdEligible = isAqdEligible) "O", "A", "R" -> EarningResult(aqmPercent = 125, minimumMiles = 313, isAqdEligible = isAqdEligible) "Y", "B" -> EarningResult(aqmPercent = 125, minimumMiles = 313, isAqdEligible = isAqdEligible) "M", "E", "U", "H", "Q", "V", "W" -> EarningResult(aqmPercent = 100, minimumMiles = 250, isAqdEligible = isAqdEligible) "S", "T", "L", "K", "G" -> EarningResult(aqmPercent = 50, minimumMiles = 125, isAqdEligible = isAqdEligible) "N" -> EarningResult(aqmPercent = 0, aeroplanPercent = 50, minimumMiles = 125, isAqdEligible = false) else -> EarningResult(aqmPercent = 0, minimumMiles = 0, isAqdEligible = false) } }
#253
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
If you're looking to simplify, you could take out the minimum miles, which is just 250 x aqmPercent. When I updated this a while back, I went through all of them to see whether it was needed, and in every case it was just that.
Well, there was one that was Calm Air or First Air or something where it still said 500, but (a) that page was ancient and (b) I think it might be one of the partnerships that recently ended. Either way, I was pretty sure they just never got around to updating it and even if it was 500, it wasn't worth the hassle given all the work for one so esoteric issue.
Well, there was one that was Calm Air or First Air or something where it still said 500, but (a) that page was ancient and (b) I think it might be one of the partnerships that recently ended. Either way, I was pretty sure they just never got around to updating it and even if it was 500, it wasn't worth the hassle given all the work for one so esoteric issue.
#254
A FlyerTalk Posting Legend
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, BA Gold, SQ Silver, Bonvoy Tit LTG, Hyatt Glob, HH Diamond
Posts: 44,359
If you're looking to simplify, you could take out the minimum miles, which is just 250 x aqmPercent. When I updated this a while back, I went through all of them to see whether it was needed, and in every case it was just that.
Well, there was one that was Calm Air or First Air or something where it still said 500, but (a) that page was ancient and (b) I think it might be one of the partnerships that recently ended. Either way, I was pretty sure they just never got around to updating it and even if it was 500, it wasn't worth the hassle given all the work for one so esoteric issue.
Well, there was one that was Calm Air or First Air or something where it still said 500, but (a) that page was ancient and (b) I think it might be one of the partnerships that recently ended. Either way, I was pretty sure they just never got around to updating it and even if it was 500, it wasn't worth the hassle given all the work for one so esoteric issue.
UA is one of the easiest airlines, since it's all based on fare class. LH is harder. AC is currently 90 lines of logic, and I'm still not sure it's entirely right.
#255
Moderator, Air Canada; FlyerTalk Evangelist
Original Poster
Join Date: Feb 2015
Location: YYC
Programs: AC SE MM, FB Plat, WS Plat, BA Silver, DL GM, Marriott Plat, Hilton Gold, Accor Silver
Posts: 16,782
Yeah, there's a lot of stuff like that I can do. I almost did it from the start, but you get into all these airlines with 70%, 110%, etc., and I didn't want to do the research on how they round when I could just put the minimum in. But it's easy to validate after the fact in order to simplify everything.