mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 00:53:34 +08:00
navigator / mission item: Compress fields into bitfield
This commit is contained in:
committed by
Lorenz Meier
parent
5899ce715d
commit
9821499113
@@ -109,7 +109,7 @@ struct mission_item_s {
|
||||
float pitch_min; /**< minimal pitch angle for fixed wing takeoff waypoints */
|
||||
};
|
||||
float acceptance_radius; /**< default radius in which the mission is accepted as reached in meters */
|
||||
float loiter_radius; /**< loiter radius in meters, 0 for a VTOL to hover */
|
||||
float loiter_radius; /**< loiter radius in meters, 0 for a VTOL to hover, negative for counter-clockwise */
|
||||
float yaw; /**< in radians NED -PI..+PI, NAN means don't change yaw */
|
||||
float ___lat_float; /**< padding */
|
||||
float ___lon_float; /**< padding */
|
||||
@@ -117,17 +117,18 @@ struct mission_item_s {
|
||||
};
|
||||
float params[7]; /**< array to store mission command values for MAV_FRAME_MISSION ***/
|
||||
};
|
||||
enum NAV_CMD nav_cmd; /**< navigation command */
|
||||
uint16_t nav_cmd; /**< navigation command */
|
||||
int16_t do_jump_mission_index; /**< index where the do jump will go to */
|
||||
uint16_t do_jump_repeat_count; /**< how many times do jump needs to be done */
|
||||
uint16_t do_jump_current_count; /**< count how many times the jump has been done */
|
||||
uint16_t origin; /**< where the waypoint has been generated */
|
||||
bool loiter_exit_xtrack; /**< exit xtrack location: 0 for center of loiter wp, 1 for exit location */
|
||||
bool force_heading; /**< heading needs to be reached ***/
|
||||
bool altitude_is_relative; /**< true if altitude is relative from start point */
|
||||
bool autocontinue; /**< true if next waypoint should follow after this one */
|
||||
int8_t frame; /**< mission frame ***/
|
||||
int8_t loiter_direction; /**< 1: positive / clockwise, -1, negative. */
|
||||
struct {
|
||||
uint16_t frame : 4, /**< mission frame ***/
|
||||
origin : 3, /**< how the mission item was generated */
|
||||
loiter_exit_xtrack : 1, /**< exit xtrack location: 0 for center of loiter wp, 1 for exit location */
|
||||
force_heading : 1, /**< heading needs to be reached ***/
|
||||
altitude_is_relative : 1, /**< true if altitude is relative from start point */
|
||||
autocontinue : 1; /**< true if next waypoint should follow after this one */
|
||||
};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
#include <uORB/topics/mission.h>
|
||||
|
||||
Reference in New Issue
Block a user