Skip to content

Commit 82d659b

Browse files
committed
Add GPS DOP debug
1 parent 7f45357 commit 82d659b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

js/flightlog_fields_presenter.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,13 @@ function FlightLogFieldPresenter() {
700700
'debug[2]': 'isLowPowerDisarmed',
701701
'debug[3]': 'mspTelemetryDescriptor',
702702
};
703+
DEBUG_FRIENDLY_FIELD_NAMES.GPS_DOP = {
704+
'debug[all]': 'GPS Dilution of Precision',
705+
'debug[0]': 'Number of Satellites',
706+
'debug[1]': 'pDOP (positional - 3D)',
707+
'debug[2]': 'hDOP (positional - 2D)',
708+
'debug[3]': 'vDOP (vertical - 1D)',
709+
}
703710
} else if (semver.gte(firmwareVersion, '4.3.0')) {
704711
DEBUG_FRIENDLY_FIELD_NAMES.FEEDFORWARD = {
705712
'debug[all]':'Feedforward [roll]',
@@ -1274,6 +1281,16 @@ function FlightLogFieldPresenter() {
12741281
default:
12751282
return value.toFixed(0);
12761283
}
1284+
case 'GPS_DOP':
1285+
switch (fieldName) {
1286+
case 'debug[0]': // Number of Satellites
1287+
return value.toFixed(0);
1288+
case 'debug[1]': // pDOP (positional - 3D)
1289+
case 'debug[2]': // hDOP (horizontal - 2D)
1290+
case 'debug[3]': // vDOP (vertical - 1D)
1291+
default:
1292+
return (value / 100).toFixed(1);
1293+
}
12771294
}
12781295
return value.toFixed(0);
12791296
}

0 commit comments

Comments
 (0)