Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
vn200_serial.h File Reference

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"
+ Include dependency graph for vn200_serial.h:
+ This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Vectornav VN-200 INS subsystem.

Author
Michal Podhradsky micha.nosp@m.l.po.nosp@m.dhrad.nosp@m.sky@.nosp@m.aggie.nosp@m.mail.nosp@m..usu..nosp@m.edu

Definition in file vn200_serial.h.


Data Structure Documentation

◆ VNPacket

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

◆ VNData

struct VNData

Definition at line 83 of file vn200_serial.h.

+ Collaboration diagram for VNData:
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.

Macro Definition Documentation

◆ VN_BUFFER_SIZE

#define VN_BUFFER_SIZE   512

Definition at line 48 of file vn200_serial.h.

◆ VN_GROUP_BYTES

#define VN_GROUP_BYTES   8

Definition at line 46 of file vn200_serial.h.

◆ VN_HEADER_SIZE

#define VN_HEADER_SIZE   9

Definition at line 49 of file vn200_serial.h.

◆ VN_OUTPUT_GROUP

#define VN_OUTPUT_GROUP   0x39

Definition at line 45 of file vn200_serial.h.

◆ VN_PAYLOAD_SIZE

#define VN_PAYLOAD_SIZE   144

Definition at line 50 of file vn200_serial.h.

◆ VN_SYNC

#define VN_SYNC   0xFA

Definition at line 44 of file vn200_serial.h.

Enumeration Type Documentation

◆ VNMsgStatus

Enumerator
VNMsgSync 
VNMsgHeader 
VNMsgGroup 
VNMsgData 
VNMsgCheck 

Definition at line 53 of file vn200_serial.h.

◆ VNStatus

enum VNStatus
Enumerator
VNNotTracking 
VNOutOfSpecs 
VNOK 

Definition at line 77 of file vn200_serial.h.

Function Documentation

◆ vn200_event()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vn200_parse()

void vn200_parse ( struct VNPacket vnp,
uint8_t  c 
)

◆ vn200_read_message()

void vn200_read_message ( struct VNPacket vnp,
struct VNData vndata 
)