Skip to content

Commit

Permalink
Fix longitude range issues in CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrichman committed Apr 27, 2013
1 parent 8c354fd commit 4ec10c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pred_src/pred.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ int main(int argc, const char *argv[]) {
}

void write_position(float lat, float lng, float alt, int timestamp) {
// the predictor uses 0<=lng<360; most other things expect -180<lng<=180
if (lng > 180)
lng -= 360;

if (kml_file) {
fprintf(kml_file, "%g,%g,%g\n", lng, lat, alt);
if (ferror(kml_file)) {
Expand Down

0 comments on commit 4ec10c0

Please sign in to comment.