SquawkBox 3 User Manual
Home  |   Getting Started  |   Features  |   SDK  |   FAQ  |   Appendix

Flight Plan Files

Flight plan files are saved and loaded by SquawkBox using standard text format. The data is structured just like a Microsoft Windows initialization file (.ini) but has a file extension of SFP. The format of Windows initialization files consists of key-value pairs grouped together in named sections. The beginning of each section is delineated with the section name contained in square brackets. One key-value pair is specified per line, in the form "key=value". The following is an example initialization file.

[Section One]
AnotherKey=A long text string

[Section Two]

[The Last Section]
Something=The other thing

SquawkBox flight plans are encoded in a single section called SBFlightPlan. If other sections are in the file they are ignored by SquawkBox.

The following keys are used to specify the individual items in the flight plan:

Type: The flight type (0 = IFR, 1 = VFR, 2 = DVFR, 3 = SVFR)
Departure: ICAO code of the departure airport
Arrival: ICAO code of the arrival airport
Alternate: ICAO code of the alternate arrival airport
FlightHours: Integer specifying the number of hours of flight duration
FlightMinutes: Integer specifying the number of minutes of flight duration (0-59)
FuelHours: Integer specifying the number of hours of fuel on board
FuelMinutes: Integer specifying the number of minutes of fuel on board (0-59)
Airspeed: Integer specifying cruising airspeed, in knots true
Altitude: Integer specifying cruising altitude, in feet ASL
Route: The flight plan route, limited to 250 characters
Remarks: The pilot's remarks, limited to 100 characters
Heavy: Set to non-zero if the aircraft is in the heavy turbulence category
Suffix: Zero-based integer specifying the selection of the aircraft capabilities dropdown (0-18)
Voice: Voice capabilities (0 = Voice send/receive, 1 = Voice receive only, 2 = Text only)

If any of the items are missing from the flight plan file, those fields will remain unchanged in the dialog when the user loads the file. This is useful when you want to generate flight plan files that only contain certain information. The flight plan file does not contain information on departure time, as that value is set to the current time whenever the user opens the flight plan dialog.

The following is an example SquawkBox flight plan file:

Route=DCT AD W315 WHA W274 AYE DCT

The Win32 API function WritePrivateProfileSection is extremely useful for writing this data to a SquawkBox flight plan file with a single function call. Consult the Win32 SDK documentation for more information on using this function.

Need Help?

Are there parts of this document that are unclear? Do you have questions? For help use the SquawkBox Forum. The forum entitled "SquawkBox Plug-ins" is the best place for these types of questions.

Copyright 2005 Joel M. DeYoung
All Rights Reserved