mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 00:55:13 +01:00
Fixed broken coordinates decoding
This commit is contained in:
parent
1731aa1890
commit
110c8c6bed
@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
inline double toWGS32(qint32 v)
|
inline double toWGS32(qint32 v)
|
||||||
{
|
{
|
||||||
return (double)(((double)v / (double)(1<<31)) * (double)180);
|
return (double)(((double)v / (double)(1U<<31)) * (double)180);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double toWGS24(qint32 coord)
|
inline double toWGS24(qint32 v)
|
||||||
{
|
{
|
||||||
return (coord < 0x800000)
|
return (v < 0x800000)
|
||||||
? (double)coord * 360.0 / (double)(1<<24)
|
? (double)v * 360.0 / (double)(1U<<24)
|
||||||
: (double)(coord - 0x1000000) * 360.0 / (double)(1<<24);
|
: (double)(v - 0x1000000) * 360.0 / (double)(1<<24);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GARMIN_H
|
#endif // GARMIN_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user