allow multi range outlines to be used #303
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a special case for a tar1090 instance that shows the combined output of multiple readsb instances (like in a stage2 instance of the adsb.im feeder image).
This tries once to download a multiOutline.json file and remembers if it exists or if it should use the outline.json file instead. In the update loop it simply checks for a third format where points is an array of arrays. And then loops over that outer array - which in the case of the regular output.json is simply an array with just one entry.
The additional overhead is negligible, the additional feature is really cool (once you have the code to create merged outlines).
something like this can be used to create such a file:
manually download the
/data/outline.json
from multiplereadsb
instances (and rename them...) and start the above python script with the various json files as command line args. It will write out amultiOutline.json
file that removes all "interior" parts of the ranges (this is designed for feeders that have (partially) overlapping ranges -- the script creates the envelope of all those ranges)Now copy this
multiOutline.json
file into/run/readsb
of the instance that has the sharedtar1090
. Refresh your map and you will see the very cool combined outline (this is from five feeders, four of which combined create the lower area, the fifth one creates an outline that is disjoint from the other four...):