Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
telemetry.h File Reference
#include "std.h"
#include "messages.h"
#include "mcu_periph/uart.h"
#include "subsystems/datalink/downlink.h"
#include "generated/periodic_telemetry.h"
#include "subsystems/radio_control.h"
#include "state.h"
#include "firmwares/rotorcraft/autopilot.h"
#include "firmwares/rotorcraft/guidance.h"
#include "subsystems/actuators.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/electrical.h"
#include "subsystems/imu.h"
#include "subsystems/gps.h"
#include "subsystems/ins.h"
#include "subsystems/ahrs.h"
#include "mcu_periph/i2c.h"
#include "subsystems/sensors/baro.h"
#include "firmwares/rotorcraft/stabilization.h"
#include "subsystems/ahrs/ahrs_aligner.h"
#include "firmwares/rotorcraft/navigation.h"
#include "generated/settings.h"
+ Include dependency graph for telemetry.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PERIODIC_SEND_ALIVE(_trans, _dev)   DOWNLINK_SEND_ALIVE(_trans, _dev, 16, MD5SUM)
 
#define PERIODIC_SEND_ROTORCRAFT_STATUS(_trans, _dev)
 
#define PERIODIC_SEND_RC(_trans, _dev)   DOWNLINK_SEND_RC(_trans, _dev, RADIO_CONTROL_NB_CHANNEL, radio_control.values)
 
#define PERIODIC_SEND_ROTORCRAFT_RADIO_CONTROL(_trans, _dev)
 
#define SEND_ROTORCRAFT_RADIO_CONTROL(_trans, _dev, _kill_switch)
 
#define PERIODIC_SEND_PPM(_trans, _dev)   {}
 
#define PERIODIC_SEND_ACTUATORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_IMU_GYRO_SCALED(_trans, _dev)
 
#define PERIODIC_SEND_IMU_ACCEL_SCALED(_trans, _dev)
 
#define PERIODIC_SEND_IMU_MAG_SCALED(_trans, _dev)
 
#define PERIODIC_SEND_IMU_GYRO_RAW(_trans, _dev)
 
#define PERIODIC_SEND_IMU_ACCEL_RAW(_trans, _dev)
 
#define PERIODIC_SEND_IMU_MAG_RAW(_trans, _dev)
 
#define PERIODIC_SEND_IMU_MAG_CURRENT_CALIBRATION(_trans, _dev)
 
#define PERIODIC_SEND_BARO_RAW(_trans, _dev)
 
#define PERIODIC_SEND_RATE_LOOP(_trans, _dev)
 
#define PERIODIC_SEND_FILTER_ALIGNER(_trans, _dev)
 
#define PERIODIC_SEND_ROTORCRAFT_CMD(_trans, _dev)
 
#define PERIODIC_SEND_FILTER(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_ARDRONE2(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_GYRO_BIAS_INT(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_LKF(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_LKF_DEBUG(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_LKF_MAG_DBG(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_LKF_ACC_DBG(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_REF_QUAT(_trans, _dev)   {}
 
#define PERIODIC_SEND_AHRS_QUAT_INT(_trans, _dev)
 
#define PERIODIC_SEND_AHRS_EULER_INT(_trans, _dev)
 
#define PERIODIC_SEND_AHRS_RMAT_INT(_trans, _dev)
 
#define PERIODIC_SEND_VFF(_trans, _dev)   {}
 
#define PERIODIC_SEND_VFF_EXTENDED(_trans, _dev)   {}
 
#define PERIODIC_SEND_HFF(_trans, _dev)   {}
 
#define PERIODIC_SEND_HFF_DBG(_trans, _dev)   {}
 
#define PERIODIC_SEND_HFF_GPS(_trans, _dev)   {}
 
#define PERIODIC_SEND_GUIDANCE_H_INT(_trans, _dev)
 
#define PERIODIC_SEND_INS_Z(_trans, _dev)
 
#define PERIODIC_SEND_INS(_trans, _dev)
 
#define PERIODIC_SEND_INS_REF(_trans, _dev)
 
#define PERIODIC_SEND_VERT_LOOP(_trans, _dev)
 
#define PERIODIC_SEND_HOVER_LOOP(_trans, _dev)
 
#define PERIODIC_SEND_GUIDANCE_H_REF(_trans, _dev)
 
#define PERIODIC_SEND_ROTORCRAFT_FP(_trans, _dev)
 
#define PERIODIC_SEND_GPS_INT(_trans, _dev)
 
#define PERIODIC_SEND_ROTORCRAFT_NAV_STATUS(_trans, _dev)
 
#define PERIODIC_SEND_WP_MOVED(_trans, _dev)
 
#define PERIODIC_SEND_ROTORCRAFT_CAM(_trans, _dev)   {}
 
#define PERIODIC_SEND_ROTORCRAFT_TUNE_HOVER(_trans, _dev)
 
#define PERIODIC_SEND_I2C0_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_I2C1_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_I2C2_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_I2C_ERRORS(_trans, _dev)
 
#define PERIODIC_SEND_CAM_TRACK(_trans, _dev)   {}
 
#define PERIODIC_SEND_ARDRONE_NAVDATA(_trans, _dev)   {}
 
#define PERIODIC_SEND_DL_VALUE(_trans, _dev)   PeriodicSendDlValue(_trans, _dev)
 
#define PERIODIC_SEND_UART1_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_UART2_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_UART3_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_UART5_ERRORS(_trans, _dev)   {}
 
#define PERIODIC_SEND_UART_ERRORS(_trans, _dev)
 

Macro Definition Documentation

#define PERIODIC_SEND_ACTUATORS (   _trans,
  _dev 
)    {}

Definition at line 140 of file telemetry.h.

#define PERIODIC_SEND_AHRS_ARDRONE2 (   _trans,
  _dev 
)    {}

Definition at line 385 of file telemetry.h.

#define PERIODIC_SEND_AHRS_EULER_INT (   _trans,
  _dev 
)
Value:
{ \
struct Int32Eulers ltp_to_imu_euler; \
DOWNLINK_SEND_AHRS_EULER_INT(_trans, _dev, \
&ltp_to_imu_euler.phi, \
&ltp_to_imu_euler.theta, \
&ltp_to_imu_euler.psi, \
}
struct Int32Quat ltp_to_imu_quat
Definition: ahrs_ardrone2.h:46
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
Definition: state.h:1012
struct AhrsARDrone ahrs_impl
Definition: ahrs_ardrone2.c:40
#define INT32_EULERS_OF_QUAT(_e, _q)
euler angles

Definition at line 508 of file telemetry.h.

#define PERIODIC_SEND_AHRS_GYRO_BIAS_INT (   _trans,
  _dev 
)    {}

Definition at line 396 of file telemetry.h.

#define PERIODIC_SEND_AHRS_LKF (   _trans,
  _dev 
)    {}

Definition at line 460 of file telemetry.h.

#define PERIODIC_SEND_AHRS_LKF_ACC_DBG (   _trans,
  _dev 
)    {}

Definition at line 463 of file telemetry.h.

#define PERIODIC_SEND_AHRS_LKF_DEBUG (   _trans,
  _dev 
)    {}

Definition at line 461 of file telemetry.h.

#define PERIODIC_SEND_AHRS_LKF_MAG_DBG (   _trans,
  _dev 
)    {}

Definition at line 462 of file telemetry.h.

#define PERIODIC_SEND_AHRS_QUAT_INT (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_AHRS_QUAT_INT(_trans, _dev, \
}
static struct Int32Quat * stateGetNedToBodyQuat_i(void)
Get vehicle body attitude quaternion (int).
Definition: state.h:1002
struct Int32Quat ltp_to_imu_quat
Definition: ahrs_ardrone2.h:46
struct AhrsARDrone ahrs_impl
Definition: ahrs_ardrone2.c:40

Definition at line 483 of file telemetry.h.

#define PERIODIC_SEND_AHRS_REF_QUAT (   _trans,
  _dev 
)    {}

Definition at line 479 of file telemetry.h.

#define PERIODIC_SEND_AHRS_RMAT_INT (   _trans,
  _dev 
)
Value:
{ \
struct Int32RMat* att_rmat = stateGetNedToBodyRMat_i(); \
DOWNLINK_SEND_AHRS_RMAT(_trans, _dev, \
&ahrs_impl.ltp_to_imu_rmat.m[0], \
&ahrs_impl.ltp_to_imu_rmat.m[1], \
&ahrs_impl.ltp_to_imu_rmat.m[2], \
&ahrs_impl.ltp_to_imu_rmat.m[3], \
&ahrs_impl.ltp_to_imu_rmat.m[4], \
&ahrs_impl.ltp_to_imu_rmat.m[5], \
&ahrs_impl.ltp_to_imu_rmat.m[6], \
&ahrs_impl.ltp_to_imu_rmat.m[7], \
&ahrs_impl.ltp_to_imu_rmat.m[8], \
&(att_rmat->m[0]), \
&(att_rmat->m[1]), \
&(att_rmat->m[2]), \
&(att_rmat->m[3]), \
&(att_rmat->m[4]), \
&(att_rmat->m[5]), \
&(att_rmat->m[6]), \
&(att_rmat->m[7]), \
&(att_rmat->m[8])); \
}
static struct Int32RMat * stateGetNedToBodyRMat_i(void)
Get vehicle body attitude rotation matrix (int).
Definition: state.h:1007
rotation matrix
struct AhrsARDrone ahrs_impl
Definition: ahrs_ardrone2.c:40

Definition at line 536 of file telemetry.h.

#define PERIODIC_SEND_ALIVE (   _trans,
  _dev 
)    DOWNLINK_SEND_ALIVE(_trans, _dev, 16, MD5SUM)

Definition at line 54 of file telemetry.h.

#define PERIODIC_SEND_ARDRONE_NAVDATA (   _trans,
  _dev 
)    {}

Definition at line 995 of file telemetry.h.

#define PERIODIC_SEND_BARO_RAW (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_BARO_RAW(_trans, _dev, \
}
int32_t absolute
Definition: baro.h:41
int32_t differential
Definition: baro.h:42
struct Baro baro
Definition: baro_board.c:36

Definition at line 194 of file telemetry.h.

#define PERIODIC_SEND_CAM_TRACK (   _trans,
  _dev 
)    {}

Definition at line 959 of file telemetry.h.

#define PERIODIC_SEND_DL_VALUE (   _trans,
  _dev 
)    PeriodicSendDlValue(_trans, _dev)

Definition at line 999 of file telemetry.h.

#define PERIODIC_SEND_FILTER (   _trans,
  _dev 
)    {}

Definition at line 363 of file telemetry.h.

#define PERIODIC_SEND_FILTER_ALIGNER (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_FILTER_ALIGNER(_trans, _dev, \
&imu.gyro.p, \
&imu.gyro.q, \
&imu.gyro.r, \
}
int32_t p
in rad/s^2 with INT32_RATE_FRAC
int32_t low_noise_cnt
Definition: ahrs_aligner.h:44
uint8_t status
Definition: ahrs_aligner.h:45
int32_t noise
Definition: ahrs_aligner.h:43
struct AhrsAligner ahrs_aligner
Definition: ahrs_aligner.c:35
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
int32_t q
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates gyro
gyroscope measurements
Definition: imu.h:40
int32_t r
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates lp_gyro
Definition: ahrs_aligner.h:40

Definition at line 319 of file telemetry.h.

