Welcome to the Miles Toolbox!
Contents
Introduction
Some frequent flyers don't care much about their flights or routings; they just want to get from Point A to Point B. But then there are quite a few frequent flyers who do care about the routings. Reasons might include:
- A desire to have status on a particular airline or alliance. Status earns the flyer bonus miles and upgrades to first class.
- Earning more miles to get to that free flight or vacation more quickly.
- Wanting to explore as much of the country as possible.
These are just a few of the reasons. Right now, if a flyer wants information about a particular routing, they can find the information they need, but it is scattered about several places. The goal of the Miles Toolbox is to bring together some of this information in one convienent place. This toolbox has three main functions: one that gets the miles for a particular routing, one that gets miles from point A to point B using different connecting airports, and one that shows routings as they're actually flown.
Requirements
To use this toolbox, you must have MATLAB and an active Internet connection, as the data is downloaded from the Internet in real-time. To use the function that shows routings on a map, the Mapping Toolbox is required.
Credits
Data is downloaded from the following websites:
Getting the miles for a particular routing
GETMILES is a function that gets the miles for a particular routing. Its use is as follows:
getmiles BOS LAX
BOS-LAX: 2611 Total: 2611
That will show the miles from Boston to Los Angeles. If you want to add one or more connecting airports, they are inserted in the order you fly the routing:
getmiles BOS ORD SLC LAX
BOS-ORD: 867 ORD-SLC: 1250 SLC-LAX: 590 Total: 2707
You can also add a minimum number of miles per segment, as most airlines give you 500 miles per segment if the flown amount is less. That gets tacked on to the end, as follows:
getmiles BOS DCA DAY 500
BOS-DCA: 500 DCA-DAY: 500 Total: 1000
Getting the miles for connections
CXMILES gets the miles for given connecting airports between point A and point B. The syntax is to put the origination and destination airports first, then the connecting points:
cxmiles BOS DAY DCA LGA CVG % Going from BOS-DAY via DCA, LGA, or CVG.
Calculating CVG..... Route Leg 1 Leg 2 Total R/T BOS-DAY 709 1418 BOS-LGA-DAY 184 549 733 1466 BOS-DCA-DAY 399 391 790 1580 BOS-CVG-DAY 752 64 816 1632
As you can see, the resulting output shows you the one-way and roundtrip mileage, sorts them in order from least mileage to greatest, and also shows the nonstop mileage. You can specify a minimum number of miles per segment here as well:
cxmiles BOS DAY DCA LGA CVG 500
Calculating CVG..... Route Leg 1 Leg 2 Total R/T BOS-DAY 709 1418 BOS-DCA-DAY 500 500 1000 2000 BOS-LGA-DAY 500 549 1049 2098 BOS-CVG-DAY 752 500 1252 2504
Finally, you can also see all the connecting points for a given airline or alliance. If you do this, then "ridiculous" routings (e.g. flying from Boston to Dayton by connecting through Salt Like City) are thrown away.
cxmiles BOS DAY DL % Will show BOS-DAY via Delta's hubs.
Calculating LAX..... Route Leg 1 Leg 2 Total R/T BOS-DAY 709 1418 BOS-JFK-DAY 187 554 741 1482 BOS-CVG-DAY 752 64 816 1632 BOS-ATL-DAY 946 432 1378 2756
cxmiles BOS DAY 500 *A % Will show BOS-DAY via Star Alliance hubs, with a minimum of 500 miles per segment.
Calculating LAS..... Route Leg 1 Leg 2 Total R/T BOS-DAY 709 1418 BOS-IAD-DAY 500 500 1000 2000 BOS-PHL-DAY 500 500 1000 2000 BOS-DCA-DAY 500 500 1000 2000 BOS-PIT-DAY 500 500 1000 2000 BOS-LGA-DAY 500 549 1049 2098 BOS-CLT-DAY 728 500 1228 2456 BOS-ORD-DAY 867 500 1367 2734
Showing routings
DISPROUTE, the last function, shows you the routing for a given route. This can be used one of two ways. The first is to show the high-level overview of a given routing:
disproute BOS DTW LAX % Boston to L.A. through Detroit set(gcf,'Color',[1 1 1]) % Set background to white
Further, if you know the flight numbers, you can show the actual route for a given day:
close all disproute US1927 US1577 % Boston to Miami through Charlotte set(gcf,'Color',[1 1 1]) % Set background to white
Author
Author: Brian Bagenstose brian.bagenstose@mathworks.com
Please send suggestions and feedback!