mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 00:53:34 +08:00
Fix confusion between trajectory_setpoint and vehicle_local_postion_setpoint
This commit is contained in:
committed by
Daniel Agar
parent
7c237fca74
commit
75c63aee2a
@@ -3,9 +3,7 @@
|
||||
#include <lib/geo/geo.h>
|
||||
|
||||
constexpr uint64_t FlightTask::_timeout;
|
||||
// First index of empty_setpoint corresponds to time-stamp and requires a finite number.
|
||||
const trajectory_setpoint_s FlightTask::empty_setpoint = {0, {NAN, NAN, NAN}, {NAN, NAN, NAN}, {NAN, NAN, NAN}, {NAN, NAN, NAN}, NAN, NAN};
|
||||
|
||||
const trajectory_setpoint_s FlightTask::empty_trajectory_setpoint = {0, {NAN, NAN, NAN}, {NAN, NAN, NAN}, {NAN, NAN, NAN}, {NAN, NAN, NAN}, NAN, NAN};
|
||||
const vehicle_constraints_s FlightTask::empty_constraints = {0, NAN, NAN, false, {}};
|
||||
const landing_gear_s FlightTask::empty_landing_gear_default_keep = {0, landing_gear_s::GEAR_KEEP, {}};
|
||||
|
||||
@@ -21,7 +19,7 @@ bool FlightTask::activate(const trajectory_setpoint_s &last_setpoint)
|
||||
void FlightTask::reActivate()
|
||||
{
|
||||
// Preserve vertical velocity while on the ground to allow descending by stick for reliable land detection
|
||||
trajectory_setpoint_s setpoint_preserve_vertical{empty_setpoint};
|
||||
trajectory_setpoint_s setpoint_preserve_vertical{empty_trajectory_setpoint};
|
||||
setpoint_preserve_vertical.velocity[2] = _velocity_setpoint(2);
|
||||
activate(setpoint_preserve_vertical);
|
||||
}
|
||||
|
||||
@@ -138,10 +138,9 @@ public:
|
||||
const vehicle_trajectory_waypoint_s &getAvoidanceWaypoint() { return _desired_waypoint; }
|
||||
|
||||
/**
|
||||
* Empty setpoint.
|
||||
* All setpoints are set to NAN.
|
||||
* All setpoints are set to NAN (uncontrolled). Timestampt zero.
|
||||
*/
|
||||
static const trajectory_setpoint_s empty_setpoint;
|
||||
static const trajectory_setpoint_s empty_trajectory_setpoint;
|
||||
|
||||
/**
|
||||
* Empty constraints.
|
||||
|
||||
Reference in New Issue
Block a user