gipy: better position in elevation profiles
parent
88f45b6714
commit
a7a845fae4
|
|
@ -107,3 +107,8 @@
|
||||||
* Bugfix for negative remaining distance when going backwards
|
* Bugfix for negative remaining distance when going backwards
|
||||||
* New settings for powersaving
|
* New settings for powersaving
|
||||||
* Adjustments to powersaving algorithm
|
* Adjustments to powersaving algorithm
|
||||||
|
|
||||||
|
0.22:
|
||||||
|
* Powersaving disabled by default
|
||||||
|
* Default choice for powersaving in the settings
|
||||||
|
* Better position in elevation profiles
|
||||||
|
|
@ -966,11 +966,16 @@ class Status {
|
||||||
}
|
}
|
||||||
remaining_distance() {
|
remaining_distance() {
|
||||||
if (go_backwards) {
|
if (go_backwards) {
|
||||||
return this.remaining_distances[0] - this.remaining_distances[this.current_segment] +
|
return (
|
||||||
this.position.distance(this.path.point(this.current_segment));
|
this.remaining_distances[0] -
|
||||||
|
this.remaining_distances[this.current_segment] +
|
||||||
|
this.position.distance(this.path.point(this.current_segment))
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return this.remaining_distances[this.current_segment + 1] +
|
return (
|
||||||
this.position.distance(this.path.point(this.current_segment + 1));
|
this.remaining_distances[this.current_segment + 1] +
|
||||||
|
this.position.distance(this.path.point(this.current_segment + 1))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check if we are lost (too far from segment we think we are on)
|
// check if we are lost (too far from segment we think we are on)
|
||||||
|
|
@ -1000,12 +1005,11 @@ class Status {
|
||||||
} else {
|
} else {
|
||||||
let current_position = 0;
|
let current_position = 0;
|
||||||
if (this.current_segment !== null) {
|
if (this.current_segment !== null) {
|
||||||
if (go_backwards) {
|
|
||||||
current_position = this.remaining_distance();
|
|
||||||
} else {
|
|
||||||
current_position =
|
current_position =
|
||||||
this.remaining_distances[0] - this.remaining_distance();
|
this.remaining_distances[this.current_segment + 1] +
|
||||||
}
|
this.projected_point.distance(
|
||||||
|
this.path.point(this.current_segment + 1)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (this.screen == HEIGHTS_FULL) {
|
if (this.screen == HEIGHTS_FULL) {
|
||||||
this.display_heights(0, current_position, this.remaining_distances[0]);
|
this.display_heights(0, current_position, this.remaining_distances[0]);
|
||||||
|
|
@ -1044,7 +1048,7 @@ class Status {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end_point_index = Math.min(end_point_index+1, this.path.len -1);
|
end_point_index = Math.min(end_point_index + 1, this.path.len - 1);
|
||||||
let max_height = Number.NEGATIVE_INFINITY;
|
let max_height = Number.NEGATIVE_INFINITY;
|
||||||
let min_height = Number.POSITIVE_INFINITY;
|
let min_height = Number.POSITIVE_INFINITY;
|
||||||
for (let i = start_point_index; i <= end_point_index; i++) {
|
for (let i = start_point_index; i <= end_point_index; i++) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "gipy",
|
"id": "gipy",
|
||||||
"name": "Gipy",
|
"name": "Gipy",
|
||||||
"shortName": "Gipy",
|
"shortName": "Gipy",
|
||||||
"version": "0.21",
|
"version": "0.22",
|
||||||
"description": "Follow gpx files using the gps. Don't get lost in your bike trips and hikes.",
|
"description": "Follow gpx files using the gps. Don't get lost in your bike trips and hikes.",
|
||||||
"allow_emulator":false,
|
"allow_emulator":false,
|
||||||
"icon": "gipy.png",
|
"icon": "gipy.png",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue