Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Filter out positions where sats = 0
  • Loading branch information
Mark Jessop authored and Mark Jessop committed Jul 9, 2023
commit eb3cdbce951c488b053c1f5ce9bb5ed03e33531e
8 changes: 8 additions & 0 deletions js/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ function formatData(data) {
if (data[key][i].telemetry_hidden && !showTesting){
continue;
}
// No GPS lock filter. Filter out positions with sats = 0, if sats is provided.
// The historical data API will do this already, but we need this to filter out data
// coming in via websockets.
if (data[key][i].hasOwnProperty("sats")){
if (data[key][i].sats == 0){
continue;
}
}
//
dataTempEntry.gps_lat = parseFloat((data[key][i].lat).toPrecision(8));
dataTempEntry.gps_lon = parseFloat((data[key][i].lon).toPrecision(8));
Expand Down