mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:23:33 +08:00
Separate message for trajectory setpoint
This commit is contained in:
@@ -333,7 +333,7 @@ RoverPositionControl::control_position(const matrix::Vector2d ¤t_position,
|
||||
void
|
||||
RoverPositionControl::control_velocity(const matrix::Vector3f ¤t_velocity)
|
||||
{
|
||||
const Vector3f desired_velocity{_trajectory_setpoint.vx, _trajectory_setpoint.vy, _trajectory_setpoint.vz};
|
||||
const Vector3f desired_velocity{_trajectory_setpoint.velocity};
|
||||
float dt = 0.01; // Using non zero value to a avoid division by zero
|
||||
|
||||
const float mission_throttle = _param_throttle_cruise.get();
|
||||
@@ -436,10 +436,10 @@ RoverPositionControl::Run()
|
||||
|
||||
// local -> global
|
||||
_global_local_proj_ref.reproject(
|
||||
_trajectory_setpoint.x, _trajectory_setpoint.y,
|
||||
_trajectory_setpoint.position[0], _trajectory_setpoint.position[1],
|
||||
_pos_sp_triplet.current.lat, _pos_sp_triplet.current.lon);
|
||||
|
||||
_pos_sp_triplet.current.alt = _global_local_alt0 - _trajectory_setpoint.z;
|
||||
_pos_sp_triplet.current.alt = _global_local_alt0 - _trajectory_setpoint.position[2];
|
||||
_pos_sp_triplet.current.valid = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user