Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
rotwing_state.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
3  *
4  * This file is part of paparazzi
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
31 
33 #include "modules/core/abi.h"
34 
35 // Quad state identification
36 #ifndef ROTWING_MIN_SKEW_ANGLE_DEG_QUAD
37 #define ROTWING_MIN_SKEW_ANGLE_DEG_QUAD 10.0
38 #endif
39 #ifndef ROTWING_MIN_SKEW_ANGLE_COUNTER
40 #define ROTWING_MIN_SKEW_ANGLE_COUNTER 10 // Minimum number of loops the skew angle is below ROTWING_MIN_SKEW_ANGLE_COUNTER
41 #endif
42 
43 // Skewing state identification
44 #ifndef ROTWING_SKEWING_COUNTER
45 #define ROTWING_SKEWING_COUNTER 10 // Minimum number of loops the skew angle is in between QUAD and FW
46 #endif
47 
48 // maximum quad airspeed to force quad state
49 #ifndef ROTWING_MAX_QUAD_AIRSPEED
50 #define ROTWING_MAX_QUAD_AIRSPEED 20.0
51 #endif
52 
53 // Half skew state identification
54 #ifndef ROTWING_HALF_SKEW_ANGLE_DEG
55 #define ROTWING_HALF_SKEW_ANGLE_DEG 55.0
56 #endif
57 #ifndef ROTWING_HALF_SKEW_ANGLE_RANG
58 #define ROTWING_HALF_SKEW_ANGLE_HALF_RANGE 10.0
59 #endif
60 #ifndef ROTWING_HALF_SKEW_COUNTER
61 #define ROTWING_HALF_SKEW_COUNTER 10 // Minimum number of loops the skew angle is at HALF_SKEW_ANGLE_DEG +/- ROTWING_HALF_SKEW_ANGLE_HALF_RANGE to trigger ROTWING_HALF_SKEW_ANGLE state
62 #endif
63 
64 // FW state identification
65 #ifndef ROTWING_MIN_FW_SKEW_ANGLE_DEG
66 #define ROTWING_MIN_FW_SKEW_ANGLE_DEG 80.0 // Minimum wing angle to fly in fixed wing state
67 #endif
68 #ifndef ROTWING_MIN_FW_COUNTER
69 #define ROTWING_MIN_FW_COUNTER 10 // Minimum number of loops the skew angle is above the MIN_FW_SKEW_ANGLE
70 #endif
71 
72 // FW idle state identification
73 #ifndef ROTWING_MIN_THRUST_IDLE
74 #define ROTWING_MIN_THRUST_IDLE 100
75 #endif
76 #ifndef ROTWING_MIN_THRUST_IDLE_COUNTER
77 #define ROTWING_MIN_THRUST_IDLE_COUNTER 10
78 #endif
79 
80 // FW hov mot off state identification
81 #ifndef ROTWING_HOV_MOT_OFF_RPM_TH
82 #define ROTWING_HOV_MOT_OFF_RPM_TH 50
83 #endif
84 #ifndef ROTWING_HOV_MOT_OFF_COUNTER
85 #define ROTWING_HOV_MOT_OFF_COUNTER 10
86 #endif
87 
88 #ifndef ROTWING_STATE_USE_ROTATION_REF_MODEL
89 #define ROTWING_STATE_USE_ROTATION_REF_MODEL FALSE
90 #endif
91 
92 
93 // Hover preferred pitch (deg)
94 #ifndef ROTWING_STATE_HOVER_PREF_PITCH
95 #define ROTWING_STATE_HOVER_PREF_PITCH 0.0
96 #endif
97 
98 // Transition preffered pitch (deg)
99 #ifndef ROTWING_STATE_TRANSITION_PREF_PITCH
100 #define ROTWING_STATE_TRANSITION_PREF_PITCH 3.0
101 #endif
102 
103 // Forward preffered pitch (deg)
104 #ifndef ROTWING_STATE_FW_PREF_PITCH
105 #define ROTWING_STATE_FW_PREF_PITCH 8.0
106 #endif
107 
110 #ifndef ROTWING_STATE_ACT_FEEDBACK_ID
111 #define ROTWING_STATE_ACT_FEEDBACK_ID ABI_BROADCAST
112 #endif
114 static void rotwing_state_feedback_cb(uint8_t sender_id, struct act_feedback_t *feedback_msg, uint8_t num_act);
115 #define ROTWING_STATE_NUM_HOVER_RPM 4
117 
121 
127 
129 
132 
133 
134 inline void rotwing_check_set_current_state(void);
135 inline void rotwing_switch_state(void);
136 
137 inline void rotwing_state_set_hover_settings(void);
138 inline void rotwing_state_set_skewing_settings(void);
139 inline void rotwing_state_set_fw_settings(void);
142 
143 inline void rotwing_state_set_state_settings(void);
144 inline void rotwing_state_skewer(void);
145 
146 inline void guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle);
147 
148 #if PERIODIC_TELEMETRY
150 static void send_rotating_wing_state(struct transport_tx *trans, struct link_device *dev)
151 {
152  uint16_t adc_dummy = 0;
153  pprz_msg_send_ROTATING_WING_STATE(trans, dev, AC_ID,
158  &adc_dummy,
160 }
161 #endif // PERIODIC_TELEMETRY
162 
164 {
165  // Bind ABI messages
167 
168  // Start the drone in a desired hover state
171 
177 
178 #if PERIODIC_TELEMETRY
179  register_periodic_telemetry(DefaultPeriodic, PPRZ_MSG_ID_ROTATING_WING_STATE, send_rotating_wing_state);
180 #endif
181 }
182 
184 {
185  // Check and set the current state
187 
188  // Check and update desired state
191  } else if (guidance_h.mode == GUIDANCE_H_MODE_ATTITUDE) {
193  } else if (guidance_h.mode == GUIDANCE_H_MODE_FORWARD) {
195  }
196 
197  // Run the wing skewer
199 
200  //TODO: incorparate motor active / disbaling depending on called flight state
201  // Switch on motors if flight mode is attitude
204  } else if (guidance_h.mode == GUIDANCE_H_MODE_FORWARD) {
206  }
207 }
208 
209 // Function to request a state
211 {
214  }
215 }
216 
217 // Function to prefer configuration
219 {
220  switch (configuration) {
223  break;
226  break;
229  break;
230  }
231 }
232 
234 {
235  // if !in_flight, set state to hover
236  if (!autopilot.in_flight) {
243  return;
244  }
245 
246  // States can be checked according to wing angle sensor, setpoints .....
247  uint8_t prev_state = rotwing_state.current_state;
248  switch (prev_state) {
249  case ROTWING_STATE_HOVER:
250  // Check if state needs to be set to skewing
253  } else {
255  }
256 
257  // Switch state if necessary
261  }
262  break;
263 
265  // Check if state needs to be set to hover
268  } else {
270  }
271 
272  // Check if state needs to be set to fixed wing
275  } else {
277  }
278 
279  // Switch state if necessary
283  }
284 
288  }
289  break;
290 
291  case ROTWING_STATE_FW:
292  // Check if state needs to be set to skewing
295  } else {
297  }
298 
299  // Check if state needs to be set to fixed wing with hover motors idle (If hover thrust below threshold)
302  } else {
304  }
305 
306  // Switch state if necessary
316  }
317  break;
318 
320  // Check if state needs to be set to fixed wing with hover motors activated
321  if (stabilization_cmd[COMMAND_THRUST] > ROTWING_MIN_THRUST_IDLE
324  } else {
326  }
327 
328  // Check if state needs to be set to fixed wing with hover motors off (if zero rpm on hover motors)
329  if (rotwing_state_hover_rpm[0] == 0
330  && rotwing_state_hover_rpm[1] == 0
331  && rotwing_state_hover_rpm[2] == 0
332  && rotwing_state_hover_rpm[3] == 0) {
333 #if !USE_NPS
335 #endif
336  } else {
338  }
339 
340  // Switch state if necessary
346  && rotwing_state_fw_counter == 0) {
350  }
351  break;
352 
354  // Check if state needs to be set to fixed wing with hover motors idle (if rpm on hover motors)
360  } else {
362  }
363 
364  // Switch state if necessary
368  }
369  break;
370 
371  default:
372  break;
373  }
374 }
375 
376 // Function that handles settings for switching state(s)
378 {
379  switch (rotwing_state.current_state) {
380  case ROTWING_STATE_HOVER:
383  } else {
385  }
386  break;
387 
391  } else {
393  }
394  break;
395 
396  case ROTWING_STATE_FW:
401  } else {
403  }
404  break;
405 
411  } else {
413  }
414  break;
415 
419  } else {
421  }
422  break;
423  }
424 }
425 
427 {
438 }
439 
441 {
442  // Wing may be skewed to quad when desired state is hover and skewing settings set by state machine
445  } else {
447  }
455  rotwing_state_settings.nav_max_speed = 100; // Big as we use airspeed guidance
457 }
458 
460 {
469  rotwing_state_settings.nav_max_speed = 100; // Big as we use airspeed guidance
471 }
472 
474 {
483  rotwing_state_settings.nav_max_speed = 100; // Big as we use airspeed guidance
485 }
486 
488 {
497  rotwing_state_settings.nav_max_speed = 100; // Big as we use airspeed guidance
499 }
500 
502 {
503 
509  break;
512  break;
515  break;
516  }
517  } else {
519  }
520 
522 
524 
526 
528 
529  // TO DO: pitch angle now hard coded scheduled by wing angle
530 
531  // Stall protection handled by hover_motors_active boolean
532 
533  // TO DO: Climb and descend speeds now handled by guidance airspeed
534 }
535 
537 {
539  float wing_angle_scheduled_sp_deg = 0;
540  float airspeed = stateGetAirspeed_f();
541  if (airspeed < 8) {
542  wing_angle_scheduled_sp_deg = 0;
543  } else if (airspeed < 10 && (rotwing_state.desired_state > ROTWING_STATE_HOVER)) {
544  wing_angle_scheduled_sp_deg = 55;
545  } else if (airspeed > 10) {
546  wing_angle_scheduled_sp_deg = ((airspeed - 10.)) / 4. * 35. + 55.;
547  } else {
548  wing_angle_scheduled_sp_deg = 0;
549  }
550 
551  Bound(wing_angle_scheduled_sp_deg, 0., 90.)
552  rotwing_state_skewing.wing_angle_deg_sp = wing_angle_scheduled_sp_deg;
553  }
554 }
555 
557 {
558 
559  // calc rotation percentage of setpoint (0 deg = -1, 45 deg = 0, 90 deg = 1)
560  float wing_rotation_percentage = (rotwing_state_skewing.wing_angle_deg_sp - 45.) / 45.;
561  Bound(wing_rotation_percentage, -1., 1.);
562 
563  float servo_pprz_cmd = MAX_PPRZ * wing_rotation_percentage;
564  // Calulcate rotation_cmd
565  Bound(servo_pprz_cmd, -MAX_PPRZ, MAX_PPRZ);
566 
567 #if ROTWING_STATE_USE_ROTATION_REF_MODEL
568  // Rotate with second order filter
569  static float rotwing_state_skew_p_cmd = -MAX_PPRZ;
570  static float rotwing_state_skew_d_cmd = 0;
571  float speed_sp = 0.001 * (servo_pprz_cmd - rotwing_state_skew_p_cmd);
572  rotwing_state_skew_d_cmd += 0.003 * (speed_sp - rotwing_state_skew_d_cmd);
573  rotwing_state_skew_p_cmd += rotwing_state_skew_d_cmd;
574  Bound(rotwing_state_skew_p_cmd, -MAX_PPRZ, MAX_PPRZ);
575  rotwing_state_skewing.servo_pprz_cmd = rotwing_state_skew_p_cmd;
576 #else
577  // Directly controlling the wing rotation
579 #endif
580 
581 #if USE_NPS
582  // Export to the index of the SKEW in the NPS_ACTUATOR_NAMES array
583  actuators_pprz[INDI_NUM_ACT] = (rotwing_state_skewing.servo_pprz_cmd + MAX_PPRZ) / 2.; // Scale to simulation command
584 
585  // Simulate wing angle from command
587 
588  // SEND ABI Message to ctr_eff_sched and other modules that want Actuator position feedback
589  struct act_feedback_t feedback;
590  feedback.idx = SERVO_ROTATION_MECH_IDX;
591  feedback.position = 0.5 * M_PI - RadOfDeg(rotwing_state_skewing.wing_angle_deg);
592  feedback.set.position = true;
593 
594  // Send ABI message
595  AbiSendMsgACT_FEEDBACK(ACT_FEEDBACK_UAVCAN_ID, &feedback, 1);
596 #endif
597 }
598 
599 static void rotwing_state_feedback_cb(uint8_t __attribute__((unused)) sender_id,
600  struct act_feedback_t UNUSED *feedback_msg, uint8_t UNUSED num_act_message)
601 {
602  for (int i = 0; i < num_act_message; i++) {
603 
604  for (int i = 0; i < num_act_message; i++) {
605  // Check for wing rotation feedback
606  if ((feedback_msg[i].set.position) && (feedback_msg[i].idx == SERVO_ROTATION_MECH_IDX)) {
607  // Get wing rotation angle from sensor
608  float wing_angle_rad = 0.5 * M_PI - feedback_msg[i].position;
609  rotwing_state_skewing.wing_angle_deg = DegOfRad(wing_angle_rad);
610 
611  // Bound wing rotation angle
612  Bound(rotwing_state_skewing.wing_angle_deg, 0, 90.);
613  }
614  }
615 
616  // Sanity check that index is valid
617  int idx = feedback_msg[i].idx;
618  if (feedback_msg[i].set.rpm) {
619  if ((idx == SERVO_MOTOR_FRONT_IDX) || (idx == SERVO_BMOTOR_FRONT_IDX)) {
620  rotwing_state_hover_rpm[0] = feedback_msg->rpm;
621  } else if ((idx == SERVO_MOTOR_RIGHT_IDX) || (idx == SERVO_BMOTOR_RIGHT_IDX)) {
622  rotwing_state_hover_rpm[1] = feedback_msg->rpm;
623  } else if ((idx == SERVO_MOTOR_BACK_IDX) || (idx == SERVO_BMOTOR_BACK_IDX)) {
624  rotwing_state_hover_rpm[2] = feedback_msg->rpm;
625  } else if ((idx == SERVO_MOTOR_LEFT_IDX) || (idx == SERVO_BMOTOR_LEFT_IDX)) {
626  rotwing_state_hover_rpm[3] = feedback_msg->rpm;
627  }
628  }
629  }
630 }
631 
632 void guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle)
633 {
634  float pitch_priority_factor = 11.;
635  float roll_priority_factor = 10.;
636  float thrust_priority_factor = 7.;
637  float pusher_priority_factor = 30.;
638 
639  float horizontal_accel_weight = 10.;
640  float vertical_accel_weight = 10.;
641 
642  // Set weights
643  Wu_gih[0] = roll_priority_factor * 10.414;
644  Wu_gih[1] = pitch_priority_factor * 27.53;
645  Wu_gih[2] = thrust_priority_factor * 0.626;
646  Wu_gih[3] = pusher_priority_factor * 1.0;
647 
648  // adjust weights
649  float thrust_command = (actuator_state_filt_vect[0] + actuator_state_filt_vect[1] + actuator_state_filt_vect[2] +
650  actuator_state_filt_vect[3]) / 4;
651  Bound(thrust_command, 0, MAX_PPRZ);
652  float fixed_wing_percentage = !hover_motors_active; // TODO: when hover props go below 40%, ...
653  Bound(fixed_wing_percentage, 0, 1);
654 #define AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT 16
655 
656  Wv_gih[0] = horizontal_accel_weight * (1.0f + fixed_wing_percentage *
657  AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT); // stall n low hover motor_off (weight 16x more important than vertical weight)
658  Wv_gih[1] = horizontal_accel_weight;
659  Wv_gih[2] = vertical_accel_weight;
660 
661  struct FloatEulers eulers_zxy;
663 
664  // Evaluate motors_on boolean
665  if (!hover_motors_active) {
666  if (stateGetAirspeed_f() < 15.) {
667  hover_motors_active = true;
669  } else if (eulers_zxy.theta > RadOfDeg(15.0)) {
670  hover_motors_active = true;
672  }
673  } else {
675  }
676 
677  float du_min_thrust_z = ((MAX_PPRZ - actuator_state_filt_vect[0]) * g1g2[3][0] + (MAX_PPRZ -
680  Bound(du_min_thrust_z, -50., 0.);
681  float du_max_thrust_z = -(actuator_state_filt_vect[0] * g1g2[3][0] + actuator_state_filt_vect[1] * g1g2[3][1] +
683  Bound(du_max_thrust_z, 0., 50.);
684 
685  float roll_limit_rad = 2.0; // big roll limit hacked in to overcome wls problems at roll limit
686  float max_pitch_limit_rad = RadOfDeg(GUIDANCE_INDI_MAX_PITCH);
687  float min_pitch_limit_rad = RadOfDeg(GUIDANCE_INDI_MIN_PITCH);
688 
689  float scheduled_pitch_angle = 0;
690  float pitch_angle_range = 3.;
692  scheduled_pitch_angle = 0;
693  } else {
694  float pitch_progression = (rotwing_state_skewing.wing_angle_deg - 55) / 35.;
695  scheduled_pitch_angle = pitch_angle_range * pitch_progression;
696  }
697  if (!hover_motors_active) {
698  scheduled_pitch_angle = 8.;
699  }
700  Bound(scheduled_pitch_angle, -5., 8.);
701  guidance_indi_pitch_pref_deg = scheduled_pitch_angle;
702 
703  float pitch_pref_rad = RadOfDeg(guidance_indi_pitch_pref_deg);
704 
705  // Set lower limits
706  du_min_gih[0] = -roll_limit_rad - roll_angle; //roll
707  du_min_gih[1] = min_pitch_limit_rad - pitch_angle; // pitch
708  du_min_gih[2] = du_min_thrust_z;
709  du_min_gih[3] = (-actuator_state_filt_vect[8] * g1g2[4][8]);
710 
711  // Set upper limits limits
712  du_max_gih[0] = roll_limit_rad - roll_angle; //roll
713  du_max_gih[1] = max_pitch_limit_rad - pitch_angle; // pitch
714  du_max_gih[2] = du_max_thrust_z;
715  du_max_gih[3] = 9.0; // Hacky value to prevent drone from pitching down in transition
716 
717  // Set prefered states
718  du_pref_gih[0] = 0; // prefered delta roll angle
719  du_pref_gih[1] = -pitch_angle + pitch_pref_rad;// prefered delta pitch angle
720  du_pref_gih[2] = du_max_gih[2]; // Low thrust better for efficiency
721  du_pref_gih[3] = body_v[0]; // solve the body acceleration
722 }
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
Definition: abi_common.h:67
#define ACT_FEEDBACK_UAVCAN_ID
struct pprz_autopilot autopilot
Global autopilot structure.
Definition: autopilot.c:49
bool in_flight
in flight status
Definition: autopilot.h:70
uint8_t last_wp UNUSED
float theta
in radians
void float_eulers_of_quat_zxy(struct FloatEulers *e, struct FloatQuat *q)
euler rotation 'ZXY' This rotation order is useful if you need 90 deg pitch
euler angles
static struct FloatQuat * stateGetNedToBodyQuat_f(void)
Get vehicle body attitude quaternion (float).
Definition: state.h:1131
struct State state
Definition: state.c:36
static float stateGetAirspeed_f(void)
Get airspeed (float).
Definition: state.h:1407
struct FloatVect3 speed_sp
Definition: guidance_indi.c:77
bool force_forward
forward flight for hybrid nav
float guidance_indi_pitch_pref_deg
struct FloatEulers eulers_zxy
state eulers in zxy order
A guidance mode based on Incremental Nonlinear Dynamic Inversion Come to ICRA2016 to learn more!
#define GUIDANCE_INDI_MAX_PITCH
#define GUIDANCE_INDI_MIN_PITCH
Hardware independent API for actuators (servos, motor controllers).
uint8_t idx
General index of the actuators (generated in airframe.h)
Definition: actuators.h:45
float nav_max_speed
Specific navigation functions for hybrid aircraft.
static uint32_t idx
#define MAX_PPRZ
Definition: paparazzi.h:8
Rotorcraft specific autopilot interface and initialization.
struct HorizontalGuidance guidance_h
Definition: guidance_h.c:50
#define GUIDANCE_H_MODE_FORWARD
Definition: guidance_h.h:63
#define GUIDANCE_H_MODE_NAV
Definition: guidance_h.h:60
#define GUIDANCE_H_MODE_ATTITUDE
Definition: guidance_h.h:58
void init_rotwing_state(void)
static void rotwing_state_feedback_cb(uint8_t sender_id, struct act_feedback_t *feedback_msg, uint8_t num_act)
struct RotWingStateSettings rotwing_state_settings
void rotwing_state_set_fw_settings(void)
void rotwing_switch_state(void)
#define ROTWING_MIN_SKEW_ANGLE_COUNTER
Definition: rotwing_state.c:40
#define ROTWING_MIN_FW_SKEW_ANGLE_DEG
Definition: rotwing_state.c:66
void rotwing_state_skew_actuator_periodic(void)
#define ROTWING_MIN_FW_COUNTER
Definition: rotwing_state.c:69
void request_rotwing_state(uint8_t state)
void rotwing_state_set_state_settings(void)
#define ROTWING_MAX_QUAD_AIRSPEED
Definition: rotwing_state.c:50
#define ROTWING_MIN_THRUST_IDLE
Definition: rotwing_state.c:74
struct RotwingState rotwing_state
uint8_t rotwing_state_hover_counter
#define ROTWING_HOV_MOT_OFF_RPM_TH
Definition: rotwing_state.c:82
float rotwing_state_max_hover_speed
struct RotWingStateSkewing rotwing_state_skewing
#define ROTWING_MIN_THRUST_IDLE_COUNTER
Definition: rotwing_state.c:77
uint8_t rotwing_state_fw_idle_counter
uint8_t rotwing_state_skewing_counter
uint8_t rotwing_state_fw_counter
#define ROTWING_STATE_NUM_HOVER_RPM
bool bool_disable_hover_motors
#define AIRSPEED_IMPORTANCE_IN_FORWARD_WEIGHT
void rotwing_state_set_fw_hov_mot_off_settings(void)
int32_t rotwing_state_hover_rpm[ROTWING_STATE_NUM_HOVER_RPM]
uint8_t rotwing_state_fw_m_off_counter
void rotwing_state_set_skewing_settings(void)
void rotwing_check_set_current_state(void)
void rotwing_state_skewer(void)
void rotwing_state_set_hover_settings(void)
#define ROTWING_MIN_SKEW_ANGLE_DEG_QUAD
Definition: rotwing_state.c:37
static void send_rotating_wing_state(struct transport_tx *trans, struct link_device *dev)
bool hover_motors_active
#define ROTWING_STATE_ACT_FEEDBACK_ID
ABI binding feedback data.
void rotwing_request_configuration(uint8_t configuration)
abi_event rotwing_state_feedback_ev
#define ROTWING_HOV_MOT_OFF_COUNTER
Definition: rotwing_state.c:85
void guidance_indi_hybrid_set_wls_settings(float body_v[3], float roll_angle, float pitch_angle)
void rotwing_state_set_fw_hov_mot_idle_settings(void)
void periodic_rotwing_state(void)
uint8_t current_state
Definition: rotwing_state.h:47
#define ROTWING_CONFIGURATION_HYBRID
Definition: rotwing_state.h:43
#define ROTWING_STATE_FW
Definition: rotwing_state.h:35
uint8_t desired_state
Definition: rotwing_state.h:48
#define ROTWING_STATE_SKEWING
Definition: rotwing_state.h:34
#define ROTWING_STATE_FW_HOV_MOT_IDLE
Definition: rotwing_state.h:36
#define ROTWING_STATE_HOVER
Rotwing States.
Definition: rotwing_state.h:33
#define ROTWING_STATE_PITCH_FW_SETTING
Definition: rotwing_state.h:57
#define ROTWING_STATE_WING_FW_SETTING
Definition: rotwing_state.h:53
#define ROTWING_CONFIGURATION_HOVER
Rotwing Configurations.
Definition: rotwing_state.h:42
#define ROTWING_STATE_PITCH_TRANSITION_SETTING
Definition: rotwing_state.h:56
#define ROTWING_STATE_PITCH_QUAD_SETTING
Definition: rotwing_state.h:55
#define ROTWING_STATE_FW_HOV_MOT_OFF
Definition: rotwing_state.h:37
#define ROTWING_STATE_WING_QUAD_SETTING
Definition: rotwing_state.h:51
#define ROTWING_STATE_WING_SCHEDULING_SETTING
Definition: rotwing_state.h:52
#define ROTWING_CONFIGURATION_EFFICIENT
Definition: rotwing_state.h:44
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Definition: stabilization.c:34
float g1g2[INDI_OUTPUTS][INDI_NUM_ACT]
float actuator_state_filt_vect[INDI_NUM_ACT]
static const struct usb_device_descriptor dev
Definition: usb_ser_hw.c:74
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Definition: telemetry.c:51
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
Definition: telemetry.h:66
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98