Skip to content

Commit aae7060

Browse files
authored
Merge pull request #90 from darksidelemm/main
Filter out positions where sats = 0
2 parents c53092e + eb3cdbc commit aae7060

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

js/format.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ function formatData(data) {
107107
if (data[key][i].telemetry_hidden && !showTesting){
108108
continue;
109109
}
110+
// No GPS lock filter. Filter out positions with sats = 0, if sats is provided.
111+
// The historical data API will do this already, but we need this to filter out data
112+
// coming in via websockets.
113+
if (data[key][i].hasOwnProperty("sats")){
114+
if (data[key][i].sats == 0){
115+
continue;
116+
}
117+
}
110118
//
111119
dataTempEntry.gps_lat = parseFloat((data[key][i].lat).toPrecision(8));
112120
dataTempEntry.gps_lon = parseFloat((data[key][i].lon).toPrecision(8));

0 commit comments

Comments
 (0)