Fix longitude range issues in CSV

pull/102/head
Daniel Richman 2013-04-27 08:44:25 +01:00
rodzic 8c354fdf62
commit 4ec10c01ed
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -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)) {