#define PERIODIC_SEND_GPS_INT (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_GPS_INT( _trans, _dev, \
&gps.hmsl, \
&gps.pacc, \
&gps.sacc, \
&gps.tow, \
&gps.pdop, \
&gps.num_sv, \
&gps.fix); \
static uint8_t i; \
static uint8_t last_cnos[GPS_NB_CHANNELS]; \
if (i == gps.nb_channels) i = 0; \
if (i < gps.nb_channels && gps.svinfos[i].cno > 0 && gps.svinfos[i].cno != last_cnos[i]) { \
DOWNLINK_SEND_SVINFO(DefaultChannel, DefaultDevice, &i, &gps.svinfos[i].svid, &gps.svinfos[i].flags, &gps.svinfos[i].qi, &gps.svinfos[i].cno, &gps.svinfos[i].elev, &gps.svinfos[i].azim); \
last_cnos[i] = gps.svinfos[i].cno; \
} \
i++; \
}
int32_t y
in centimeters
struct LlaCoor_i lla_pos
position in LLA (lat,lon: rad*1e7; alt: mm over ellipsoid)
Definition: gps.h:65
int32_t lat
in radians*1e7
struct EcefCoor_i ecef_vel
speed ECEF in cm/s
Definition: gps.h:68
uint32_t sacc
speed accuracy in cm/s
Definition: gps.h:74
uint16_t pdop
position dilution of precision scaled by 100
Definition: gps.h:76
int32_t hmsl
height above mean sea level in mm
Definition: gps.h:67
uint8_t fix
status of fix
Definition: gps.h:78
int32_t z
in centimeters
struct EcefCoor_i ecef_pos
position in ECEF in cm
Definition: gps.h:64
#define GPS_NB_CHANNELS
Definition: gps_ardrone2.h:33
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
uint8_t qi
quality bitfield (GPS receiver specific)
Definition: gps.h:56
uint32_t tow
GPS time of week in ms.
Definition: gps.h:80
int16_t azim
azimuth in deg
Definition: gps.h:59
int32_t alt
in millimeters above WGS84 reference ellipsoid
int32_t x
in centimeters
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
Definition: gps.h:83
uint32_t pacc
position accuracy in cm
Definition: gps.h:73
uint8_t flags
bitfield with GPS receiver specific flags
Definition: gps.h:55
unsigned char uint8_t
Definition: types.h:14
int8_t elev
elevation in deg
Definition: gps.h:58
int32_t lon
in radians*1e7
uint8_t svid
Satellite ID.
Definition: gps.h:54
struct GpsState gps
global GPS state
Definition: gps.c:33
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
Definition: gps.h:57
uint8_t nb_channels
Number of scanned satellites.
Definition: gps.h:82
uint8_t num_sv
number of sat in fix
Definition: gps.h:77

Definition at line 752 of file telemetry.h.

#define PERIODIC_SEND_GUIDANCE_H_INT (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_GUIDANCE_H_INT(_trans, _dev, \
}
int32_t x
North.
struct Int32Vect2 guidance_h_pos_ref
with INT32_POS_FRAC
Definition: guidance_h.c:63
struct Int32Vect2 guidance_h_pos_sp
horizontal position setpoint in NED.
Definition: guidance_h.c:62
int32_t y
East.
struct NedCoor_i ins_ltp_pos
Definition: ins_ardrone2.c:50

Definition at line 630 of file telemetry.h.

#define PERIODIC_SEND_GUIDANCE_H_REF (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_GUIDANCE_H_REF_INT(_trans, _dev, \
}
struct Int32Vect2 guidance_h_pos_ref
with INT32_POS_FRAC
Definition: guidance_h.c:63
struct Int32Vect2 guidance_h_accel_ref
with INT32_ACCEL_FRAC
Definition: guidance_h.c:65
struct Int32Vect2 guidance_h_pos_sp
horizontal position setpoint in NED.
Definition: guidance_h.c:62
struct Int32Vect2 guidance_h_speed_ref
with INT32_SPEED_FRAC
Definition: guidance_h.c:64

Definition at line 718 of file telemetry.h.

#define PERIODIC_SEND_HFF (   _trans,
  _dev 
)    {}

Definition at line 625 of file telemetry.h.

#define PERIODIC_SEND_HFF_DBG (   _trans,
  _dev 
)    {}

Definition at line 626 of file telemetry.h.

#define PERIODIC_SEND_HFF_GPS (   _trans,
  _dev 
)    {}

Definition at line 627 of file telemetry.h.

#define PERIODIC_SEND_HOVER_LOOP (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_HOVER_LOOP(_trans, _dev, \
}
int32_t phi
in rad with INT32_ANGLE_FRAC
struct NedCoor_f ins_ltp_speed
Definition: ins_ardrone2.c:55
float y
in meters
int32_t x
North.
int32_t theta
in rad with INT32_ANGLE_FRAC
struct NedCoor_f ins_ltp_accel
Definition: ins_ardrone2.c:54
struct Int32Vect2 guidance_h_pos_err_sum
Definition: guidance_h.c:69
float x
in meters
struct Int32Vect2 guidance_h_speed_err
Definition: guidance_h.c:68
struct Int32Vect2 guidance_h_pos_sp
horizontal position setpoint in NED.
Definition: guidance_h.c:62
int32_t y
East.
struct Int32Vect2 guidance_h_nav_err
Definition: guidance_h.c:70
int32_t psi
in rad with INT32_ANGLE_FRAC
struct Int32Vect2 guidance_h_command_earth
Definition: guidance_h.c:73
struct NedCoor_i ins_ltp_pos
Definition: ins_ardrone2.c:50
struct Int32Eulers guidance_h_command_body
with INT32_ANGLE_FRAC
Definition: guidance_h.c:75
struct Int32Vect2 guidance_h_pos_err
Definition: guidance_h.c:67

