diff --git a/apps/gipy/ChangeLog b/apps/gipy/ChangeLog index 88d489161..2d03a25ba 100644 --- a/apps/gipy/ChangeLog +++ b/apps/gipy/ChangeLog @@ -45,3 +45,6 @@ * Bugfix : lost direction. * Larger fonts. * Detecting next point correctly when going back. + +0.13: + * Bugfix in lost direction. diff --git a/apps/gipy/app.js b/apps/gipy/app.js index a0eae054c..63b22598b 100644 --- a/apps/gipy/app.js +++ b/apps/gipy/app.js @@ -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) { diff --git a/apps/gipy/metadata.json b/apps/gipy/metadata.json index 2c31b1317..0a750559e 100644 --- a/apps/gipy/metadata.json +++ b/apps/gipy/metadata.json @@ -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",