reduce default ptracksInterval to 10

This commit is contained in:
Matthias Wirth
2021-06-12 00:54:30 +02:00
parent f7def2027a
commit b26f794025
3 changed files with 4 additions and 4 deletions

View File

@@ -289,7 +289,7 @@ sudo wget -nv -O /usr/local/share/tar1090/html/upintheair.json "http://www.heywh
- Can be filtered by altitude with the altitude filter
- Configure a longer duration than 8 hours via the [configuration](#configuration-part-1-history-interval-and-number-of-snapshots--ptracks-duration-optional)
- Restrict the duration shown to 2 hours: /tar1090/?pTracks=2
- Draw less points which reduces display time (higher interval, lower compute time, default 30): /tar1090/?pTracks=8&pTracksInterval=60
- Draw less points which reduces display time (higher interval, lower compute time, default 15): /tar1090/?pTracks=8&pTracksInterval=60
## 0800-DESTROY-SD-CARD

View File

@@ -33,7 +33,7 @@ let replay = false;
let rData = [];
let StaleReceiverCount = 0;
let pTracks = false;
let pTracksInterval = 30;
let pTracksInterval = 15;
let lastTraceGet = 0;
let traceRate = 0;
let _aircraft_type_cache = null;
@@ -175,7 +175,7 @@ if (usp.has('heatmap')) {
}
{
let value;
if (value = usp.getFloat('pTracksInterval')) {
if ((value = usp.getFloat('pTracksInterval')) != null) {
pTracksInterval = value;
}
}

View File

@@ -539,7 +539,7 @@ PlaneObject.prototype.updateTrack = function(now, last, serverTrack, stale) {
// Add current position to the existing track.
// We only retain some points depending on time elapsed and track change
let turn_density = 6.5;
if (pTracks) turn_density = 3;
if (pTracks && pTracksInterval > 5) turn_density = 3;
if (
since_update > 86 + !!pTracks * 90 ||
(!on_ground && since_update > (100/turn_density)/track_change) ||