Definition at line 693 of file telemetry.h.

#define PERIODIC_SEND_I2C0_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 866 of file telemetry.h.

#define PERIODIC_SEND_I2C1_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 894 of file telemetry.h.

#define PERIODIC_SEND_I2C2_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 922 of file telemetry.h.

#define PERIODIC_SEND_I2C_ERRORS (   _trans,
  _dev 
)
Value:
{ \
static uint8_t _i2c_nb_cnt = 0; \
switch (_i2c_nb_cnt) { \
case 0: \
PERIODIC_SEND_I2C0_ERRORS(_trans, _dev); break; \
case 1: \
PERIODIC_SEND_I2C1_ERRORS(_trans, _dev); break; \
case 2: \
PERIODIC_SEND_I2C2_ERRORS(_trans, _dev); break; \
default: \
break; \
} \
_i2c_nb_cnt++; \
if (_i2c_nb_cnt == 3) \
_i2c_nb_cnt = 0; \
}
#define PERIODIC_SEND_I2C2_ERRORS(_trans, _dev)
Definition: telemetry.h:922
#define PERIODIC_SEND_I2C0_ERRORS(_trans, _dev)
Definition: telemetry.h:866
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
unsigned char uint8_t
Definition: types.h:14
#define PERIODIC_SEND_I2C1_ERRORS(_trans, _dev)
Definition: telemetry.h:894

Definition at line 926 of file telemetry.h.

#define PERIODIC_SEND_IMU_ACCEL_RAW (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_ACCEL_RAW(_trans, _dev, \
}
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
Definition: imu.h:49
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50

Definition at line 171 of file telemetry.h.

#define PERIODIC_SEND_IMU_ACCEL_SCALED (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_ACCEL_SCALED(_trans, _dev, \
&imu.accel.x, \
&imu.accel.y, \
&imu.accel.z); \
}
struct Int32Vect3 accel
accelerometer measurements
Definition: imu.h:41
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50

Definition at line 150 of file telemetry.h.

#define PERIODIC_SEND_IMU_GYRO_RAW (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_GYRO_RAW(_trans, _dev, \
}
int32_t p
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
Definition: imu.h:48
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
int32_t q
in rad/s^2 with INT32_RATE_FRAC
int32_t r
in rad/s^2 with INT32_RATE_FRAC

Definition at line 164 of file telemetry.h.

#define PERIODIC_SEND_IMU_GYRO_SCALED (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_GYRO_SCALED(_trans, _dev, \
&imu.gyro.p, \
&imu.gyro.q, \
&imu.gyro.r); \
}
int32_t p
in rad/s^2 with INT32_RATE_FRAC
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
int32_t q
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates gyro
gyroscope measurements
Definition: imu.h:40
int32_t r
in rad/s^2 with INT32_RATE_FRAC

Definition at line 143 of file telemetry.h.

#define PERIODIC_SEND_IMU_MAG_CURRENT_CALIBRATION (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_MAG_CURRENT_CALIBRATION(_trans, _dev, \
}
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
Definition: imu.h:50
int32_t current
current in milliamps
Definition: electrical.h:9
struct Electrical electrical

Definition at line 185 of file telemetry.h.

#define PERIODIC_SEND_IMU_MAG_RAW (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_MAG_RAW(_trans, _dev, \
}
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
Definition: imu.h:50

Definition at line 178 of file telemetry.h.

#define PERIODIC_SEND_IMU_MAG_SCALED (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_IMU_MAG_SCALED(_trans, _dev, \
&imu.mag.x, \
&imu.mag.y, \
&imu.mag.z); \
}
struct Imu imu
global IMU state
Definition: imu_aspirin2.c:50
struct Int32Vect3 mag
magnetometer measurements
Definition: imu.h:42

Definition at line 157 of file telemetry.h.

#define PERIODIC_SEND_INS (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_INS(_trans, _dev, \
}
struct NedCoor_f ins_ltp_speed
Definition: ins_ardrone2.c:55
float y
in meters
int32_t x
North.
struct NedCoor_f ins_ltp_accel
Definition: ins_ardrone2.c:54
int32_t z
Down.
float x
in meters
float z
in meters
int32_t y
East.
struct NedCoor_i ins_ltp_pos
Definition: ins_ardrone2.c:50

