|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
55 att_rad.
phi = RadOfDeg(vn_attitude->
psi);
57 att_rad.
psi = RadOfDeg(vn_attitude->
phi);
59 vn_attitude->
phi = att_rad.
phi;
61 vn_attitude->
psi = att_rad.
psi;
70 static inline unsigned short calculateCRC(
unsigned char data[],
unsigned int length)
73 unsigned short crc = 0;
74 for (i = 0; i < length; i++) {
75 crc = (
unsigned char)(
crc >> 8) | (
crc << 8);
77 crc ^= (
unsigned char)(
crc & 0xff) >> 4;
79 crc ^= (
crc & 0x00ff) << 5;
91 unsigned short rec_crc = (
unsigned short)(data[length] << 8 | data[length + 1]);
94 if (calc_crc == rec_crc) {
193 idx += 3 *
sizeof(float);
200 idx += 3 *
sizeof(float);
205 idx += 3 *
sizeof(double);
210 idx += 3 *
sizeof(float);
214 idx += 3 *
sizeof(float);
231 idx += 3 *
sizeof(float);
235 idx +=
sizeof(float);
246 idx += 3 *
sizeof(float);
250 idx += 3 *
sizeof(float);
261 idx +=
sizeof(float);
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
uint8_t uart_getch(struct uart_periph *p)
void vn200_yaw_pitch_roll_to_attitude(struct FloatEulers *vn_attitude)
Convert yaw, pitch, and roll data from VectorNav to correct attitude yaw(0), pitch(1),...
int uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
void vn200_event(struct VNPacket *vnp)
void vn200_parse(struct VNPacket *vnp, uint8_t c)
Packet Collection & state machine.
static void vn200_read_buffer(struct VNPacket *vnp)
struct VectornavData vn_data
void vn200_read_message(struct VNPacket *vn_packet, struct VNData *vn_data)
Read received message and populate data struct with new measurements.
static unsigned short calculateCRC(unsigned char data[], unsigned int length)
Calculates the 16-bit CRC for the given ASCII or binary message.
static bool verify_chk(unsigned char data[], unsigned int length, uint16_t *calc_chk, uint16_t *rec_chk)
Verify checksum.
uint8_t msg_buf[VN_BUFFER_SIZE]
void vn200_check_status(struct VNData *vn_data)
Check INS status.
unsigned long long uint64_t