Paparazzi UAS  v5.15_devel-112-g521f3cf
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vn200_serial.h File Reference

Vectornav VN-200 INS subsystem. More...

#include "std.h"
#include "mcu_periph/uart.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

struct VNPacket

Definition at line 62 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 84 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

#define VN_BUFFER_SIZE   512

Definition at line 49 of file vn200_serial.h.

#define VN_GROUP_BYTES   8

Definition at line 47 of file vn200_serial.h.

Referenced by vn200_parse().

#define VN_HEADER_SIZE   9

Definition at line 50 of file vn200_serial.h.

Referenced by vn200_parse(), and vn200_read_message().

#define VN_OUTPUT_GROUP   0x39

Definition at line 46 of file vn200_serial.h.

Referenced by vn200_parse().

#define VN_PAYLOAD_SIZE   144

Definition at line 51 of file vn200_serial.h.

Referenced by vn200_parse().

#define VN_SYNC   0xFA

Definition at line 45 of file vn200_serial.h.

Referenced by vn200_parse().

Enumeration Type Documentation

Enumerator
VNMsgSync 
VNMsgHeader 
VNMsgGroup 
VNMsgData 
VNMsgCheck 

Definition at line 54 of file vn200_serial.h.

enum VNStatus
Enumerator
VNNotTracking 
VNOutOfSpecs 
VNOK 

Definition at line 78 of file vn200_serial.h.

Function Documentation

void vn200_event ( struct VNPacket vnp)

Definition at line 110 of file vn200_serial.c.

References uart_char_available(), 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:

void vn200_parse ( struct VNPacket vnp,
uint8_t  c 
)
void vn200_read_message ( struct VNPacket vnp,
struct VNData vndata 
)