aboutsummaryrefslogtreecommitdiff
path: root/apps/examples
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2013-01-15 15:11:24 -0500
committerJames Goppert <james.goppert@gmail.com>2013-01-15 15:11:24 -0500
commitafb69cd05450d6df1bf2233b95030c9b93daaf1e (patch)
tree25c2620be5fe6bae18c6cc6bf22f3882b8a60999 /apps/examples
parent28ef7aa1bea97593637537c832b07459a2520b86 (diff)
downloadpx4-firmware-afb69cd05450d6df1bf2233b95030c9b93daaf1e.tar.gz
px4-firmware-afb69cd05450d6df1bf2233b95030c9b93daaf1e.tar.bz2
px4-firmware-afb69cd05450d6df1bf2233b95030c9b93daaf1e.zip
Reducing pos/att correction update rates for debugging.
Diffstat (limited to 'apps/examples')
-rw-r--r--apps/examples/kalman_demo/KalmanNav.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/examples/kalman_demo/KalmanNav.cpp b/apps/examples/kalman_demo/KalmanNav.cpp
index 0f3069d11..3966b4fcd 100644
--- a/apps/examples/kalman_demo/KalmanNav.cpp
+++ b/apps/examples/kalman_demo/KalmanNav.cpp
@@ -65,8 +65,8 @@ KalmanNav::KalmanNav(SuperBlock *parent, const char *name) :
C_nb(),
q(),
// subscriptions
- _sensors(&getSubscriptions(), ORB_ID(sensor_combined), 1), // limit to 1000 Hz
- _gps(&getSubscriptions(), ORB_ID(vehicle_gps_position), 100), // limit to 10 Hz
+ _sensors(&getSubscriptions(), ORB_ID(sensor_combined), 5), // limit to 200 Hz
+ _gps(&getSubscriptions(), ORB_ID(vehicle_gps_position), 1000), // limit to 1 Hz
_param_update(&getSubscriptions(), ORB_ID(parameter_update), 1000), // limit to 1 Hz
// publications
_pos(&getPublications(), ORB_ID(vehicle_global_position)),
@@ -208,7 +208,6 @@ void KalmanNav::update()
predictFast(dtFast);
// count fast frames
_navFrames += 1;
-
} else _missFast++;
// slow prediction step
@@ -216,7 +215,6 @@ void KalmanNav::update()
if (dtSlow > 1.0f / 100) { // 100 Hz
_slowTimeStamp = _sensors.timestamp;
-
if (dtSlow < 1.0f / 50) predictSlow(dtSlow);
else _missSlow ++;
}
@@ -227,7 +225,7 @@ void KalmanNav::update()
}
// attitude correction step
- if (_sensors.timestamp - _attTimeStamp > 1e6 / 20) { // 20 Hz
+ if (_sensors.timestamp - _attTimeStamp > 1e6 / 1) { // 1 Hz
_attTimeStamp = _sensors.timestamp;
correctAtt();
}