aboutsummaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2013-01-15 11:16:28 -0500
committerJames Goppert <james.goppert@gmail.com>2013-01-15 11:16:28 -0500
commit8b6660fc369806da509da5b5b98acc51da83811f (patch)
tree3426d532e1bc7ec83bb6992db23dd36cd8734543 /apps/examples
parentd02a24ec82e35016545d519ea88d46881c42df2d (diff)
downloadpx4-firmware-8b6660fc369806da509da5b5b98acc51da83811f.tar.gz
px4-firmware-8b6660fc369806da509da5b5b98acc51da83811f.tar.bz2
px4-firmware-8b6660fc369806da509da5b5b98acc51da83811f.zip
Fixed param issue.
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/kalman_demo/KalmanNav.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/examples/kalman_demo/KalmanNav.cpp b/apps/examples/kalman_demo/KalmanNav.cpp
index 5f71da58e..081664d17 100644
--- a/apps/examples/kalman_demo/KalmanNav.cpp
+++ b/apps/examples/kalman_demo/KalmanNav.cpp
@@ -475,8 +475,8 @@ void KalmanNav::correctAtt()
// mag predicted measurement
// choosing some typical magnetic field properties,
// TODO dip/dec depend on lat/ lon/ time
- static const float dip = _magDip.get() / M_RAD_TO_DEG_F; // dip, inclination with level
- static const float dec = _magDec.get() / M_RAD_TO_DEG_F; // declination, clockwise rotation from north
+ float dip = _magDip.get() / M_RAD_TO_DEG_F; // dip, inclination with level
+ float dec = _magDec.get() / M_RAD_TO_DEG_F; // declination, clockwise rotation from north
float bN = cosf(dip) * cosf(dec);
float bE = cosf(dip) * sinf(dec);
float bD = sinf(dip);