News:

Buying something from Amazon? Please consider using my affiliate links - Amazon.com or Amazon.co.uk - You get your stuff, Plan-G gets a little boost :)   

Main Menu

Suggestion: load a trail via the 'File Open' dialog

Started by B21, October 05, 2011, 06:17:02 PM

Previous topic - Next topic

B21

Great software - thanks.

Some of us create flight 'trails' both within and without Plan-G. It'd be nice to use Plan-G to display them. There are two slight issues: (1) Plan-G uses a 'folder' icon on the Trail Analysis side menu to load a trail, which is honestly IMHO a very strange place to have it (vs. the File Load menu) unless you totally get how Plan-G trails are 'different' from trails you load in any other similar program and (2) the trail format being unique to Plan-G obviously limits the utility of that function.

re (2) I could program gpsbabel to recognise yet another 'trail' format, but it's a shame that's necessary and no-one else seems to have done it, and we'd still need to circulate around that converter style for anyone to use it. There are quite a few other formats that are almost identical to Plan-G trail files (my suggestion would be IGC, as that's the only aviation-related standard of any heritage).

thanks again -- B21

tim arnot


Tim. @TimArnot

B21

thanks Tim - kind of you to consider it.

If you use the IGC file format, you'll find all the existing plan-g trail record fields can be shoehorned into the existing IGC tracklog 'B' record one-for-one. The subtlety will be the IGC default B record is time,lat,long,alt and I assume you'd want to add speed, heading and height AGL - the IGC format has a method of defining appended additional fields via a header 'I' record, where you'd append 'GSP' for 'groundspeed',  'HDT' for 'heading true', and probably repurpose 'TEN' (total energy altitude) for your use as alt AGL.  The file spec is here http://carrier.csi.cam.ac.uk/forsterlewis/soaring/igc_file_format/index.html

tim arnot


Tim. @TimArnot

B21

sorry to lengthen this thread, which I know is just a maybe, but as a bit of help that you can discard guilt-free, here's a Trail* and IGC version of the same file:

Title=Mooney Bravo
Type=Mooney
Model=M20T
ID=SAM292
Airline=
Flight=
Plan= (LSZL-LSZA)
22:04:39,46.1647588519841,8.8744292285602,654,4,77,0
22:04:43,46.1647683258938,8.87449371225494,654,4,77,7
22:04:47,46.1648161050525,8.87481566413328,654,4,78,19
22:04:52,46.1649215326648,8.87564770623158,654,4,78,38
22:04:56,46.1650844753151,8.87682091818211,654,4,77,53
22:05:01,46.1653765777504,8.87882923037018,654,4,78,71
22:05:05,46.1656745462594,8.88099208055504,665,15,77,83
22:05:09,46.1660578493582,8.88353193080254,724,74,75,84
22:05:14,46.1664511673058,8.88585004283501,824,175,75,79
22:05:18,46.1667461845265,8.88781312560532,903,256,77,80
22:05:23,46.1671382773668,8.89046926141607,997,353,75,79
22:05:27,46.1675024116139,8.89271586411786,1006,360,76,92
22:05:32,46.1679117119701,8.89581546911534,1027,378,79,102
22:05:36,46.1682079243516,8.89902799149374,1022,370,82,114
22:05:40,46.1684001410901,8.90214337755123,1026,375,85,123

And IGC:

AXXX Plan-G v2.05 (build 432)
HFDTE250311
HFFXA035
HFPLTPILOTINCHARGE: pilot SAM292
HFCM2CREW2: not recorded
HFGTYGLIDERTYPE:Mooney M20T
HFGIDGLIDERID:SAM292
HFDTM100GPSDATUM: WGS-1984
HFRFWFIRMWAREVERSION: 2.05 (build 432)
HFRHWHARDWAREVERSION: 2011
HFFTYFRTYPE: Plan-G by Tim Arnot
HFGPSGPS:Microsoft Flight Simulator
HFPRSPRESSALTSENSOR: Microsoft Flight Simulator
HFCIDCOMPETITIONID:SAM292
HFCCLCOMPETITIONCLASS:
I043638FXA3943TEN4446HDT4750GSP
L PLAN-G Plan (LSZL-LSZA)
B2204394609886N00852466EA0019900199027000010770000
B2204434609886N00852470EA0019900199027000010770013
B2204474609889N00852489EA0019900199027000010780035
B2204524609895N00852539EA0019900199027000010780070
B2204564609905N00852609EA0019900199027000010770098
B2205014609923N00852730EA0019900199027000010780131
B2205054609940N00852860EA0020200202027000050770154
B2205094609963N00853012EA0022000220027000230750156
B2205144609987N00853151EA0025100251027000530750146
B2205184610005N00853269EA0027500275027000780770148
B2205234610028N00853428EA0030300303027001070750146
B2205274610050N00853563EA0030600306027001100760170
B2205324610075N00853749EA0031200312027001150790189
B2205364610092N00853942EA0031100311027001130820211
B2205404610104N00854129EA0031200312027001140850228

i.e. if you *wrote* an IGC file it would look something like above, and if you *read* an IGC file it would be similar except the 'B' records would be unlikely to have AGL,heading,groundspeed. If you got fancy you'd find the IGC file can actually contain the waypoints of the flightplan (sim_logger for FSX actually stores the flightplan as well as the trackpoints). As with everything IGC, it is trivial to skip e.g. flightplan records in the IGC if you want to ignore them. The *units* of IGC 'B' record fields are specified (meters, kph) as well as the format of lat long  - so these were translated by me from your Trail* format (feet, knots) also.

There *will* be other records in any IGC file you read, i.e. the logger may store wheel-up events or something, but the simple trick is the first couple of letters of every line tells you the record type so *only* read records you're looking for (i.e. mostly B) and skip anything else.