Definition at line 648 of file telemetry.h.

#define PERIODIC_SEND_INS_REF (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_INS_REF(_trans, _dev, \
&ins_qfe); \
}
int32_t y
in centimeters
int32_t lat
in radians*1e7
int32_t ins_qfe
Definition: ins_alt_float.c:50
struct LlaCoor_i lla
Reference point in lla.
int32_t z
in centimeters
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
bool_t ins_ltp_initialised
Definition: ins_ardrone2.c:57
int32_t alt
in millimeters above WGS84 reference ellipsoid
int32_t x
in centimeters
int32_t lon
in radians*1e7
int32_t hmsl
Height above mean sea level in mm.
struct EcefCoor_i ecef
Reference point in ecef.
struct LtpDef_i ins_ltp_def
Ins implementation state (fixed point)
Definition: ins_ardrone2.c:51

Definition at line 661 of file telemetry.h.

#define PERIODIC_SEND_INS_Z (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_INS_Z(_trans, _dev, \
}
struct NedCoor_f ins_ltp_speed
Definition: ins_ardrone2.c:55
struct NedCoor_f ins_ltp_accel
Definition: ins_ardrone2.c:54
int32_t z
Down.
float ins_baro_alt
Definition: ins_alt_float.c:52
float z
in meters
struct NedCoor_i ins_ltp_pos
Definition: ins_ardrone2.c:50

Definition at line 640 of file telemetry.h.

#define PERIODIC_SEND_PPM (   _trans,
  _dev 
)    {}

Definition at line 134 of file telemetry.h.

#define PERIODIC_SEND_RATE_LOOP (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_RATE_LOOP(_trans, _dev, \
&stabilization_cmd[COMMAND_THRUST]); \
}
struct Int32Rates stabilization_rate_ff_cmd
int32_t p
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates stabilization_rate_sum_err
struct Int32Rates stabilization_rate_refdot
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Definition: stabilization.c:28
int32_t q
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates stabilization_rate_fb_cmd
struct Int32Rates stabilization_rate_ref
int32_t r
in rad/s^2 with INT32_RATE_FRAC
struct Int32Rates stabilization_rate_sp

Definition at line 203 of file telemetry.h.

#define PERIODIC_SEND_RC (   _trans,
  _dev 
)    DOWNLINK_SEND_RC(_trans, _dev, RADIO_CONTROL_NB_CHANNEL, radio_control.values)

Definition at line 100 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_CAM (   _trans,
  _dev 
)    {}

Definition at line 819 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_CMD (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_ROTORCRAFT_CMD(_trans, _dev, \
&stabilization_cmd[COMMAND_ROLL], \
&stabilization_cmd[COMMAND_PITCH], \
&stabilization_cmd[COMMAND_YAW], \
&stabilization_cmd[COMMAND_THRUST]); \
}
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Definition: stabilization.c:28

Definition at line 333 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_FP (   _trans,
  _dev 
)
Value:
{ \
int32_t carrot_up = -guidance_v_z_sp; \
DOWNLINK_SEND_ROTORCRAFT_FP( _trans, _dev, \
&(stateGetSpeedEnu_i()->x), \
&(stateGetSpeedEnu_i()->y), \
&(stateGetSpeedEnu_i()->z), \
&carrot_up, \
&stabilization_cmd[COMMAND_THRUST], \
}
int32_t guidance_v_z_sp
altitude setpoint in meters (input).
Definition: guidance_v.c:73
uint16_t autopilot_flight_time
flight time in seconds.
Definition: autopilot.c:37
struct Int32Vect2 guidance_h_pos_sp
horizontal position setpoint in NED.
Definition: guidance_h.c:62
signed long int32_t
Definition: types.h:19
static struct EnuCoor_i * stateGetSpeedEnu_i(void)
Get ground speed in local ENU coordinates (int).
Definition: state.h:805
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Definition: stabilization.c:28
struct Int32Eulers guidance_h_command_body
with INT32_ANGLE_FRAC
Definition: guidance_h.c:75
static struct EnuCoor_i * stateGetPositionEnu_i(void)
Get position in local ENU coordinates (int).
Definition: state.h:637
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
Definition: state.h:1012

Definition at line 731 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_NAV_STATUS (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_ROTORCRAFT_NAV_STATUS(_trans, _dev, \
DOWNLINK_SEND_SEGMENT(_trans, _dev, &sx, &sy, &ex, &ey); \
} \
DOWNLINK_SEND_CIRCLE(_trans, _dev, &cx, &cy, &r); \
} \
}
uint16_t block_time
uint8_t nav_block
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
#define POS_FLOAT_OF_BFP(_ai)
uint16_t stage_time
In s.
uint8_t nav_stage

