vehicle_local_position_setpoint: make acceleration and jerk arrays

This commit is contained in:
Matthias Grob
2019-10-22 16:41:52 +02:00
parent 0062390c46
commit 9c25b987bc
9 changed files with 25 additions and 41 deletions
+6 -6
View File
@@ -3259,9 +3259,9 @@ protected:
msg.vz = lpos_sp.vz;
// acceleration
msg.afx = lpos_sp.acc_x;
msg.afy = lpos_sp.acc_y;
msg.afz = lpos_sp.acc_z;
msg.afx = lpos_sp.acceleration[0];
msg.afy = lpos_sp.acceleration[1];
msg.afz = lpos_sp.acceleration[2];
// yaw
msg.yaw = lpos_sp.yaw;
@@ -3343,9 +3343,9 @@ protected:
msg.vx = pos_sp.vx;
msg.vy = pos_sp.vy;
msg.vz = pos_sp.vz;
msg.afx = pos_sp.acc_x;
msg.afy = pos_sp.acc_y;
msg.afz = pos_sp.acc_z;
msg.afx = pos_sp.acceleration[0];
msg.afy = pos_sp.acceleration[1];
msg.afz = pos_sp.acceleration[2];
mavlink_msg_position_target_local_ned_send_struct(_mavlink->get_channel(), &msg);
@@ -69,7 +69,7 @@ bool PositionControl::updateSetpoint(const vehicle_local_position_setpoint_s &se
_pos_sp = Vector3f(setpoint.x, setpoint.y, setpoint.z);
_vel_sp = Vector3f(setpoint.vx, setpoint.vy, setpoint.vz);
_acc_sp = Vector3f(setpoint.acc_x, setpoint.acc_y, setpoint.acc_z);
_acc_sp = Vector3f(setpoint.acceleration);
_thr_sp = Vector3f(setpoint.thrust);
_yaw_sp = setpoint.yaw;
_yawspeed_sp = setpoint.yawspeed;
@@ -1027,7 +1027,7 @@ MulticopterPositionControl::reset_setpoint_to_nan(vehicle_local_position_setpoin
setpoint.x = setpoint.y = setpoint.z = NAN;
setpoint.vx = setpoint.vy = setpoint.vz = NAN;
setpoint.yaw = setpoint.yawspeed = NAN;
setpoint.acc_x = setpoint.acc_y = setpoint.acc_z = NAN;
setpoint.acceleration[0] = setpoint.acceleration[1] = setpoint.acceleration[2] = NAN;
setpoint.thrust[0] = setpoint.thrust[1] = setpoint.thrust[2] = NAN;
}