1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-25 07:54:24 +02:00
Files
GPXSee/src/common/garmin.h
Martin Tůma 42e4b0769f Fixed broken tile/subdivs/polygon bounds/coordinates
+ do the coordinates left shift in a C++ standard defined way
2020-02-15 11:46:16 +01:00

19 lines
284 B
C

#ifndef GARMIN_H
#define GARMIN_H
#include <QtGlobal>
#define LS(val, bits) ((qint32)(((quint32)(val))<<(bits)))
inline double toWGS32(qint32 v)
{
return ((double)v / (double)(1U<<31)) * 180.0;
}
inline double toWGS24(qint32 v)
{
return toWGS32(LS(v, 8));
}
#endif // GARMIN_H