adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
Hi, Is there any means of doing a 'mass' conversion of .flightlog files to .gpx format? Any plans to produce one? Failing that, any chance the format of the .flightlog file could be documented so that I could consider writing one myself?
|
|
|
stevelup
|
|
Group: Moderators
Posts: 593,
Visits: 4.9K
|
Have you had a look at the .flightplan file? It's XML and is pretty much self-explanatory.
|
|
|
adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
stevelup (14/10/2013) Have you had a look at the .flightplan file? It's XML and is pretty much self-explanatory.flightlog, not flightplan  The flightlog file is CSV, and has a few fields that don't seem obvious. The first line contains a comment, with the start date in it. The first column of subsequent lines is presumably a time stamp since this start time, in milliseconds? Then it's GPS position. After that it's less obvious, but presumably ground speed and height are in there, and the last column seems to be vertical speed perhaps? Anyway, would be good to have them documented if possible. Andy
|
|
|
adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
Ok, done some digging. There are 6 fields per line, here's what I've managed to guess at so far: Field 1 - A timestamp (presumably milliseconds since the start of the log as per the comment in the first line) Field 2 - GPS co-ordinates Field 3 - ?? Field 4 - Speed (in knots?) Field 5 - Height in feet Field 6 - ?? Would appreciate some sort of indication that I'm on the right track if possible. Andy
|
|
|
stevelup
|
|
Group: Moderators
Posts: 593,
Visits: 4.9K
|
Field 3 is the heading (a trip from Oaksey to Oaksey started and finished with it reading 23 for me, and the runway is 22) Filed 4 appears to be in kts (my climb out is reading 65-75, cruise 115-120 and approach 55-60 - all of which are correct assuming it was a calm day) Field 5 is definitely in feet (my start and end readings for the above trip are 270 and 272 ft)Field 6 appears to be vertical speed - in that the start of the trip has positive numbers, the end of the trip has negative numbers, and the middle is mostly zero. The null range on this seems sticky - it doesn't report slight deviations, only significant ones. To convert to GPX, all you need are the co-ordinates and altitude - and possibly the timestamp?
|
|
|
adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
Thanks for that Steve, seems to agree with my findings from reading the file. I've found the GPX spec, and also looked at the GPX files that SkyDemon generates, so should be Ok now to proceed with the conversion. My aim will be to produce a file that's near identical to the one SkyDemon generates when it does the export. Would be nice if Tim could just confirm our findings, particularly in terms of units used.
|
|
|
adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
Ok, getting there I think. All looks good, but for some reason my latitude calculations don't quite match up with SkyDemon's, I'm often one or two digits off in the 6th decimal place. I don't think that's significant, but I can't understand why! I've attached 3 files, one .flightlog file which is the source. Then there's a GPX file (the one without ADH in the name) that is the file converted using SkyDemon. Finally another GPX file (with ADH in the name) which is converted using my utility. If you look at the first latitude in the file, in the source file it's: N514241.70 Which is 51 degrees, 42 minutes, 41.7 seconds north. I'm converting this to decimal degrees using: decdeg = deg + mins/60 + secs/3600 and I get 51.711583333333333333333333333333, which I round to 6 decimal places to get 51.711583. However, the measurement in SkyDemon's GPX file is 51.711580. This trend follows throughout the file on the latitude fields, but the longitude fields (converted in exactly the same way) tend to be correct. Anyone offer any suggestions as to what I might be doing wrong?
|
|
|
Tim Dawson
|
|
Group: Forum Members
Posts: 8.1K,
Visits: 9.3K
|
Fields are:
Elapsed time (milliseconds)
Position
Track (degrees true)
Speed (knots)
Altitude (feet)
Vertical Speed (feet/min)
|
|
|
adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
Excellent Tim, thanks for confirming that. Andy
|
|
|
adhawkins
|
|
Group: Forum Members
Posts: 274,
Visits: 2.5K
|
Returning to this after a holiday with another question. The first line of most of my GPX files is something like: #START=20130810122930 This is easily parsed into the start time of the file. However, I've found some old files that don't have this line, but the timestamps within the file still start at zero. SkyDemon know when this flight started if I open it, presumably it's getting this from the timestamp in the filename? This timestamp doesn't assume seconds, so I have to assume they're zero. Is this the correct approach? Andy
|
|
|