forked from mutability/dump1090
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
I asked the FA web team (they now maintain skyview) to have a look at this |
The first patch is for dump1090 itself so you can take a look at that ;) |
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.
By accident used the branch for something else. Gonna make a new pull request with just bugfixes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello,
please consider pulling this branch.
Short overview of the changes:
Changes compared to the first pull request i closed: