From 5588e1deeda330f32eb77d843571bc6920a874bd Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Wed, 28 Sep 2011 15:47:04 +0200 Subject: [PATCH] forgot some algebra macros --- sw/airborne/math/pprz_algebra.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sw/airborne/math/pprz_algebra.h b/sw/airborne/math/pprz_algebra.h index 81b35c7b543..086479d3902 100644 --- a/sw/airborne/math/pprz_algebra.h +++ b/sw/airborne/math/pprz_algebra.h @@ -299,6 +299,13 @@ (_c).r = (_a).r + (_b).r; \ } +/* c = a + _s * b */ +#define RATES_SUM_SCALED(_c, _a, _b, _s) { \ + (_c).p = (_a).p + (_s)*(_b).p; \ + (_c).q = (_a).q + (_s)*(_b).q; \ + (_c).r = (_a).r + (_s)*(_b).r; \ + } + /* c = a - b */ #define RATES_DIFF(_c, _a, _b) { \ (_c).p = (_a).p - (_b).p; \