aboutsummaryrefslogtreecommitdiff
path: root/apps/uORB/topics/vehicle_status.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-12-27 18:27:08 +0100
committerLorenz Meier <lm@inf.ethz.ch>2012-12-27 18:27:08 +0100
commitf5bad08bd0f4e0f6506deeac9d369b2b9c2d9e32 (patch)
tree9da695a79082b70360260c669f27ff8fa4470b35 /apps/uORB/topics/vehicle_status.h
parent61d7e1d28552ddd7652b1d1b888c51a2eae78967 (diff)
downloadpx4-firmware-f5bad08bd0f4e0f6506deeac9d369b2b9c2d9e32.tar.gz
px4-firmware-f5bad08bd0f4e0f6506deeac9d369b2b9c2d9e32.tar.bz2
px4-firmware-f5bad08bd0f4e0f6506deeac9d369b2b9c2d9e32.zip
Cleaned up control mode state machine / flight mode / navigation state machine still needs a bit cleaning up
Diffstat (limited to 'apps/uORB/topics/vehicle_status.h')
-rw-r--r--apps/uORB/topics/vehicle_status.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/apps/uORB/topics/vehicle_status.h b/apps/uORB/topics/vehicle_status.h
index 738ca644f..ed3fed1ab 100644
--- a/apps/uORB/topics/vehicle_status.h
+++ b/apps/uORB/topics/vehicle_status.h
@@ -87,16 +87,23 @@ enum VEHICLE_MODE_FLAG {
}; /**< Same as MAV_MODE_FLAG of MAVLink 1.0 protocol */
enum VEHICLE_FLIGHT_MODE {
- VEHICLE_FLIGHT_MODE_MANUAL = 0, /**< direct manual control, same as VEHICLE_FLIGHT_MODE_ATTITUDE for multirotors */
- VEHICLE_FLIGHT_MODE_ATTITUDE, /**< attitude or rate stabilization, as defined by VEHICLE_ATTITUDE_MODE */
- VEHICLE_FLIGHT_MODE_STABILIZED, /**< attitude or rate stabilization plus velocity or position stabilization */
- VEHICLE_FLIGHT_MODE_AUTO /**< attitude or rate stabilization plus absolute position control and waypoints */
+ VEHICLE_FLIGHT_MODE_MANUAL = 0, /**< direct manual control, exact mode determined by VEHICLE_MANUAL_CONTROL_MODE */
+ VEHICLE_FLIGHT_MODE_STAB, /**< attitude or rate stabilization plus velocity or position stabilization */
+ VEHICLE_FLIGHT_MODE_HOLD, /**< hold current position (hover or loiter around position when switched) */
+ VEHICLE_FLIGHT_MODE_AUTO /**< attitude or rate stabilization plus absolute position control and waypoints */
};
-enum VEHICLE_ATTITUDE_MODE {
- VEHICLE_ATTITUDE_MODE_DIRECT, /**< no attitude control, direct stick input mixing (only fixed wing) */
- VEHICLE_ATTITUDE_MODE_RATES, /**< body rates control mode */
- VEHICLE_ATTITUDE_MODE_ATTITUDE /**< tait-bryan attitude control mode */
+enum VEHICLE_MANUAL_CONTROL_MODE {
+ VEHICLE_MANUAL_CONTROL_MODE_DIRECT = 0, /**< no attitude control, direct stick input mixing (only fixed wing) */
+ VEHICLE_MANUAL_CONTROL_MODE_RATES, /**< body rates control mode */
+ VEHICLE_MANUAL_CONTROL_MODE_SAS /**< stability augmented system (SAS) mode */
+};
+
+enum VEHICLE_MANUAL_SAS_MODE {
+ VEHICLE_MANUAL_SAS_MODE_ROLL_PITCH_ABS_YAW_ABS = 0, /**< roll, pitch and yaw absolute */
+ VEHICLE_MANUAL_SAS_MODE_ROLL_PITCH_ABS_YAW_RATE, /**< roll and pitch absolute, yaw rate */
+ VEHICLE_MANUAL_SAS_MODE_SIMPLE, /**< simple mode (includes altitude hold) */
+ VEHICLE_MANUAL_SAS_MODE_ALTITUDE /**< altitude hold */
};
/**
@@ -115,12 +122,10 @@ struct vehicle_status_s
commander_state_machine_t state_machine; /**< current flight state, main state machine */
enum VEHICLE_FLIGHT_MODE flight_mode; /**< current flight mode, as defined by mode switch */
- enum VEHICLE_ATTITUDE_MODE attitute_mode; /**< current attitude control mode, as defined by VEHICLE_ATTITUDE_MODE enum */
+ enum VEHICLE_MANUAL_CONTROL_MODE manual_control_mode; /**< current attitude control mode, as defined by VEHICLE_ATTITUDE_MODE enum */
+ enum VEHICLE_MANUAL_SAS_MODE manual_sas_mode; /**< current stabilization mode */
int32_t system_type; /**< system type, inspired by MAVLinks MAV_TYPE enum */
- // uint8_t mode;
-
-
/* system flags - these represent the state predicates */
bool flag_system_armed; /**< true is motors / actuators are armed */
@@ -165,11 +170,11 @@ struct vehicle_status_s
uint16_t errors_count3;
uint16_t errors_count4;
-// bool remote_manual; /**< set to true by the commander when the manual-switch on the remote is set to manual */
bool flag_global_position_valid; /**< set to true by the commander app if the quality of the gps signal is good enough to use it in the position estimator */
bool flag_local_position_valid;
bool flag_vector_flight_mode_ok; /**< position estimation, battery voltage and other critical subsystems are good for autonomous flight */
- bool flag_external_manual_override_ok;
+ bool flag_external_manual_override_ok; /**< external override non-fatal for system. Only true for fixed wing */
+ bool flag_valid_launch_position; /**< indicates a valid launch position */
};
/**