FlyerTalk Forums - View Single Post - I built my own Flying Blue analytics suite… UXP question for the experts
Old Dec 11, 2025 | 4:43 am
  #7  
VikingXNL
50 Countries Visited
All eyes on you!
 
Join Date: May 2025
Location: AMS
Posts: 144
Originally Posted by siw
Nice work!

In your XP Run (last image) which database do you look-up for the city-pair distances? Is it the same database that Flying Blue uses?
Thanks! For the distance calculations, I'm using the Great Circle Distance formula based on airport coordinates (latitude/longitude). This is the standard method that most airline programs use as their baseline.

I've noticed it's not 100% accurate for all routes. Flying Blue seems to have some manual overrides for specific city pairs. For example, AMS-PEK calculates as Long 2 using great circle distance, but Flying Blue actually awards it as Long 3. The difference is about 163 miles. Officially not enough to push it into the next band. My suspicion is that Flying Blue has a lookup table with exceptions for certain routes, possibly based on routes that fall very close to band boundaries

For now, the tool uses pure great circle calculation, which is accurate for 95% of routes. I'm planning to add manual overrides for known exceptions once I've collected enough data points. If anyone has examples of routes where the XP band doesn't match the calculated distance, I'd love to hear about them. It would help build that exception list!
VikingXNL is offline