From 6fb021ee012ccbb7b917e4f7d1c1b7e18b5aa338 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 1 Jun 2006 21:13:56 +0000 Subject: [PATCH] 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. --- utils/GPSsmooth/MIDG-II.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/GPSsmooth/MIDG-II.cxx b/utils/GPSsmooth/MIDG-II.cxx index 82d9143f1..0bb2f79a7 100644 --- a/utils/GPSsmooth/MIDG-II.cxx +++ b/utils/GPSsmooth/MIDG-II.cxx @@ -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;