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. * Bugfix : lost direction.
* Larger fonts. * Larger fonts.
* Detecting next point correctly when going back. * 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 // display current-segment's projection for debug
// let projection = pos.closest_segment_point( let projection = pos.closest_segment_point(
// this.path.point(this.current_segment), this.path.point(this.current_segment),
// this.path.point(this.current_segment + 1) this.path.point(this.current_segment + 1)
// ); );
// let tx = (projection.lon - cx) * 40000.0; let tx = (projection.lon - cx) * 40000.0;
// let ty = (projection.lat - cy) * 40000.0; let ty = (projection.lat - cy) * 40000.0;
// let rotated_x = tx * cos - ty * sin; let rotated_x = tx * cos - ty * sin;
// let rotated_y = tx * sin + ty * cos; let rotated_y = tx * sin + ty * cos;
// let x = half_width - Math.round(rotated_x); // x is inverted let x = half_width - Math.round(rotated_x); // x is inverted
// let y = half_height + Math.round(rotated_y); let y = half_height + Math.round(rotated_y);
// g.setColor(g.theme.fg); g.setColor(g.theme.fg);
// g.fillCircle(x, y, 4); g.fillCircle(x, y, 4);
// display direction to next point if lost // display direction to next point if lost
if (!this.on_path) { if (!this.on_path) {

View File

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