Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mostly Webview improvements #25

Closed
wants to merge 14 commits into from
Closed

Conversation

wiedehopf
Copy link

Hello,
please consider pulling this branch.

Short overview of the changes:

  • Add command line switch to change the size and interval of the json history
  • Make addition of positions to the Webview track more consistent
  • With several changes reduce the overall number of positions added to the Webview tracks to improve performance when zooming or panning while "Show all tracks" is enabled.

Changes compared to the first pull request i closed:

  • Avoid renaming head and tail update as i could not come up with truly better names
  • Fix the logic for not appending straight flying aircraft in that the old track is only update when a position is added to the track

Let the user control the json history by adjusting interval and size.
Change the json history to be allocated on the heap instead of the stack
as it's no longer static in size.
Also change Webview history loading timeout to scale with the history
size so it does not time out when using large history sizes.
The color of the plane track is changed according to its altitude.
For every change a new OpenLayer Linestring object is created, even when
the airplane is flying basically level and only the readout changes by
25 ft.
Improve performance by only changing color if the altitude changed by
more than 200 feet compared to the color being displayed.
According to my eyes even 500 feet difference does not create a visible
discontinuity in the color of the plane track.
The position variable is an array and needs to be compared element-wise.
Therefore change position comparison to an element-wise comparison.
Due to this comparison not working the else branch of if(est_track) was
never reached in the program flow.
With the estimated part just starting the if branch of if(est_track) will
append projHere. The else branch then appends it again as projPrev.
Changing back to solid line a gap is created between the dotted line and
the new solid line because projPrev is only appened to the solid line.
Changing projPrev to projHere in the else branch fixes both problems.
Intermittent positions are displayed as estimated (dotted) track. The
handling of that feature was confusing and differed significantly
between history and live data.
Clean it up so it works as intended.
Check if it was already stale at the time of the data set creation,
not only the time difference to the last position as this is
insufficient when data sets are created in larger intervals. This is
still not sufficient to detect every 5 second gap in position data but
it's an improvement.
Also call updateTick with both arguments so they can be used when
calling updateTrack in updateTick.
The "tail" that is the latest fixed segment is set to the current
position. Therefore tail_update needs to be set to the current time not
head_update. head_update is updated whenever a new position is received
but at the time of the assignment has not been yet assigned the new
value.
To compensate for the somewhat reduced frequency of positions being
saved set the minimum time after which a new position is save to 4
seconds. Times are not saved as whole seconds so use > instead of >=.
Append the position of a plane that does not change track only every 16
seconds.
Relies on the airplanes providing ground track information.
In case they do not supply track information or are MLAT aircraft they get
updated time-based like before.
If a plane supplies a wrong track which is constant it gets updated only
every 16 seconds which is still fine, this planes data are suspect anyway.
For small track changes between 0.25 and 1 degree update every 4 seconds.
For larger than 1 degree track changes update every 2 seconds to produce nice
curves.
head_update is used as the timestamp of when the previous position was
received. Associate it with the plane object instead of the line
segment. Update it after usage so not every exit path of the function
needs the update.
tail_update marks the time when we extend the existing track/line
segment and does not need to be saved as part of the line segment.
Move tail_update to the plane object and add some comments explaining
its use.
Only draw the new state after the new point, don't assume the new state
for the line to the previous point.
Check if the point is already part of the line segment before appending
it. Checking only longitude is enough because this check is not
critical.
Also fixes history_size accounting which only added 2 points before. My
understanding of the variable is the counting of the points saved in
line segments.
@wiedehopf wiedehopf changed the base branch from master to dev September 20, 2018 08:58
@mutability
Copy link

I asked the FA web team (they now maintain skyview) to have a look at this

@wiedehopf
Copy link
Author

The first patch is for dump1090 itself so you can take a look at that ;)
And thank you for forwarding the rest.

Browser cache css and js files too well. Users have had problems loading
the Webview after an update because the new js and css files are not
loaded. The browser uses internally cached versions.
This problem can be avoided by using a different query string for every
release version.
@mutability mutability added the web Stuff for the web team to look at label Mar 4, 2019
@wiedehopf
Copy link
Author

By accident used the branch for something else.

Gonna make a new pull request with just bugfixes.

@wiedehopf wiedehopf closed this Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web Stuff for the web team to look at
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants