-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
When we have ADS-B CPRs and get for example an MLAT synthetic CPR, the a->cpr variables are not changed because the source is lower quality. Yet the updatePosition function is called and lower quality CPR is used. Fix that by only calling updatePosition if the a->cpr variables got updated.
In case of surface global CPR one CPR can be up to 50 seconds old leading to unlogically short expiration of the resulting position. Instead use accept_data to update position_valid when a new position is dedoced.
pos_reliable is then used to invalidate the positon if the first global CPR to be decoded yielded a bad position. If we have already received multiple global CPRs, a disagreeing global CPR position means the newly decoded position is bad. This new position is discarded while the old position stays valid.
Important for the new global_bad handling logic (pos_reliable).
Aircraft often drop in and out of reception. Being able to do relative CPR and range checks even if no position was decoded for longer than 70 seconds is very useful to reception. Due to the previously pos_reliable counter and the speed check this should even decrease the number of wrong positions displayed while increasing the number of aircraft relative decodes. Especially useful for people with spotty reception or surface positions.
Reverting master, shall we go back to 18527a4 and drop all your commits then? |
Do as you wish with the master branch, it's your decision. I'll actually have one follow-up change to the series, i'll make it an extra commit, will be her in a moment. |
Even a well established position, as in lots of consistent global CPR decodes, can be wrong due to transponder faults for example. In that case 5 independent global CPR decodes will be sufficient to invalidate the established position.
I'd also like to increase the time precision in the JSON file a bit, are you up for that? |
What's the purpose of increased precision? |
I'm doing some position filtering in the web interface itself, and it takes some variability due to rounding errors out of it. |
Oh forgot to mention the webinterface i'm talking about, i'm working on this: https://github.com/wiedehopf/tar1090#tar1090 If you fancy anything, feel free to integrate it. |
I should have mentioned initially, it's only seen, seen_pos and now which i would increase from %.1f to %.2f |
I'll do a separate pull request some other time in regards to the time precision in the JSON, no need to complicate this PR. |
The 20 and the 4 number, which are thrown around in the last patch were from a different mindset when i didn't reset both CPRs on a failed speed check. Actually it probably makes sense to just invalidate the position as soon as a 2nd pair of CPRs fails the speed check. I'll just add that as a new patch for now, if you prefer i can rebase those last two patches into the patch that introduces pos_reliable though. |
So this got messy and i'd like to rebase the PR and will test it for a week. Then i'll make a new PR. Sorry for all the trouble. P.S.: If you want to chat a little more relaxed about the changes, come by the adsbexchange discord: |
So this is now much better tested than before.
And i've identified some pitfalls i didn't sufficiently consider before.
I'd probably recommend just reverting the patches i submitted for the master branch.
While they are not totally broken, it'll make it easier to merge the dev branch :)
Testing especially range set to 0 (infinite) provided some nice corner cases.
Due to the global_cpr_bad handling, the filtering needs to me more conservative.
But in my testing i didn't notice the changes making the filter less effective.
What the changes did do though is reduce the false positive filter hits for landing/departing aircraft and in some other situations.
Note that the first patch will reduce the number of global CPRs if you have MLAT enabled as the MLAT CPRs are correctly discarded as long as the ADS-B CPRs are not stale.
An example of the improvements using ADS-B only data from a receiver with view on SFO:
Left side is after the patches, right side is before, you can clearly see after dropping out of view of the receiver the new position is more quickly acquired when the aircraft start their takeoff run.
Thin lines are the intermittent track normally depicted with dotted lines.
https://imgur.com/a/UAL9TYE
These are the CPR stats compared between the commit making the aircraft_relative CPR stat functional and the final commit.
As you can see the number of aircraft_relative CPR has increased because it is used for aircraft that were out of view longer.