Classes |
struct | conf_t |
| Configuration structure. More...
|
Public Member Functions |
| State (Mavlink_stream &mavlink_stream_, Battery &battery, conf_t config=default_config()) |
| Constructor.
|
void | switch_to_active_mode (mav_state_t *mav_state_) |
| Makes the switch to active mode.
|
void | connection_status () |
| Check the connection status with the GND station.
|
bool | set_armed (bool arming) |
| tries to arm/disarm; checks performed for arming
|
bool | is_armed () const |
| returns whether armed
|
bool | is_manual () const |
| returns whether in manual mode
|
bool | is_hil () const |
| returns whether in hil mode
|
bool | is_stabilize () const |
| returns whether in stabilize mode
|
bool | is_guided () const |
| returns whether in guided mode
|
bool | is_auto () const |
| returns whether in auto mode
|
bool | is_custom () const |
| returns whether in custom mode
|
bool | is_test () const |
| returns whether in test mode
|
Mav_mode | mav_mode () const |
| returns mav_mode (copy)
|
Static Public Member Functions |
static conf_t | default_config () |
| Default configuration for quadrotor.
|
static conf_t | wing_default_config () |
| Default configuration for wing.
|
Public Attributes |
mav_state_t | mav_state_ |
| The value of the MAV state.
|
Mav_mode | mav_mode_ |
| The value of the MAV mode.
|
Mav_mode::custom_mode_t | mav_mode_custom |
| The value of the custom_mode.
|
uint8_t | autopilot_type |
| The type of the autopilot (MAV_TYPE enum in common.h)
|
uint8_t | autopilot_name |
| The name of the autopilot (MAV_AUTOPILOT enum in common.h)
|
uint32_t | sensor_present |
| The type of sensors that are present on the autopilot (Value of 0: not present. Value of 1: present. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control)
|
uint32_t | sensor_enabled |
| The sensors enabled on the autopilot (Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control)
|
uint32_t | sensor_health |
| The health of sensors present on the autopilot (Value of 0: not enabled. Value of 1: enabled. Indices: 0: 3D gyro, 1: 3D acc, 2: 3D mag, 3: absolute pressure, 4: differential pressure, 5: GPS, 6: optical flow, 7: computer vision position, 8: laser based position, 9: external ground-truth (Vicon or Leica). Controllers: 10: 3D angular rate control 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control, 15: motor outputs / control)
|
bool | out_of_safety_geofence |
| Flag to tell whether we are out the first fence or not.
|
bool | out_of_emergency_geofence |
| Flag to tell whether we are out the second fence or not.
|
bool | reset_position |
| Flag to enable the reset of the position estimation.
|
double | last_heartbeat_msg |
| Time of reception of the last heartbeat message from the ground station.
|
double | max_lost_connection |
| Maximum time without reception of a heartbeat message from the ground station.
|
uint32_t | msg_count |
| Number of heartbeat message received from the Ground station.
|
bool | connection_lost |
| Flag to tell if we have connection with the GND station or not.
|
bool | first_connection_set |
| Flag to tell that we received a first message from the GND station.
|
Battery & | battery_ |
| Pointer to battery structure.
|
Friends |
class | State_machine |
bool | state_telemetry_set_mode (State *state, Mav_mode mav_mode) |
mav_result_t | state_telemetry_send_autopilot_capabilities (State *state, const mavlink_command_long_t *packet) |
| Callback to the command 520 MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES.
|