mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 08:22:43 +08:00
better macros ... (multiplication avoided)
This commit is contained in:
@@ -118,9 +118,6 @@ static inline void fly_to_xy(float x, float y);
|
||||
|
||||
#define MIN_DX ((int16_t)(MAX_PPRZ * 0.05))
|
||||
|
||||
#define DegOfRad(x) ((x) / M_PI * 180.)
|
||||
#define RadOfDeg(x) ((x)/180. * M_PI)
|
||||
|
||||
void nav_circle_XY(float x, float y, float radius) {
|
||||
float last_trigo_qdr = nav_circle_trigo_qdr;
|
||||
nav_circle_trigo_qdr = atan2(estimator_y - y, estimator_x - x);
|
||||
|
||||
+3
-3
@@ -62,9 +62,9 @@ typedef uint8_t unit_t;
|
||||
while (x > M_PI) x -= 2 * M_PI; \
|
||||
while (x < -M_PI) x += 2 * M_PI; \
|
||||
}
|
||||
#define DegOfRad(x) ((x) / M_PI * 180.)
|
||||
#define DeciDegOfRad(x) ((x) / M_PI * 1800.)
|
||||
#define RadOfDeg(x) ((x)/180. * M_PI)
|
||||
#define DegOfRad(x) ((x) * (180. / M_PI))
|
||||
#define DeciDegOfRad(x) ((x) * (1800./ M_PI))
|
||||
#define RadOfDeg(x) ((x) * (M_PI/180.))
|
||||
|
||||
#define Min(x,y) (x < y ? x : y)
|
||||
#define Max(x,y) (x > y ? x : y)
|
||||
|
||||
Reference in New Issue
Block a user