Update hw files and cfg.
[bertos.git] / boards / ek-lm3s1968 / examples / gps / compass.h
1 #ifndef COMPASS_H
2 #define COMPASS_H
3
4 #define PI 3.14159265358979323846
5
6 INLINE float deg2rad(float deg)
7 {
8         return deg * PI / 180;
9 }
10
11 INLINE float rad2deg(float rad)
12 {
13         return rad * 180 / PI;
14 }
15
16 float distance(float lat1, float lon1, float lat2, float lon2);
17 int bearing(float lat1, float lon1, float lat2, float lon2);
18 const char *compass_heading(int bearing);
19
20 #endif /* COMPASS_H */