mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 02:03:33 +08:00
ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters (#13249)
* Conversions lib: add quaternion getter * vehicle_status: add flag is_vtol_tailsitter * ATTITUDE_QUATERNION: fill repr_offset_q for tailsitters
This commit is contained in:
committed by
Julian Oes
parent
380cae18d1
commit
8f910f8435
@@ -1378,6 +1378,7 @@ Commander::run()
|
||||
}
|
||||
|
||||
status.is_vtol = is_vtol(&status);
|
||||
status.is_vtol_tailsitter = is_vtol_tailsitter(&status);
|
||||
|
||||
commander_boot_timestamp = hrt_absolute_time();
|
||||
|
||||
@@ -1498,6 +1499,7 @@ Commander::run()
|
||||
|
||||
/* set vehicle_status.is_vtol flag */
|
||||
status.is_vtol = is_vtol(&status);
|
||||
status.is_vtol_tailsitter = is_vtol_tailsitter(&status);
|
||||
|
||||
/* check and update system / component ID */
|
||||
int32_t sys_id = 0;
|
||||
|
||||
@@ -110,6 +110,12 @@ bool is_vtol(const struct vehicle_status_s *current_status)
|
||||
current_status->system_type == VEHICLE_TYPE_VTOL_RESERVED5);
|
||||
}
|
||||
|
||||
bool is_vtol_tailsitter(const struct vehicle_status_s *current_status)
|
||||
{
|
||||
return (current_status->system_type == VEHICLE_TYPE_VTOL_DUOROTOR ||
|
||||
current_status->system_type == VEHICLE_TYPE_VTOL_QUADROTOR);
|
||||
}
|
||||
|
||||
bool is_fixed_wing(const struct vehicle_status_s *current_status)
|
||||
{
|
||||
return current_status->system_type == VEHICLE_TYPE_FIXED_WING;
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
bool is_multirotor(const struct vehicle_status_s *current_status);
|
||||
bool is_rotary_wing(const struct vehicle_status_s *current_status);
|
||||
bool is_vtol(const struct vehicle_status_s *current_status);
|
||||
bool is_vtol_tailsitter(const struct vehicle_status_s *current_status);
|
||||
bool is_fixed_wing(const struct vehicle_status_s *current_status);
|
||||
bool is_ground_rover(const struct vehicle_status_s *current_status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user