This program creates three output files required by AOC to file a flight plan:  a file of turn points, a file of drop locations, and a graphical version of these text files.  The points can be input as latitude/longitude locations or by distance and direction from the center of the tropical cyclone.  In the latter case, the program has the option of accounting for the storm motion during the flight.  The total time of the proposed flight is calculated, with time added for each turn to allow for the added time necessary for that maneuver.  The ground speed of the P-3s are calculated based upon the proposed height of the mission; the ground speeds of the other aircraft are constants.

To run the program, you will need to create an ascii file for each plane with the turn and drop locations for the flight (more on this shortly).   The files must be in the directory in which the script resides and must be names currentX.ftk, where X is either 1, 2, or 3, depending upon the number of planes for the mission.  If only one plane is to be used, neither current2.ftk nor current3.ftk can exist.  [The code can be updated to account for more aircraft.]

The program will print two tables, one listing the turn points, and one with the drop points, with total distance and time to each, and the map.  The tables will be called turnX.txt and dropX.txt, with X having the same meaning as above.

The input file is basically just a sequential list of lats, lons and altitudes.  An example is given below.  On the first line you must specify the aircraft and takeoff time (dd/hhmmZ).  

42 - NOAA P-3
43 - NOAA P-3
49 - NOAA G-IV
50 - AF C-130J
51 - NASA DC-8
52 - GLOBAL HAWK
57 - AF WB-57

You may optionally include a title (like the storm or experiment name).  On subsequent lines, the first character indicates what type of data follow.  

The next line will have the location of the storm or target and its expected motion vector.

H Lat Lon Dir Spd

Follow the "H" by the lat and lon in decimal degrees at the time on the previous line (with north and west positive), then a motion vector (toward decimal degrees and speed in kt).  So the first two lines of the input file might look like this:

49 07/1800Z Genesis
H 18.5 82.5 270 12

The next line specifies the takeoff location.  This can either be a lat and lon (deg N,W), or a city name (all CAPS) from the following list:

MACDILL         
OPA LOCKA 
TAMIAMI       
MIAMI  
FT LAUDERDALE
SAN JUAN          
ST CROIX
BARBADOS
GRAND CAYMAN          
BERMUDA
BOSTON
PROVIDENCE       
ANDREWS          
CHARLESTON       
SAVANNAH
JACKSONVILLE
NEW ORLEANS
CORPUS CHRISTI
KEESLER
HOMESTEAD
ROBINS
ELLINGTON
CURACAO          
HONOLULU
ANCHORAGE
EDWARDS
WALLOPS
ANCHORAGE

(more can be added by request/adaptive/Flight planning/flight_tracks/tkmap/ftk.png).        

What follows will be a sequential list of turn and drop points and altitudes, one on each line.  The first character in each line indicates the type of point.  Turn points (with no drops) are indicated by a "T".   A blank in the first character (the default) means that the point is both a turn and a drop point.  The location is specified by lat and lon.

You may also specify locations relative to the storm location (the "H"  line in the file).  This is done by specifying the storm-relative radius (nm) and azimuth (deg from N).  The following example places sondes at 180, 135, 90, 60, and 30 nm from the center on the 330 degree azimuth, and then another sonde at the center, all at 8000 feet altitude:

S 180 330 8000
S 135 330 8000
S 90 330 8000
S 60 330 8000
S 30 330 8000
S 0 0 8000

The last line in the file indicates the recovery site.  It must begin with a "Z".  The same list of cities can be used, or specify the site by lat and lon.  A complete sample file follows:

49 07/1800Z Genesis
H 18.5 82.5 270 15
A OPA LOCKA
  24 83.5 20000
  23 85.5 10000
  21 85.5 10000
S 180 330 5000
S 135 330 5000
S 90 330 5000
S 60 330 5000
S 30 330 5000
S 0 0 5000
S 30 150 5000
S 60 150 5000
S 90 150 5000
S 135 150 5000
S 180 150 5000
S 180 90 5000
S 135 90 5000
S 90 90 5000
S 60 90 5000
S 30 90 5000
S 0 0 5000
S 30 270 5000
S 60 270 5000
S 90 270 5000
S 135 270 5000
S 180 270 5000
S 180 210 5000
S 135 210 5000
S 90 210 5000
S 60 210 5000
S 30 210 5000
S 0 0 5000
S 30 30 5000
S 60 30 5000
S 90 30 5000
S 135 30 5000
S 180 30 5000
  19 77 10000
  19 74.5 10000
  21 73.5 10000
  23 73.5 10000
  24 77 10000
Z OPA LOCKA

Once the files are complete, type "tkmap.sh."  This will create the output files and the map.  It should take just a couple of seconds.  The output files will be ftk.gif (graphics) and turnsX.txt and dropsX.txt, where N is the number from currentX.ftk.