Closed HLLF-FAN closed 1 month ago
I think everything's doable, but might require some time :) I'm not familiar with the VirtualRadar, but I quickly checked the specs (https://www.virtualradarserver.co.uk/Documentation/Formats/AircraftList.aspx). It seems that you might have to quite heavily alter the aircrafts.js with all the differently named attributes, but you might need to alter the logic there quite a bit too.
Especially when looking at this section in the specs: _`When a browser first opens the map page it sends a request for an AircraftList.json that contains everything that the site knows about every aircraft being tracked.
For the second and subsequent requests the site tells the server which aircraft identifiers it now knows about. The server uses this information along with the ldv query string value to avoid resending information that has not changed. It uses these values to reduce the bandwidth for the second and subsequent requests.`_
If I understood correctly, when calling the VirtualRadar AircraftList.json, it first lists all the aircraft it tracks. Then you would need to gather a list of IDs of the aircrafts and subsequent calls to AircraftList.json would need to contain attribute with those IDs. I also understood that these calls are preferred to use POST requests instead of GET requests. This logic differs quite a lot with the dump1090-fa aircrafts.json, which always returns all the data it sees. And I also didn't right away understand when / how you should refresh the ID list of the aircrafts. I would suspect that you could just time to time make a call without the ID list and it would re-list all the aircrafts it tracks.
However, I might be wrong here, since I haven't tried this myself and I was just quickly browsing the specs. Unfortunately, I haven't got time to develop this adsbmonitor for couple of years now, so it might be tricky to find time to test this myself.
Anyways, I recommend to try it! It seems to be quite interesting modification.
Okay, thank you
Can I adapt to VirtualRadar's JSON data format