Definition at line 784 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_RADIO_CONTROL (   _trans,
  _dev 
)
Value:
{ \
int16_t foo = -42; \
SEND_ROTORCRAFT_RADIO_CONTROL( _trans, _dev, &foo) \
}
signed short int16_t
Definition: types.h:17
uint16_t foo
Definition: main_demo5.c:54
#define SEND_ROTORCRAFT_RADIO_CONTROL(_trans, _dev, _kill_switch)
Definition: telemetry.h:109

Definition at line 104 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_STATUS (   _trans,
  _dev 
)
Value:
{ \
uint32_t imu_nb_err = 0; \
uint8_t _twi_blmc_nb_err = 0; \
uint16_t time_sec = sys_time.nb_sec; \
DOWNLINK_SEND_ROTORCRAFT_STATUS(_trans, _dev, \
&imu_nb_err, \
&_twi_blmc_nb_err, \
&gps.fix, \
&time_sec \
); \
}
unsigned short uint16_t
Definition: types.h:16
uint8_t autopilot_mode
Definition: autopilot.c:39
bool_t autopilot_motors_on
Definition: autopilot.c:46
uint16_t vsupply
supply voltage in decivolts
Definition: electrical.h:8
uint8_t fix
status of fix
Definition: gps.h:78
bool_t autopilot_in_flight
Definition: autopilot.c:42
unsigned long uint32_t
Definition: types.h:18
struct RadioControl radio_control
Definition: radio_control.c:25
uint8_t frame_rate
Definition: radio_control.h:53
uint8_t guidance_h_mode
Definition: guidance_h.c:59
uint8_t status
Definition: radio_control.h:50
uint8_t guidance_v_mode
Definition: guidance_v.c:54
unsigned char uint8_t
Definition: types.h:14
volatile uint32_t nb_sec
full seconds since startup
Definition: sys_time.h:69
struct GpsState gps
global GPS state
Definition: gps.c:33
struct Electrical electrical

Definition at line 57 of file telemetry.h.

#define PERIODIC_SEND_ROTORCRAFT_TUNE_HOVER (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_ROTORCRAFT_TUNE_HOVER(_trans, _dev, \
&stabilization_cmd[COMMAND_ROLL], \
&stabilization_cmd[COMMAND_PITCH], \
&stabilization_cmd[COMMAND_YAW], \
&stabilization_cmd[COMMAND_THRUST], \
&ahrs_impl.ltp_to_imu_euler.phi, \
&ahrs_impl.ltp_to_imu_euler.theta, \
&ahrs_impl.ltp_to_imu_euler.psi, \
}
#define RADIO_PITCH
Definition: spektrum_arch.h:40
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
Definition: radio_control.h:55
struct RadioControl radio_control
Definition: radio_control.c:25
#define RADIO_YAW
Definition: spektrum_arch.h:41
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
Definition: stabilization.c:28
#define RADIO_ROLL
Definition: spektrum_arch.h:39
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
Definition: state.h:1012
struct AhrsARDrone ahrs_impl
Definition: ahrs_ardrone2.c:40

Definition at line 823 of file telemetry.h.

#define PERIODIC_SEND_UART1_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 1014 of file telemetry.h.

#define PERIODIC_SEND_UART2_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 1027 of file telemetry.h.

#define PERIODIC_SEND_UART3_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 1040 of file telemetry.h.

#define PERIODIC_SEND_UART5_ERRORS (   _trans,
  _dev 
)    {}

Definition at line 1053 of file telemetry.h.

