jflight.io
Class FlightReaderWriter

java.lang.Object
jflight.io.FlightReaderWriter
- public class FlightReaderWriter
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WPT
private static final int WPT
- waypoint data to write, can be or'ed together
- See Also:
- Constant Field Values
RTE
private static final int RTE
- route data to write, can be or'ed together
- See Also:
- Constant Field Values
TRK
private static final int TRK
- track data to write, can be or'ed together
- See Also:
- Constant Field Values
debug
private int debug
stdOutput
private boolean stdOutput
dbg
private java.awt.TextArea dbg
msg
private java.awt.TextArea msg
trkCont
private jflight.model.TrackContainer trkCont
thermCont
private jflight.model.ThermalContainer thermCont
rteCont
private jflight.model.RteContainer rteCont
wptCont
private jflight.model.WptContainer wptCont
baroCont
private jflight.model.BaroContainer baroCont
FlightReaderWriter
public FlightReaderWriter(java.awt.TextArea dbg,
java.awt.TextArea msg)
printDebug
private void printDebug(java.lang.String str)
- print debug-message
printMessage
private void printMessage(java.lang.String str)
- print message
writeFile
public void writeFile(java.io.DataOutputStream oStr,
int what)
throws java.io.IOException
- Writes the current parameters to a configuration file.
JFlight: Waypoints, tracks and routes
Supports Waypoint+ ascii export format (tracks and waypoints only ).
The data will be stored in Waypoint+ ascii-format.
It has been found out that Waypoint+ (v1.7.17) can read both wpts and trks (and hopefully
other objects too ;-)) from within a single file by detecting the prefix of each object so
this method is chosen. W+ requires files with CR/LF.
Note: W+ doesn't save the wpt symbol and the display representation (symbol only, sym with
name ...). Instead it saves some date- and timeinformations no one needs. Has to be changed
for JFlight.
This is the format
- example for W+:
WP,D,001 ,47.708203,10.694638,01/01/1980,00:00:00,12-MAY-00 13:13
WP,D,002 ,47.709103,10.694638,01/01/1980,00:00:00,12-MAY-00 13:13
TP,D,47.708103,10.694638,05/12/2000,14:10:41,1
TP,D,47.709103,10.694638,05/12/2000,14:11:11,0
- example for JFlight 2:
WP,D,001 ,47.709103,10.694638,12-MAY-00 13:13 ,0,0
TP,D,47.709103,10.694638,47.709103,10.694638,327091594,1
RT,D,1 ,KLEINES_DREIECK,TEG172,GAI200,EDE140,
- example for JFlight 2+ (including height):
TP,D,47.709103,10.694638,327091594,1,1700
readFile
public void readFile(java.io.BufferedReader iStr,
int readMode,
int what,
int trkNum)
throws java.io.IOException
- Reads the current parameters from a configuration file. Terminates if a non-GPS parameter string is read.
- example for W+:
WP,D,001 ,47.708203,10.694638,01/01/1980,00:00:00,12-MAY-00 13:13
WP,D,002 ,47.709103,10.694638,01/01/1980,00:00:00,12-MAY-00 13:13
TP,D,47.708103,10.694638,05/12/2000,14:10:41,1
TP,D,47.709103,10.694638,05/12/2000,14:11:11,0
- example for JFlight 2:
WP,D,001 ,47.709103,10.694638,12-MAY-00 13:13 ,0,0
TP,D,47.709103,10.694638,327091594,1
RT,D,1 ,KLEINES_DREIECK,TEG172,GAI200,EDE140,
- example for JFlight 2+ (including height):
TP,D,47.709103,10.694638,327091594,1,1700
Vario Data:
MD,5,20,2
RD,1720,45
RD,1722,47
RD,1725,45
Note: The waypoint+-format is currently not supported (problem with date-conversion)