Merge pull request #102 from danielrichman/master
Write longitude in range -180 to 180. Closes #101pull/106/head
commit
197fe51146
|
@ -315,6 +315,10 @@ int main(int argc, const char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_position(float lat, float lng, float alt, int timestamp) {
|
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) {
|
if (kml_file) {
|
||||||
fprintf(kml_file, "%g,%g,%g\n", lng, lat, alt);
|
fprintf(kml_file, "%g,%g,%g\n", lng, lat, alt);
|
||||||
if (ferror(kml_file)) {
|
if (ferror(kml_file)) {
|
||||||
|
|
Ładowanie…
Reference in New Issue