Rev 2196 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2196 | Rev 2199 | ||
---|---|---|---|
Line 67... | Line 67... | ||
67 | 67 | ||
68 | 68 | ||
69 | // Definitonen für FollowMeStep2 |
69 | // Definitonen für FollowMeStep2 |
70 | #define LONG_DIV 10000000 |
70 | #define LONG_DIV 10000000 |
- | 71 | #define LAT_DIV LONG_DIV |
|
Line 71... | Line 72... | ||
71 | #define LAT_DIV LONG_DIV |
72 | #define FOLLOWME_M2DEG 111111 |
Line 123... | Line 124... | ||
123 | 124 | ||
124 | int followme_calculate_offset( |
125 | int followme_calculate_offset( |
125 | const nmeaPOS *pkt_pos, /**< Start position in radians */ |
126 | const nmeaPOS *pkt_pos, /**< Start position in radians */ |
126 | nmeaPOS *target_pos, /**< Result position in radians */ |
127 | nmeaPOS *target_pos, /**< Result position in radians */ |
127 | int d_lat, /**< Distance lat(m) */ |
128 | int d_lat, /**< Distance lat(m) */ |
128 | int d_lon /**< Distance long(m) */ |
129 | int d_long /**< Distance long(m) */ |
129 | ) |
130 | ) |
130 | { |
- | |
- | 131 | { |
|
131 | 132 | nmeaPOS p1 = *pkt_pos; |
|
132 | // only for test the "Debug-Mode" |
133 | // only for test the "Debug-Mode" |
- | 134 | target_pos->lat = ( d_lat * ( LAT_DIV / FOLLOWME_M2DEG ) ); //p1.lat + |
|
133 | target_pos->lat = pkt_pos->lat; |
135 | target_pos->lon = 100 * (uint32_t)( (float)FOLLOWME_ROUND_100 / cos( (float)p1.lat / (float)LONG_DIV ) ) ; // ( d_long * ( LONG_DIV / FOLLOWME_M2DEG ) ); // |
- | 136 | // 10 * 10000000 / 111111 |
|
- | 137 | ||
- | 138 | ||
- | 139 | // p1.lon + / FOLLOWME_M2DEG / FOLLOWME_ROUND_100 * |
|
Line 134... | Line 140... | ||
134 | target_pos->lon = pkt_pos->lon; |
140 | |
135 | 141 |