Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
516 stars 157 forks source link

RadarCape with JSON formatted data #385

Open me2tkt opened 6 years ago

me2tkt commented 6 years ago

The new operating software (Major 2) for the Radarcape supplies a revised JSON formated output. The JSON data provides more data than the deltadb.txt format. It is the only data format which includes the MLAT data provided via the Jetvision MLAT server !

The JSON format of the RadarCape is different from that used by VRS and described here : http://wiki.modesbeast.com/Radarcape:Software_Features#Aircraft_List_JSON_Service and here http://wiki.modesbeast.com/Radarcape:Software_Features_Major2#Output_Filtering

Would it be possible to include this source format as well ?

I can provide you data in the JSON format if required.

Thanks for your great work.

Ysurac commented 6 years ago

Support is added in latest commit. Should work. Else I would need a little extract of json data.

me2tkt commented 6 years ago

Still setting up my new PC, so I havent tested it yet.

This is an example of the JSON data received after accessing http://radarcape/aircraftlist.json [ { "uti": 1516234088, "dat": "2018-01-18 00:08:08.990073765", "tim": "00:08:08.990073765", "hex": "3DF741", "fli": "", "src": "?", "lat": null, "lon": null, "alt": 0, "gda": "A", "spd": null, "trk": null, "vrt": null, "cat": "", "org": "", "dst": "", "opr": "EC45", "typ": "EC45", "reg": "D-HNWR", "dis": null, "dbm": -62, "cou": "Germ", "squ": "4426", "tru": 120, "lla": -631249559 }, { "uti": 1516234089, "dat": "2018-01-18 00:08:09.250328531", "tim": "00:08:09.250328531", "hex": "45B86E", "fli": "SUS9197", "src": "?", "lat": null, "lon": null, "alt": 0, "gda": "A", "spd": null, "trk": null, "vrt": null, "cat": "", "org": "", "dst": "", "opr": "SUS", "typ": "J328", "reg": "OY-NCN", "dis": null, "dbm": -82, "cou": "Denm", "squ": "2361", "tru": 967, "lla": -631249559 }, { "uti": 1516234089, "dat": "2018-01-18 00:08:09.552526187", "tim": "00:08:09.552526187", "hex": "3C5426", "fli": "BCS109", "src": "A", "lat": 52.35367, "lon": 4.05286, "alt": 32950, "gda": "A", "spd": 558, "trk": 94, "vrt": 0, "cat": "A0", "org": "EGNX", "dst": "EDDP", "opr": "BCS", "typ": "A306", "reg": "D-AEAF", "dis": 261.57013, "dbm": -89, "cou": "Germ", "squ": "4723", "tru": 1032, "lla": 0 }, { "uti": 1516234089, "dat": "2018-01-18 00:08:09.703504390", "tim": "00:08:09.703504390", "hex": "405F31", "fli": "DHK119", "src": "A", "lat": 50.60046, "lon": 7.31704, "alt": 35000, "gda": "A", "spd": 480, "trk": 76, "vrt": 64, "cat": "A0", "org": "EBBR", "dst": "EDDP", "opr": "DHK", "typ": "B763", "reg": "G-DHLF", "dis": 100.49458, "dbm": -69, "cou": "U.K.", "squ": "1000", "tru": 1493, "lla": 0 }, { "uti": 1516234089, "dat": "2018-01-18 00:08:09.696468718", "tim": "00:08:09.696468718", "hex": "471A6B", "fli": "TAY134J", "src": "A", "lat": 51.64165, "lon": 7.53235, "alt": 30700, "gda": "A", "spd": 406, "trk": 218, "vrt": -1472, "cat": "A0", "org": "EKBI", "dst": "ESMS", "opr": "FAH", "typ": "B734", "reg": "HA-KAD", "dis": 17.8316, "dbm": -55, "cou": "Hung", "squ": "3512", "tru": 1747, "lla": 0 }, { "uti": 1516234089, "dat": "2018-01-18 00:08:09.663013625", "tim": "00:08:09.663013625", "hex": "4AC8D6", "fli": "BLX732", "src": "A", "lat": 53.7548, "lon": 6.31544, "alt": 36000, "gda": "A", "spd": 427, "trk": 35, "vrt": -128, "cat": "A0", "org": "GVBA", "dst": "GCLP", "opr": "BLX", "typ": "B738", "reg": "SE-RFV", "dis": 266.71976, "dbm": -86, "cou": "Swed", "squ": "2360", "tru": 1138, "lla": 0 } ]

Ysurac commented 6 years ago

Thanks, latest commit should work.

me2tkt commented 6 years ago

Seems to be working. Only on Stat page the messages received are shown as 0

Radarcape aircraftlist.json contains aircraft data ("opr", "typ", "reg", "cou") from Planebase (updated directly) and Flight data ("org", "dst") from the flightroute.sqb (updated daily) So the plane and flight data could be used directly from the Radarcape JSON, but I assume that would cause a lot of specific programming.

The "src" field shows if the position data is from MLAT or from the aircraft The value "A" indicates position is from ADSB (Aircraft), "M" indicates it is from MLAT. Could this be shown in the data ?

me2tkt commented 6 years ago

Where does the source_name MLAT appear ? When I click on a MLAT flight on the map the popup window shows the Radarcape. Cant find it on the webpages. Are you saving it to the database only ?

Ysurac commented 6 years ago

For now, the MLAT source name appear only on the flight popup when you click on map. It's not available on webpages because a flight can have many source, and can be detected via MLAT only for some seconds and using SBS else.