#define PERIODIC_SEND_UART_ERRORS (   _trans,
  _dev 
)
Value:
{ \
static uint8_t uart_nb_cnt = 0; \
switch (uart_nb_cnt) { \
case 0: \
PERIODIC_SEND_UART1_ERRORS(_trans, _dev); break; \
case 1: \
PERIODIC_SEND_UART2_ERRORS(_trans, _dev); break; \
case 2: \
PERIODIC_SEND_UART3_ERRORS(_trans, _dev); break; \
case 3: \
PERIODIC_SEND_UART5_ERRORS(_trans, _dev); break; \
default: break; \
} \
uart_nb_cnt++; \
if (uart_nb_cnt == 4) \
uart_nb_cnt = 0; \
}
#define PERIODIC_SEND_UART5_ERRORS(_trans, _dev)
Definition: telemetry.h:1053
#define PERIODIC_SEND_UART3_ERRORS(_trans, _dev)
Definition: telemetry.h:1040
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
#define PERIODIC_SEND_UART2_ERRORS(_trans, _dev)
Definition: telemetry.h:1027
#define PERIODIC_SEND_UART1_ERRORS(_trans, _dev)
Definition: telemetry.h:1014
unsigned char uint8_t
Definition: types.h:14

Definition at line 1058 of file telemetry.h.

#define PERIODIC_SEND_VERT_LOOP (   _trans,
  _dev 
)
Value:
{ \
DOWNLINK_SEND_VERT_LOOP(_trans, _dev, \
}
int32_t guidance_v_z_sp
altitude setpoint in meters (input).
Definition: guidance_v.c:73
struct NedCoor_f ins_ltp_speed
Definition: ins_ardrone2.c:55
int32_t guidance_v_fb_cmd
feed-back command
Definition: guidance_v.c:56
int32_t guidance_v_delta_t
thrust command.
Definition: guidance_v.c:57
int32_t gv_adapt_X
State of the estimator.
int32_t guidance_v_z_sum_err
accumulator for I-gain
Definition: guidance_v.c:83
struct NedCoor_f ins_ltp_accel
Definition: ins_ardrone2.c:54
int32_t gv_adapt_Xmeas
Measurement.
int32_t z
Down.
int32_t gv_adapt_P
Covariance.
float z
in meters
int32_t guidance_v_zdd_ref
vertical acceleration reference in meter/s^2.
Definition: guidance_v.c:77
int32_t guidance_v_z_ref
altitude reference in meters.
Definition: guidance_v.c:75
int32_t guidance_v_zd_ref
vertical speed reference in meter/s.
Definition: guidance_v.c:76
struct NedCoor_i ins_ltp_pos
Definition: ins_ardrone2.c:50
int32_t guidance_v_zd_sp
vertical speed setpoint in meter/s (input).
Definition: guidance_v.c:74
int32_t guidance_v_ff_cmd
feed-forward command
Definition: guidance_v.c:55

Definition at line 674 of file telemetry.h.

#define PERIODIC_SEND_VFF (   _trans,
  _dev 
)    {}

Definition at line 574 of file telemetry.h.

#define PERIODIC_SEND_VFF_EXTENDED (   _trans,
  _dev 
)    {}

Definition at line 589 of file telemetry.h.

#define PERIODIC_SEND_WP_MOVED (   _trans,
  _dev 
)
Value:
{ \
static uint8_t i; \
i++; if (i >= nb_waypoint) i = 0; \
DOWNLINK_SEND_WP_MOVED_ENU(_trans, _dev, \
&i, \
&(waypoints[i].x), \
&(waypoints[i].y), \
&(waypoints[i].z)); \
}
unsigned char uint8_t
Definition: types.h:14

Definition at line 806 of file telemetry.h.

#define SEND_ROTORCRAFT_RADIO_CONTROL (   _trans,
  _dev,
  _kill_switch 
)
Value:
{ \
DOWNLINK_SEND_ROTORCRAFT_RADIO_CONTROL(_trans, _dev, \
_kill_switch, \
#define RADIO_PITCH
Definition: spektrum_arch.h:40
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
Definition: radio_control.h:55
struct RadioControl radio_control
Definition: radio_control.c:25
#define RADIO_YAW
Definition: spektrum_arch.h:41
uint8_t status
Definition: radio_control.h:50
#define RADIO_MODE
Definition: spektrum_arch.h:61
#define RADIO_THROTTLE
Definition: spektrum_arch.h:38
#define RADIO_ROLL
Definition: spektrum_arch.h:39

Definition at line 109 of file telemetry.h.