Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Vectornav VN-200 INS subsystem. More...
#include "std.h"
#include "math/pprz_algebra.h"
#include "math/pprz_geodetic_int.h"
#include "math/pprz_algebra_float.h"
#include "math/pprz_geodetic_float.h"
#include "math/pprz_isa.h"
Go to the source code of this file.
Data Structures | |
struct | VNPacket |
struct | VNData |
Macros | |
#define | VN_SYNC 0xFA |
#define | VN_OUTPUT_GROUP 0x39 |
#define | VN_GROUP_BYTES 8 |
#define | VN_BUFFER_SIZE 512 |
#define | VN_HEADER_SIZE 9 |
#define | VN_PAYLOAD_SIZE 144 |
Enumerations | |
enum | VNMsgStatus { VNMsgSync , VNMsgHeader , VNMsgGroup , VNMsgData , VNMsgCheck } |
enum | VNStatus { VNNotTracking , VNOutOfSpecs , VNOK } |
Functions | |
void | vn200_event (struct VNPacket *vnp) |
void | vn200_read_message (struct VNPacket *vnp, struct VNData *vndata) |
Read received message and populate data struct with new measurements. More... | |
void | vn200_parse (struct VNPacket *vnp, uint8_t c) |
Packet Collection & state machine. More... | |
Vectornav VN-200 INS subsystem.
Definition in file vn200_serial.h.
struct VNPacket |
Definition at line 61 of file vn200_serial.h.
Data Fields | ||
---|---|---|
uint16_t | calc_chk | |
uint32_t | chksm_error | |
uint16_t | counter | |
uint16_t | datalength | |
uint16_t | framing_error | |
uint32_t | hdr_error | |
bool | msg_available | |
uint8_t | msg_buf[VN_BUFFER_SIZE] | |
uint8_t | msg_idx | |
uint16_t | noise_error | |
uint16_t | overrun_error | |
uint16_t | rec_chk | |
enum VNMsgStatus | status |
struct VNData |
Definition at line 83 of file vn200_serial.h.
Data Fields | ||
---|---|---|
struct FloatVect3 | accel | Acceleration in the imu frame, m/s. |
struct FloatEulers | attitude | Attitude, float, [rad], yaw, pitch, roll. |
uint8_t | err | see page 122 of VN-200 datasheet |
uint8_t | gps_fix | None|2D|3D. |
struct FloatRates | gyro | Rates in the imu frame m/s. |
uint16_t | ins_status | see page 122 of VN-200 datasheet |
struct FloatVect3 | lin_accel | Linear acceleration in imu frame [m/s^2]. |
uint8_t | mode | 0-not tracking, 1 - poor performance, 2- OK |
uint64_t | nanostamp | |
uint8_t | num_sv | number of visible satellites |
double | pos_lla[3] | |
float | pos_u[3] | The current GPS position uncertainty in the North East Down (NED) coordinate frame, given in meters. |
float | timestamp | Time since VN startup [s]. |
uint64_t | tow | tow (in nanoseconds), uint64 |
struct FloatVect3 | vel_body | The estimated velocity in the imu frame, given in m/s. |
struct NedCoor_f | vel_ned | The estimated velocity in the North East Down (NED) frame, given in m/s. |
float | vel_u | NED velocity uncertainty [m/s]. |
float | ypr[3] | yaw, pitch, roll [deg] |
struct FloatEulers | ypr_u | Attitude uncertainty, 1sigma, float, [degrees], yaw, pitch, roll. |
#define VN_BUFFER_SIZE 512 |
Definition at line 48 of file vn200_serial.h.
#define VN_GROUP_BYTES 8 |
Definition at line 46 of file vn200_serial.h.
#define VN_HEADER_SIZE 9 |
Definition at line 49 of file vn200_serial.h.
#define VN_OUTPUT_GROUP 0x39 |
Definition at line 45 of file vn200_serial.h.
#define VN_PAYLOAD_SIZE 144 |
Definition at line 50 of file vn200_serial.h.
#define VN_SYNC 0xFA |
Definition at line 44 of file vn200_serial.h.
enum VNMsgStatus |
Enumerator | |
---|---|
VNMsgSync | |
VNMsgHeader | |
VNMsgGroup | |
VNMsgData | |
VNMsgCheck |
Definition at line 53 of file vn200_serial.h.
enum VNStatus |
Enumerator | |
---|---|
VNNotTracking | |
VNOutOfSpecs | |
VNOK |
Definition at line 77 of file vn200_serial.h.
void vn200_event | ( | struct VNPacket * | vnp | ) |
Definition at line 113 of file vn200_serial.c.
References dev, and vn200_read_buffer().
Referenced by ahrs_vectornav_event(), imu_vectornav_event(), and ins_vectornav_event().
Packet Collection & state machine.
Definition at line 125 of file vn200_serial.c.
References VNPacket::calc_chk, VNPacket::chksm_error, VNPacket::counter, VNPacket::datalength, VNPacket::hdr_error, VNPacket::msg_available, VNPacket::msg_buf, VNPacket::msg_idx, VNPacket::rec_chk, VNPacket::status, verify_chk(), VN_GROUP_BYTES, VN_HEADER_SIZE, VN_OUTPUT_GROUP, VN_PAYLOAD_SIZE, VN_SYNC, VNMsgData, VNMsgGroup, VNMsgHeader, and VNMsgSync.
Referenced by vn200_read_buffer().
Read received message and populate data struct with new measurements.
Definition at line 184 of file vn200_serial.c.
References VNData::accel, VNData::attitude, VNData::gps_fix, VNData::gyro, idx, VNData::ins_status, VNData::lin_accel, VNPacket::msg_buf, VNData::nanostamp, VNData::num_sv, VNData::pos_lla, VNData::pos_u, VNData::timestamp, VNData::tow, VNData::vel_body, VNData::vel_ned, VNData::vel_u, vn200_check_status(), vn200_yaw_pitch_roll_to_attitude(), VN_HEADER_SIZE, and VNData::ypr_u.
Referenced by ahrs_vectornav_event(), imu_vectornav_event(), and ins_vectornav_event().