Skip to content

Commit

Permalink
forgot some algebra macros
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Sep 28, 2011
1 parent 3066d21 commit 5588e1d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sw/airborne/math/pprz_algebra.h
Expand Up @@ -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; \
Expand Down

0 comments on commit 5588e1d

Please sign in to comment.