1
0
Fork 0

Fix a dumb bug where I inadvertantly did a computation in int32 land causing

me to loose 2 decimal places in my location data before converting to lon/lat.
This commit is contained in:
curt 2006-06-01 21:13:56 +00:00
parent 35a8d66415
commit 6fb021ee01

View file

@ -238,7 +238,7 @@ void MIDGTrack::parse_msg( const int id, char *buf, MIDGpos *pos, MIDGatt *att )
// cout << " pos = " << posx << "," << posy << "," << posz << endl;
double xyz[3];
xyz[0] = posx/100; xyz[1] = posy/100; xyz[2] = posz/100;
xyz[0] = (double)posx/100; xyz[1] = (double)posy/100; xyz[2] = (double)posz/100;
double lat, lon, alt;
sgCartToGeod(xyz, &lat, &lon, &alt);
pos->lat_deg = lat * 180.0 / SG_PI;