set time out to 4 seconds and max age to 1 second to improve accuracy

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-10-24 14:13:47 -06:00
parent 0c2c089828
commit cbbd7ff25f

View File

@@ -252,7 +252,7 @@ function startRecording() {
navigator.wakeLock.request('screen').then((wl) => {
tripWakeLock = wl;
tripTimer = setInterval(() => {
navigator.geolocation.getCurrentPosition(recordPosition, stopRecording, { maximumAge: 10000, timeout: 5000, enableHighAccuracy: true });
navigator.geolocation.getCurrentPosition(recordPosition, stopRecording, { maximumAge: 1000, timeout: 4000, enableHighAccuracy: true });
}, 5000);
$(".trip-start").addClass('d-none');
$(".trip-stop").removeClass('d-none');