display projection to debug

master
frederic wagner 2022-08-14 15:58:03 +02:00
parent 038ec3ef3f
commit c1276ef64e
3 changed files with 16 additions and 13 deletions

View File

@ -45,3 +45,6 @@
* Bugfix : lost direction.
* Larger fonts.
* Detecting next point correctly when going back.
0.13:
* Bugfix in lost direction.

View File

@ -328,19 +328,19 @@ class Status {
// }
// display current-segment's projection for debug
// let projection = pos.closest_segment_point(
// this.path.point(this.current_segment),
// this.path.point(this.current_segment + 1)
// );
let projection = pos.closest_segment_point(
this.path.point(this.current_segment),
this.path.point(this.current_segment + 1)
);
// let tx = (projection.lon - cx) * 40000.0;
// let ty = (projection.lat - cy) * 40000.0;
// let rotated_x = tx * cos - ty * sin;
// let rotated_y = tx * sin + ty * cos;
// let x = half_width - Math.round(rotated_x); // x is inverted
// let y = half_height + Math.round(rotated_y);
// g.setColor(g.theme.fg);
// g.fillCircle(x, y, 4);
let tx = (projection.lon - cx) * 40000.0;
let ty = (projection.lat - cy) * 40000.0;
let rotated_x = tx * cos - ty * sin;
let rotated_y = tx * sin + ty * cos;
let x = half_width - Math.round(rotated_x); // x is inverted
let y = half_height + Math.round(rotated_y);
g.setColor(g.theme.fg);
g.fillCircle(x, y, 4);
// display direction to next point if lost
if (!this.on_path) {

View File

@ -2,7 +2,7 @@
"id": "gipy",
"name": "Gipy",
"shortName": "Gipy",
"version": "0.12",
"version": "0.13",
"description": "Follow gpx files",
"allow_emulator":false,
"icon": "gipy.png",