Problem with displaying tracks for MLAT aircraft.

Is Virtual Radar Server not behaving itself? If so then please report it here.
Post Reply
Martin
Posts: 24
Joined: Wed Jan 14, 2015 9:04 pm
Location: Churchdown, Gloucester

Problem with displaying tracks for MLAT aircraft.

Post by Martin » Wed Apr 27, 2016 7:00 pm

My setup is a Beast receiver connected to Modesmixer2 on a Pi. This RAW data is then passed to Piaware and a stream of MLAT data is gratefully received to a second instance of Modesmixer2 running on the same Pi.

VRS runs on a Windows 10 system and has two receivers defined. One connects to the Modesmixer instance handling the RAW data from the Beast and the other connects to the Modesmixer handling the Piaware MLAT data. This second feed is defined as merge only.

I have a merged feed combining the Beast data and the MLAT data. It is this merged feed that is my default web site receiver. I have seen the following problem both on the current production release and on the preview release.

What happens is that after a variable period of time, generally a few hours, I might be monitoring the track of one of the many local training flights when I notice that the track isn't updating correctly. The affected flights always have their position provided via MLAT. What I actually see on the screen is the aircraft position change to the newly received location but, the track line is always drawn from the new position to a specific older position, not the previous position.

Stopping and restarting VRS (whilst keeping the browser open) fixes this behaviour. The selected aircraft then has a properly updating track that follows the path of the flight.

One other observation that might be relevant. MLAT aircraft seem fairly often to get displayed with the heading wrong. So an aircraft that is flying West turns south, the track follows this turn perfectly but the heading remains at 270 and the icon points West. (It is most odd to see an aircraft flying sideways or even backwards.) Once again, stopping and restarting VRS fixes this behaviour. I mention this because the flights with the track issue I described earlier all have their heading "stuck".

I hope this makes sense, it's easy to see on a screen but not so easy to put into words.

Regards,
Martin

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Problem with displaying tracks for MLAT aircraft.

Post by agw » Thu Apr 28, 2016 12:40 am

Yes... if the heading is wrong then it's going to mess things up for a full track. On a full track I try to reduce the amount of memory required to hold the track by recording the start position and then positions where the heading changed. If the heading doesn't change then I just overwrite the last position and keep overwriting it until the heading changes (i.e. if it's travelling in a straight line then I record the start of the line and keep updating the end of the line, without recording the points that it passed through between the start and the end).

If the aircraft turns but the heading remains constant then you're probably going to get a straight line from the point where the current heading was first seen.

There is code in VRS to calculate the heading from changes in position, but that's only triggered for aircraft that either don't send any heading at all or stop sending headings once they're on the ground. It can be a relatively expensive calculation so if the aircraft sends a heading then I take it as gospel.

If it's possible to switch off the transmission of headings on the MLAT client then that would fix the problem, VRS will just calculate them for you. Otherwise the only workaround would be to either use short tracks or see if there's a fix for the MLAT client's heading calculation. Short tracks can't use the same memory-saving tricks that full tracks use because each position needs to be recorded along with the time that the aircraft was seen at that location, it needs to store all of the positions seen along a straight line, so it's not sensitive to errors in the heading.

By default short tracks are only 30 seconds long but you can increase that in the options (at the expense of increased RAM usage). I can't remember what the upper limit is on short tracks but it might not be very long.

Martin
Posts: 24
Joined: Wed Jan 14, 2015 9:04 pm
Location: Churchdown, Gloucester

Re: Problem with displaying tracks for MLAT aircraft.

Post by Martin » Thu Apr 28, 2016 9:56 am

Hi Andrew,

Thanks for the reply. You might want to look at setting the short trail duration, it behaves most strangely. Firstly, it doesn't object to you typing in a large value, it just doesn't apply the change. Secondly, if you move from 30 seconds to 300 seconds there's no objection but the change isn't made. If you creep up in small steps saving each time, you can get to 300 and pass it. I got bored at 380 seconds as the size of step you can get away with seems to get smaller as the value rises.

Your comments on how headings are handled made me look at the data a little more closely. This morning's flight from IOM to GLO was a good candidate to watch. I monitored it through VRS and the web interface to Modesmixer where the MLAT data from piaware is being sent. Even though the Modesmixer view displayed a changing value for "Track", VRS locked onto a value received around 14 minutes into my observation of the aircraft. It then remained unchanged for 10 minutes whilst Modesmixer's "Track" followed the aircraft manouvring to land. Here I assume "Track" in modesmixer and Heading in VRS are the same field. To me this means either Modesmixer isn't passing the data on to VRS or VRS isn't updating properly. I have some screen captures of this flight's progress. If you would like to see them, I can send them by private mail.

To further investigate this, I could use Wireshark to capture the MLAT data that VRS is getting from Modesmixer but hopefully you might be able to suggest a less labour intensive way to dump the traffic for inspection.

Regards,
Martin

P.S. Without recourse to dumps, I am now sure that Modesmixer is sending headings to VRS. Simply stopping and restarting VRS makes a "frozen" heading start to be updated again.

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Problem with displaying tracks for MLAT aircraft.

Post by agw » Thu Apr 28, 2016 10:47 pm

Martin wrote:You might want to look at setting the short trail duration, it behaves most strangely.
I can't reproduce this - if I type 5000 into the short trail duration field and tab out then it just resets to 1800 (i.e. the maximum). Are you using a Mono VRS for your testing? Mono's implementation of the numeric up-down control is a law unto itself.

The screenshots would help, feel free to email them to me (my address is on the main site).

I have a utility that can record a TCP feed into a compressed SQLite file, if the problem isn't obvious from the screenshots, and you're amenable to recording a copy of the feed, then I can email instructions on how you go about making a recording.

Is this on a merged feed? If so, does the heading come out correctly on the receiver's feed?

dsfh2992
Posts: 156
Joined: Tue Oct 06, 2015 9:57 pm

Re: Problem with displaying tracks for MLAT aircraft.

Post by dsfh2992 » Fri Apr 29, 2016 12:36 am

Martin wrote:
....What I actually see on the screen is the aircraft position change to the newly received location but, the track line is always drawn from the new position to a specific older position, not the previous position.


One other observation that might be relevant. MLAT aircraft seem fairly often to get displayed with the heading wrong. So an aircraft that is flying West turns south, the track follows this turn perfectly but the heading remains at 270 and the icon points West. (It is most odd to see an aircraft flying sideways or even backwards.)....

Regards,
Martin
For what it's worth, I have also observed this behavior. Stopping and restarting VRS, I _think_ might fix it, but I have not directly tested. I am dealing with a huge number of planes and very high CPU usage though....

Martin
Posts: 24
Joined: Wed Jan 14, 2015 9:04 pm
Location: Churchdown, Gloucester

Re: Problem with displaying tracks for MLAT aircraft.

Post by Martin » Fri May 13, 2016 2:09 pm

Andrew,

I have been running the latest Preview version with the fix for my problem of an aircraft's track getting stuck. Watching helicopters doing circuits all below 1000' here at EGBJ, I am pleased to report that now the helicopters all seemed to be pointing roughly the same direction as they are flying despite the MLAT data coming and going due to the low levels of their operations. This is so much better. Thank you very much for the quick fix.

Regards,
Martin

Post Reply