Skip to content

Commit

Permalink
Swap latitude and longitude in GPX output (#224)
Browse files Browse the repository at this point in the history
* Swap latitude and longitude in GPX output

The geo_point::Point is initalized with an (X, Y) coordinate, which it
interprets as (longitude, latitude). We currently intialize the point
in the wrong order which results in incorrect GPX output.

* Run linter

---------

Co-authored-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
jigpu and gwbres authored Mar 29, 2024
1 parent 484d8db commit c8b44c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions rinex-cli/src/cli/fops/filegen.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// filegen opmode
use clap::{
Command,
//ArgAction,
//value_parser,
};
use clap::Command;

use super::{SHARED_DATA_ARGS, SHARED_GENERAL_ARGS};

Expand Down
2 changes: 1 addition & 1 deletion rinex-cli/src/positioning/ppp/post_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub fn post_process(
)?;
if matches.get_flag("gpx") {
let mut segment = gpx::TrackSegment::new();
let mut wp = Waypoint::new(GeoPoint::new(rad2deg(lat), rad2deg(lon)));
let mut wp = Waypoint::new(GeoPoint::new(rad2deg(lon), rad2deg(lat))); // Yes, longitude *then* latitude
wp.elevation = Some(alt);
wp.speed = None; // TODO ?
wp.time = None; // TODO Gpx::Time
Expand Down

0 comments on commit c8b44c9

Please sign in to comment.