mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 11:33:34 +08:00
Interface: output vector quantities by "return-by-value"
This commit is contained in:
committed by
Mathieu Bresciani
parent
72d8f91b4d
commit
2fa43419d2
@@ -88,9 +88,9 @@ TEST_F(EkfAirspeedTest, testWindVelocityEstimation)
|
||||
|
||||
EXPECT_TRUE(_ekf_wrapper.isWindVelocityEstimated());
|
||||
|
||||
const Vector3f vel = _ekf_wrapper.getVelocity();
|
||||
const Vector2f vel_wind_earth = _ekf_wrapper.getWindVelocity();
|
||||
const float height_before_pressure_correction = _ekf_wrapper.getPosition()(2);
|
||||
const Vector3f vel = _ekf->getVelocity();
|
||||
const Vector2f vel_wind_earth = _ekf->getWindVelocity();
|
||||
const float height_before_pressure_correction = _ekf->getPosition()(2);
|
||||
|
||||
const Dcmf R_to_earth_sim(_quat_sim);
|
||||
EXPECT_TRUE(matrix::isEqual(vel, simulated_velocity_earth));
|
||||
@@ -108,7 +108,7 @@ TEST_F(EkfAirspeedTest, testWindVelocityEstimation)
|
||||
|
||||
_sensor_simulator.runSeconds(20);
|
||||
|
||||
const float height_after_pressure_correction = _ekf_wrapper.getPosition()(2);
|
||||
const float height_after_pressure_correction = _ekf->getPosition()(2);
|
||||
// height increase means that state z decrease due to z axis pointing down
|
||||
const float expected_height_after_pressure_correction = height_before_pressure_correction -
|
||||
expected_height_difference;
|
||||
|
||||
Reference in New Issue
Block a user