63 chk_rec = (packet_buffer[packet_length - 2] << 8) | packet_buffer[packet_length - 1];
71 for (
int i = 0; i < packet_length; i++) {
72 chk += packet_buffer[i];
79 for (
int i = 0; i < packet_length; i++) {
void UM6_packet_read_message(void)
#define RATES_BFP_OF_REAL(_ri, _rf)
#define EULERS_BFP_OF_REAL(_ei, _ef)
void UM6_send_packet(uint8_t *packet_buffer, uint8_t packet_length)
struct FloatRates UM6_rate
uint8_t buf_out[IMU_UM6_BUFFER_LENGTH]
Main include for ABI (AirBorneInterface).
void imu_um6_publish(void)
bool UM6_verify_chk(uint8_t packet_buffer[], uint8_t packet_length)
void imu_um6_periodic(void)
struct Imu imu
global IMU state
#define IMU_UM6_DATA_OFFSET
#define ACCELS_BFP_OF_REAL(_ef, _ei)
#define IMU_UM6_ZERO_GYROS_CMD
#define IMU_UM6_BUFFER_LENGTH
struct FloatVect3 UM6_mag
#define MAGS_BFP_OF_REAL(_ef, _ei)
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
#define IMU_UM6_RESET_EKF_CMD
#define IMU_UM6_GYRO_PROC
enum UM6Status UM6_status
Architecture independent timing functions.
struct FloatVect3 UM6_accel
#define EULERS_SMUL(_eo, _ei, _s)
uint8_t msg_buf[IMU_UM6_BUFFER_LENGTH]
#define QUAT_BFP_OF_REAL(_qi, _qf)
#define IMU_UM6_SET_MAG_REF
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
Inertial Measurement Unit interface.
struct UM6Packet UM6_packet
#define RATES_SMUL(_ro, _ri, _s)
void uart_put_byte(struct uart_periph *p, long fd, uint8_t data)
Uart transmit implementation.
#define IMU_UM6_COMMUNICATION_REG
#define VECT3_SMUL(_vo, _vi, _s)
#define IMU_UM6_SET_ACCEL_REF
void UM6_packet_parse(uint8_t c)
struct FloatEulers UM6_eulers
uint16_t UM6_calculate_checksum(uint8_t packet_buffer[], uint8_t packet_length)
void imu_scale_accel(struct Imu *_imu)
struct FloatQuat UM6_quat
#define IMU_UM6_MISC_CONFIG_REG
Driver for CH Robotics UM6 IMU/AHRS subsystem.
abstract IMU interface providing fixed point interface
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void imu_scale_gyro(struct Imu *_imu)
void imu_scale_mag(struct Imu *_imu)
#define IMU_UM6_ACCEL_PROC
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC