45enum class SubscriptionType {
176 TRANSITION_TO_FIXED_WING,
177 TRANSITION_TO_MULTICOPTER,
194 Eigen::Matrix<float, 6, 1>
aux;
267template <SubscriptionType S,
typename DataType>
268class SubscriptionImpl;
270class SystemStateImpl;
282template <SubscriptionType S,
typename DataType>
285 Subscription(
const std::shared_ptr<SubscriptionImpl<S, DataType>>& impl);
295 void onUpdate(std::function<
void(DataType)> callback);
322 std::shared_ptr<SubscriptionImpl<S, DataType>> _impl;
387 SystemState& subscribeAttitude(std::function<
void(Eigen::Quaternionf)> callback =
nullptr) {
402 SystemState& subscribeArmed(std::function<
void(
bool)> callback =
nullptr) {
407 SystemState& subscribeSystemId(std::function<
void(uint8_t)> callback =
nullptr) {
437 SystemState& subscribeWind(std::function<
void(
Wind)> callback =
nullptr) {
458 std::shared_ptr<SystemStateImpl> _impl;
SDK execution class. All callbacks are called on the same thread.
Definition auterion.hpp:133
A template class for managing subscriptions to data coming from the vehicle.
Definition system_state.hpp:283
void subscribe(std::function< void(DataType)> callback)
Activates the subscription process and registers a callback function if provided.
bool isLastValid() const
Checks if the last received data is valid.
DataType last() const
Retrieves the last received data.
void onUpdate(std::function< void(DataType)> callback)
Regsiters a callback function to be called when the data is updated.
Provides access to the system's state, including flight controller telemetry.
Definition system_state.hpp:355
VtolState
Represents the VTOL state.
Definition system_state.hpp:174
Represents validated airspeed.
Definition system_state.hpp:256
std::optional< float > true_airspeed_m_s
Definition system_state.hpp:261
std::optional< float > calibrated_airspeed_m_s
Definition system_state.hpp:259
std::optional< float > indicated_airspeed_m_s
Definition system_state.hpp:258
Represents angular rates and accelerations in the FLU body frame.
Definition system_state.hpp:128
Eigen::Vector3f angular_acceleration_flu_rad_s
Definition system_state.hpp:130
Eigen::Vector3f angular_velocity_flu_rad_s
Definition system_state.hpp:129
Represents the status of the battery.
Definition system_state.hpp:158
float discharged_mah
Definition system_state.hpp:162
float remaining
Definition system_state.hpp:163
float voltage_v
Definition system_state.hpp:159
int cell_count
Definition system_state.hpp:165
Eigen::VectorXf cell_voltage_v
Definition system_state.hpp:166
float current_a
Definition system_state.hpp:160
Represents global position using latitude, longitude, and altitude.
Definition system_state.hpp:92
double longitude_deg
Definition system_state.hpp:94
Eigen::Vector3d toEigenVector() const
Converts the global position to an Eigen vector.
Definition system_state.hpp:102
double altitude_amsl_m
Definition system_state.hpp:95
double latitude_deg
Definition system_state.hpp:93
Represents the home position in both local ENU and global coordinates.
Definition system_state.hpp:140
bool was_set_manually
Definition system_state.hpp:149
double yaw
Definition system_state.hpp:143
bool global_position_valid
Definition system_state.hpp:146
bool local_position_valid
Definition system_state.hpp:147
bool altitude_valid
Definition system_state.hpp:145
Eigen::Vector3f local_position_enu_m
Definition system_state.hpp:141
GlobalPosition global_position
Definition system_state.hpp:142
Represents landed state of the vehicle.
Definition system_state.hpp:230
bool in_descend
Definition system_state.hpp:232
Represents local position, velocity, and acceleration in the ENU coordinate system.
Definition system_state.hpp:70
bool horizontal_position_valid
Definition system_state.hpp:79
bool horizontal_velocity_valid
Definition system_state.hpp:81
bool vertical_velocity_valid
Definition system_state.hpp:82
double heading
Definition system_state.hpp:75
Eigen::Vector3f velocity_enu_m
Definition system_state.hpp:72
Eigen::Vector3f acceleration_enu_m
Definition system_state.hpp:73
Eigen::Vector3f position_enu_m
Definition system_state.hpp:71
bool dist_bottom_valid
Definition system_state.hpp:83
bool vertical_position_valid
Definition system_state.hpp:80
double unaided_heading
Definition system_state.hpp:76
The vehicle's navigation state (flight mode)
Definition system_state.hpp:207
bool external_mode
Definition system_state.hpp:210
uint8_t nav_state
Definition system_state.hpp:209
Represents odometry data including attitude and angular rates.
Definition system_state.hpp:113
Eigen::Vector3f velocity
Definition system_state.hpp:117
uint64_t timestamp_sample_us
Definition system_state.hpp:118
Eigen::Vector3f position
Definition system_state.hpp:116
Eigen::Vector3f angular_velocity
Definition system_state.hpp:115
Eigen::Quaternionf attitude
Definition system_state.hpp:114
Represents wind speed and direction.
Definition system_state.hpp:241
float windspeed_north
Definition system_state.hpp:242
std::optional< float > variance_east
Definition system_state.hpp:246
float windspeed_east
Definition system_state.hpp:243
std::optional< float > variance_north
Definition system_state.hpp:244