mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 20:53:33 +08:00
Navigator: Leverage overlapping fields in logic to save RAM by makeing them overlap in memory as well
This commit is contained in:
committed by
Lorenz Meier
parent
4160b65edb
commit
5899ce715d
@@ -100,26 +100,34 @@ enum ORIGIN {
|
|||||||
*/
|
*/
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct mission_item_s {
|
struct mission_item_s {
|
||||||
bool altitude_is_relative; /**< true if altitude is relative from start point */
|
|
||||||
double lat; /**< latitude in degrees */
|
double lat; /**< latitude in degrees */
|
||||||
double lon; /**< longitude in degrees */
|
double lon; /**< longitude in degrees */
|
||||||
float altitude; /**< altitude in meters (AMSL) */
|
union {
|
||||||
float yaw; /**< in radians NED -PI..+PI, NAN means don't change yaw */
|
struct {
|
||||||
float loiter_radius; /**< loiter radius in meters, 0 for a VTOL to hover */
|
union {
|
||||||
int8_t loiter_direction; /**< 1: positive / clockwise, -1, negative. */
|
float time_inside; /**< time that the MAV should stay inside the radius before advancing in seconds */
|
||||||
bool loiter_exit_xtrack; /**< exit xtrack location: 0 for center of loiter wp, 1 for exit location */
|
float pitch_min; /**< minimal pitch angle for fixed wing takeoff waypoints */
|
||||||
enum NAV_CMD nav_cmd; /**< navigation command */
|
};
|
||||||
float acceptance_radius; /**< default radius in which the mission is accepted as reached in meters */
|
float acceptance_radius; /**< default radius in which the mission is accepted as reached in meters */
|
||||||
float time_inside; /**< time that the MAV should stay inside the radius before advancing in seconds */
|
float loiter_radius; /**< loiter radius in meters, 0 for a VTOL to hover */
|
||||||
float pitch_min; /**< minimal pitch angle for fixed wing takeoff waypoints */
|
float yaw; /**< in radians NED -PI..+PI, NAN means don't change yaw */
|
||||||
bool autocontinue; /**< true if next waypoint should follow after this one */
|
float ___lat_float; /**< padding */
|
||||||
unsigned origin; /**< where the waypoint has been generated */
|
float ___lon_float; /**< padding */
|
||||||
int do_jump_mission_index; /**< index where the do jump will go to */
|
float altitude; /**< altitude in meters (AMSL) */
|
||||||
unsigned do_jump_repeat_count; /**< how many times do jump needs to be done */
|
};
|
||||||
unsigned do_jump_current_count; /**< count how many times the jump has been done */
|
float params[7]; /**< array to store mission command values for MAV_FRAME_MISSION ***/
|
||||||
float params[7]; /**< array to store mission command values for MAV_FRAME_MISSION ***/
|
};
|
||||||
int8_t frame; /**< mission frame ***/
|
enum NAV_CMD nav_cmd; /**< navigation command */
|
||||||
bool force_heading; /**< heading needs to be reached ***/
|
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. */
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
#include <uORB/topics/mission.h>
|
#include <uORB/topics/mission.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user