1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-14 23:20:47 +01:00
GPXSee/src/common/garmin.h

19 lines
334 B
C
Raw Normal View History

#ifndef GARMIN_H
#define GARMIN_H
#include <QtGlobal>
inline double toWGS32(qint32 v)
{
2019-11-10 19:48:17 +01:00
return (double)(((double)v / (double)(1U<<31)) * (double)180);
}
2019-11-10 19:48:17 +01:00
inline double toWGS24(qint32 v)
{
2019-11-10 19:48:17 +01:00
return (v < 0x800000)
? (double)v * 360.0 / (double)(1U<<24)
: (double)(v - 0x1000000) * 360.0 / (double)(1<<24);
}
#endif // GARMIN_H