Go Back  FlyerTalk Forums > Travel&Dining > TravelBuzz
Reload this Page >

Introducing the Miles Toolbox! (requires MATLAB)

Introducing the Miles Toolbox! (requires MATLAB)

Old May 5, 2008, 8:23 am
  #1  
Original Poster
 
Join Date: Sep 2005
Location: Now in SLC
Programs: DL GM 1MM, MR LT Titanium
Posts: 4,086
Introducing the Miles Toolbox! (requires MATLAB)

Hey all! I've written some utilities for the MATLAB programming language that can make mileage calculations easier. For example, If you're trying to get from BOS-DAY and want to see how many miles you'll get if you connect through CVG, DCA, or LGA:

Code:
>> cxmiles BOS DAY CVG DCA LGA
Calculating LGA.....
   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
You can also include the 500 miles per segment rule that most airlines have:
Code:
>> cxmiles BOS DAY CVG DCA LGA 500
Calculating LGA.....
   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
And finally, you can calculate the mileage based on a particular airline's U.S. hubs. If you do this, then "ridiculous" routings are thrown out (e.g. BOS-SLC-DAY):

Code:
>> cxmiles BOS DAY 500 DL
Calculating LAX.....
   Route     Leg 1  Leg 2  Total   R/T
  BOS-DAY                  709    1418 
BOS-JFK-DAY  500    554    1054   2108 
BOS-CVG-DAY  752    500    1252   2504 
BOS-ATL-DAY  946    500    1446   2892
There's also a function to get mileage on a particular routing:

Code:
>> getmiles BOS ATL SLC SMF
BOS-ATL: 946
ATL-SLC: 1590
SLC-SMF: 532
Total: 3068
And there's a function that displays routings as downloaded from FlightAware. For more details, see:

http://www.mathworks.com/matlabcentr...bjectType=file

Click on the "Welcome to the Miles Toolbox" link just below the description to see a more thorough introduction, and please feel free to send me feedback!

--LoganFlyer
LoganFlyer is offline  
Old Jun 16, 2008, 11:19 am
  #2  
 
Join Date: May 2008
Location: SFO
Posts: 851
great idea! matlab is perfect for this sort of thing, except that it takes forever to load. i've downloaded your toolbox and will post feedback if anything comes to mind.
decibel08 is offline  
Old Jun 16, 2008, 1:06 pm
  #3  
 
Join Date: May 2000
Location: Home: Arlington, VA; Home airports: IAD/DCA/BWI
Programs: Active: AA, UA, DL
Posts: 4,093
Awesome. Have you thought of porting it to an executable or porting it to a Java or C# executable?

- Pat
Wiirachay is offline  
Old Jun 26, 2008, 5:44 pm
  #4  
Original Poster
 
Join Date: Sep 2005
Location: Now in SLC
Programs: DL GM 1MM, MR LT Titanium
Posts: 4,086
Thank you both! I have thought about porting it, but an executable created from MATLAB requires either MATLAB or the MCR (MATLAB Component Runtime) to run. The latter is free, but 236 MB, so I can't easily include it. But I'll see what I can do.
LoganFlyer is offline  

Thread Tools
Search this Thread

Contact Us - Manage Preferences - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.