TLeconte / vdlm2dec

vdl mode 2 SDR decoder
GNU General Public License v2.0
71 stars 23 forks source link

JSON Output - Enhancement #20

Closed acarslogger closed 5 years ago

acarslogger commented 6 years ago

Hi Thierry, As well as the normal acars data, you have included an additional packet in the JSON outputs (-j and -J) containing the destination. For completeness would it be possible to enhance the JSON outputs (-j and -J) to include all aviation related data for all messages e.g. Aircraft ICAO, Ground Station Id, Direction/Uplink/Downlink indicator, Location (Lat & Lon), altitude and destination.

Examples.

[#5 (F:136.975 P:-6.6) 08/02/2018 00:00:13.620 -------------------------------- Response from Aircraft:987654 (airborne) to GroundD:214A77 Frame-S: Nr:1 RR

JSON output would include Date, Time, Channel, Frequency, Aircraft ICAO, Ground Station Id, Direction/Uplink/Downlink indicator.

[#5 (F:136.975 P:-4.7) 08/02/2018 00:01:40.879 -------------------------------- Command from Aircraft:3C66B8 (airborne) to GroundD:10980A Frame-U: XID Connection management: HO|VDA|ESN XID sequencing 0:3 Specific options: GDA:ESN:IHS:BHN:BCN Destination airport EGCC Aircraft Position 51.3 4.0 alt: 36000

JSON output would include Date, Time, Channel, Frequency, Aircraft ICAO, Ground Station Id, Direction/Uplink/Downlink indicator, Latitude, Longitude, Altitude and Destination.

Thanks Stuart

TLeconte commented 6 years ago

done : adding lat/lon/alt Not sure I will add all the other informations in json.

lat/lon/alt are in lots of ACARS messages too. But parsing all the different formats is really a nightmare. pull requests for decoding in label.c are welcome

acarslogger commented 6 years ago

Thanks for the lat, lon and altitude.

In your normal log file every VDL2 message starts with

[#5 (F:136.975 P:-6.6) 08/02/2018 00:00:13.620 -------------------------------- Response from Aircraft:987654 (airborne) to GroundD:214A77

So for completeness I think it would be beneficial to include this data in the JSON outputs. Every VDL2 message would generate a JSON output with Frequency, Date/Time, Aircraft ICAO, Ground Station Id and a Direction/Uplink/Downlink indicator. For VDL2 messages that have additional data (i.e. a message with acars, or a messages with lat, lon alt, destination), this could either be appended to the basic JSON output above, or created as separate JSON outputs. That's my thoughts. It's your application, so you must do whatever is best for the functionality and output that you want the application to provide. Thanks for your efforts in creating and enhancing this application. Stuart

TLeconte commented 5 years ago

Just add -U -E and -G options for more configurable json output

Hopes it's sufficient