mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Fix WKO+ file reader GPS 'drops'
The WKO+ file format appears to record drops in
recording of GPS data with a latlon of 180,180. We
expect this to be 0,0.
This makes the WKO+ file reader consistent with the
GoogleMapControl and removes the need to clean data
there.
If it is found that 180,180 is the standard way of
recording drops in GPS signal then we can change the
code. We use 0,0 since it is conveniently at sea off
the west coast of Africa.
Cherry pick d06c9e97c9 (From v3.0.0dev)
This commit is contained in:
committed by
Gareth Coco
parent
c6a376b89f
commit
e7a7803f09
@@ -372,13 +372,19 @@ WKO_UCHAR *WkoParseRawData(WKO_UCHAR *fb, RideFile *rideFile, QStringList &error
|
||||
memcpy(&llat, &val, 4);
|
||||
lat = (double)llat;
|
||||
lat *= 0.00000008381903171539306640625;
|
||||
sprintf(slat, "%-3.9g", lat);
|
||||
|
||||
val = get_bits(thelot, bit-32,32);
|
||||
memcpy(&llon, &val, 4);
|
||||
lon = (double)llon;
|
||||
lon *= 0.00000008381903171539306640625;
|
||||
|
||||
// WKO handles drops in recording of GPS data
|
||||
// as 180,180 -- we expect 0,0
|
||||
llat=round(lat); llon=round(lon);
|
||||
if (llat == 180 && llon == 180) lat=lon=0;
|
||||
|
||||
sprintf(slon, "%-3.9g", lon);
|
||||
sprintf(slat, "%-3.9g", lat);
|
||||
|
||||
sprintf(GRAPHDATA[i], "%13s %13s", slat,slon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user