Browse Source

AP_IRLock: convert SITL backends to double precision position

zr-v5.1
Andrew Tridgell 4 years ago
parent
commit
4895a08ab2
  1. 6
      libraries/AP_IRLock/AP_IRLock_SITL.cpp

6
libraries/AP_IRLock/AP_IRLock_SITL.cpp

@ -41,9 +41,9 @@ bool AP_IRLock_SITL::update() @@ -41,9 +41,9 @@ bool AP_IRLock_SITL::update()
}
if (_sitl->precland_sim.last_update_ms() != _last_timestamp) {
const Vector3f position = _sitl->precland_sim.get_target_position();
const Matrix3f &body_to_ned = AP::ahrs().get_rotation_body_to_ned();
const Vector3f real_position = body_to_ned.mul_transpose(-position);
const Vector3d position = _sitl->precland_sim.get_target_position();
const Matrix3d body_to_ned = AP::ahrs().get_rotation_body_to_ned().todouble();
const Vector3d real_position = body_to_ned.mul_transpose(-position);
_last_timestamp = _sitl->precland_sim.last_update_ms();
_last_update_ms = _last_timestamp;
_target_info.timestamp = _last_timestamp;

Loading…
Cancel
Save