Fixed gps

This commit is contained in:
2026-04-06 21:41:50 -04:00
parent d805646a1c
commit 68cd0268e5

View File

@@ -112,7 +112,7 @@ class DashboardHeader extends HTMLElement {
if (gpsInfo && gpsDetail) { if (gpsInfo && gpsDetail) {
if (hasValidFix) { if (hasValidFix) {
gpsInfo.textContent = `${gps.latitude.toFixed(4)}, ${gps.longitude.toFixed(4)}`; gpsInfo.textContent = `${gps.latitude.toFixed(4)}, ${gps.longitude.toFixed(4)}`;
gpsDetail.textContent = `Alt: ${Math.round(gps.altitude)}m • Acc: ${Math.round(gps.accuracy)}m • ${gps.satellites} Sats`; gpsDetail.textContent = `Alt: ${gps.altitude != null ? Math.round(gps.altitude) : '?'}m • Speed: ${ gps.speed != null ? Math.round(gps.speed * 10) / 10 : '?'} m/s<br>Acc: ${gps.accuracy ? Math.round(gps.accuracy) : 'None'}m • ${gps.satellites ?? '?'} Sats`;
} else { } else {
gpsInfo.textContent = gps.satellites > 0 ? 'Acquiring Fix...' : 'No Fix'; gpsInfo.textContent = gps.satellites > 0 ? 'Acquiring Fix...' : 'No Fix';
gpsDetail.textContent = `${gps.satellites} satellites`; gpsDetail.textContent = `${gps.satellites} satellites`;