@@ -27,7 +27,8 @@ var excludedFields = [
2727 "uploader_radio" ,
2828 "uploader_antenna" ,
2929 "raw" ,
30- "aprs_tocall"
30+ "aprs_tocall" ,
31+ "telemetry_hidden"
3132] ;
3233
3334var uniqueKeys = {
@@ -37,7 +38,8 @@ var uniqueKeys = {
3738}
3839
3940function formatData ( data ) {
40- var hideAprs = offline . get ( 'opt_hide_aprs' ) ;
41+ var showAprs = offline . get ( 'opt_show_aprs' ) ;
42+ var showTesting = offline . get ( "opt_show_testing" ) ;
4143 var response = { } ;
4244 response . positions = { } ;
4345 var dataTemp = [ ] ;
@@ -70,7 +72,8 @@ function formatData(data) {
7072 }
7173 }
7274 for ( let entry in data [ key ] [ i ] . uploaders ) {
73- if ( data [ key ] [ i ] . software_name == "aprs" ) {
75+ // This check should probably be done using a modulation field, but this still works I guess..
76+ if ( data [ key ] [ i ] . software_name . includes ( "APRS" ) ) {
7477 aprsflag = true ;
7578 var stations = data [ key ] [ i ] . uploaders [ entry ] . uploader_callsign . split ( "," ) ;
7679 for ( let uploader in stations ) {
@@ -96,9 +99,15 @@ function formatData(data) {
9699 if ( dataTempEntry . gps_alt > maximumAltitude ) {
97100 maximumAltitude = dataTempEntry . gps_alt ;
98101 }
99- if ( maximumAltitude < 1500 && aprsflag && ! hideAprs ) {
102+ // APRS Altitude filter.
103+ if ( maximumAltitude < 1500 && aprsflag && ! showAprs ) {
100104 continue ;
101105 }
106+ // Testing payload filter.
107+ if ( data [ key ] [ i ] . telemetry_hidden && ! showTesting ) {
108+ continue ;
109+ }
110+ //
102111 dataTempEntry . gps_lat = parseFloat ( ( data [ key ] [ i ] . lat ) . toPrecision ( 8 ) ) ;
103112 dataTempEntry . gps_lon = parseFloat ( ( data [ key ] [ i ] . lon ) . toPrecision ( 8 ) ) ;
104113 if ( dataTempEntry . gps_lat == 0 && dataTempEntry . gps_lon == 0 ) {
0 commit comments