mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
Initialize global local projection for rovers
This commit initializes the global and local projection for rovers
This commit is contained in:
committed by
Daniel Agar
parent
e31304d7d5
commit
106044be38
@@ -421,8 +421,6 @@ RoverPositionControl::Run()
|
|||||||
|
|
||||||
position_setpoint_triplet_poll();
|
position_setpoint_triplet_poll();
|
||||||
|
|
||||||
// Convert Local setpoints to global setpoints
|
|
||||||
if (_control_mode.flag_control_offboard_enabled) {
|
|
||||||
if (!_global_local_proj_ref.isInitialized()
|
if (!_global_local_proj_ref.isInitialized()
|
||||||
|| (_global_local_proj_ref.getProjectionReferenceTimestamp() != _local_pos.ref_timestamp)) {
|
|| (_global_local_proj_ref.getProjectionReferenceTimestamp() != _local_pos.ref_timestamp)) {
|
||||||
|
|
||||||
@@ -432,6 +430,8 @@ RoverPositionControl::Run()
|
|||||||
_global_local_alt0 = _local_pos.ref_alt;
|
_global_local_alt0 = _local_pos.ref_alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert Local setpoints to global setpoints
|
||||||
|
if (_control_mode.flag_control_offboard_enabled) {
|
||||||
_trajectory_setpoint_sub.update(&_trajectory_setpoint);
|
_trajectory_setpoint_sub.update(&_trajectory_setpoint);
|
||||||
|
|
||||||
// local -> global
|
// local -> global
|
||||||
|
|||||||
Reference in New Issue
Block a user