Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Fix bug in latitude formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thenickdude committed Jan 16, 2015
1 parent 7eb2932 commit 1f0eaec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gpxwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void gpxWriterAddPoint(gpxWriter_t *gpx, uint32_t time, int32_t lat, int32_t lon
uint32_t latFracDegrees = abs(lat) % GPS_DEGREES_DIVIDER;
uint32_t lonFracDegrees = abs(lon) % GPS_DEGREES_DIVIDER;

fprintf(gpx->file, " <trkpt lat=\"%d.%u\" lon=\"%d.%07u\"><ele>%d</ele>", latDegrees, latFracDegrees, lonDegrees, lonFracDegrees, altitude);
fprintf(gpx->file, " <trkpt lat=\"%d.%07u\" lon=\"%d.%07u\"><ele>%d</ele>", latDegrees, latFracDegrees, lonDegrees, lonFracDegrees, altitude);
if (time != (uint32_t) -1) {
//We'll just assume that the timespan is less than 24 hours, and make up a date
int hours, mins, secs, frac;
Expand Down

0 comments on commit 1f0eaec

Please sign in to comment.