aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lorenz@px4.io>2015-02-28 14:34:56 +0100
committerLorenz Meier <lorenz@px4.io>2015-02-28 14:34:56 +0100
commit3355d77e1ffd4d3ea2614e140a742003c07147d8 (patch)
tree36139f7ab22a2ae57888fac6c4570664170dd43c /src
parent4e1905c1d84f48885380594d94c2cd4d990112fe (diff)
parenta77420ede84b293e41855ddc7b23b647cc64da96 (diff)
downloadpx4-firmware-3355d77e1ffd4d3ea2614e140a742003c07147d8.tar.gz
px4-firmware-3355d77e1ffd4d3ea2614e140a742003c07147d8.tar.bz2
px4-firmware-3355d77e1ffd4d3ea2614e140a742003c07147d8.zip
Merge pull request #1827 from sverling/master
Fixing small issues at ekf_att_pos_estimator
Diffstat (limited to 'src')
-rw-r--r--src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp
index 1c79cb61d..903158129 100644
--- a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp
+++ b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp
@@ -457,9 +457,7 @@ int AttitudePositionEstimatorEKF::check_filter_state()
rep.states[i] = ekf_report.states[i];
}
- for (size_t i = 0; i < rep.n_states; i++) {
- rep.states[i] = ekf_report.states[i];
- }
+
if (_estimator_status_pub > 0) {
orb_publish(ORB_ID(estimator_status), _estimator_status_pub, &rep);
@@ -774,14 +772,14 @@ void AttitudePositionEstimatorEKF::publishAttitude()
_att.pitch = euler(1);
_att.yaw = euler(2);
- _att.rollspeed = _ekf->angRate.x - _ekf->states[10];
- _att.pitchspeed = _ekf->angRate.y - _ekf->states[11];
- _att.yawspeed = _ekf->angRate.z - _ekf->states[12];
+ _att.rollspeed = _ekf->angRate.x - _ekf->states[10] / _ekf->dtIMU;
+ _att.pitchspeed = _ekf->angRate.y - _ekf->states[11] / _ekf->dtIMU;
+ _att.yawspeed = _ekf->angRate.z - _ekf->states[12] / _ekf->dtIMU;
// gyro offsets
- _att.rate_offsets[0] = _ekf->states[10];
- _att.rate_offsets[1] = _ekf->states[11];
- _att.rate_offsets[2] = _ekf->states[12];
+ _att.rate_offsets[0] = _ekf->states[10] / _ekf->dtIMU;
+ _att.rate_offsets[1] = _ekf->states[11] / _ekf->dtIMU;
+ _att.rate_offsets[2] = _ekf->states[12] / _ekf->dtIMU;
/* lazily publish the attitude only once available */
if (_att_pub > 0) {
@@ -1056,7 +1054,7 @@ void AttitudePositionEstimatorEKF::print_status()
// 4-6: Velocity - m/sec (North, East, Down)
// 7-9: Position - m (North, East, Down)
// 10-12: Delta Angle bias - rad (X,Y,Z)
- // 13: Accelerometer offset
+ // 13: Delta Velocity Bias - m/s (Z)
// 14-15: Wind Vector - m/sec (North,East)
// 16-18: Earth Magnetic Field Vector - gauss (North, East, Down)
// 19-21: Body Magnetic Field Vector - gauss (X,Y,Z)