mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 16:13:33 +08:00
lpe: add vehicle_odometry and data validation handlers; improve inout interface
This commit is contained in:
@@ -66,9 +66,10 @@ int BlockLocalPositionEstimator::sonarMeasure(Vector<float, n_y_sonar> &y)
|
||||
_sonarStats.update(Scalarf(d));
|
||||
_time_last_sonar = _timeStamp;
|
||||
y.setZero();
|
||||
matrix::Eulerf euler(matrix::Quatf(_sub_att.get().q));
|
||||
y(0) = (d + _sonar_z_offset.get()) *
|
||||
cosf(_eul(0)) *
|
||||
cosf(_eul(1));
|
||||
cosf(euler.phi()) *
|
||||
cosf(euler.theta());
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user