2.0.7
This commit is contained in:
parent
183a97003e
commit
eb01f8981a
|
@ -14,7 +14,7 @@ export var locEnabled:boolean = false;
|
||||||
|
|
||||||
const heartbeat:number = 500;
|
const heartbeat:number = 500;
|
||||||
const displayBeat:number = 3;
|
const displayBeat:number = 3;
|
||||||
const ticksPerDS = 200;
|
const ticksPerDS = 10;
|
||||||
|
|
||||||
const geoLibAccuracy:number = 0.1;
|
const geoLibAccuracy:number = 0.1;
|
||||||
const minExpoAccuracy:number = 5;
|
const minExpoAccuracy:number = 5;
|
||||||
|
@ -114,6 +114,7 @@ class Trip {
|
||||||
public elapsed:string = "00.00.00";
|
public elapsed:string = "00.00.00";
|
||||||
ticks:number = 0;
|
ticks:number = 0;
|
||||||
interval:any;
|
interval:any;
|
||||||
|
minTripDone:boolean = false;
|
||||||
segments:number = 1;
|
segments:number = 1;
|
||||||
ds:number = 0;
|
ds:number = 0;
|
||||||
CO2:number = 0.0;
|
CO2:number = 0.0;
|
||||||
|
@ -202,6 +203,10 @@ export class GT2 {
|
||||||
if ((this.trip.ticks % ticksPerDS) == 0) {
|
if ((this.trip.ticks % ticksPerDS) == 0) {
|
||||||
t = expoFix.coords['accuracy']; if (t < minExpoAccuracy ) return;
|
t = expoFix.coords['accuracy']; if (t < minExpoAccuracy ) return;
|
||||||
this.trip.ds += this.trip.lastFix.distanceTo(this.trip.loc);
|
this.trip.ds += this.trip.lastFix.distanceTo(this.trip.loc);
|
||||||
|
if (this.trip.ds > 250 && !this.trip.minTripDone) {
|
||||||
|
this.trip.ds =0.0;
|
||||||
|
this.trip.minTripDone = true;
|
||||||
|
}
|
||||||
this.trip.lastFix.set(lat,lon);
|
this.trip.lastFix.set(lat,lon);
|
||||||
if (debug > 10) console.log('delta ' + this.trip.ds);
|
if (debug > 10) console.log('delta ' + this.trip.ds);
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ export default function TripScreen( { navigation }: RootTabScreenProps<'Trip'>)
|
||||||
title={sButtonText}
|
title={sButtonText}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if (!getAdvised()) {
|
if (!getAdvised()) {
|
||||||
Alert.alert("Note: GT2 2.0.6 doesn't run while in background or sleeping.");
|
Alert.alert("Note: GT2" + ver + " doesn't run while in background or sleeping.");
|
||||||
setAdvised();
|
setAdvised();
|
||||||
}
|
}
|
||||||
if (!Trips.inProgress) {startTrip();
|
if (!Trips.inProgress) {startTrip();
|
||||||
|
|
Loading…
Reference in New Issue