Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
VN100.h File Reference
#include "std.h"
+ Include dependency graph for VN100.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  VN100_Param
 
struct  VN100_Req_Packet
 
struct  VN100_Res_Packet
 

Macros

#define VN100_REG_MODEL   1
 Library for the VectorNav VN100 AHRS based on VN_FWLIB from vector nav. More...
 
#define VN100_REG_HWREV   2
 
#define VN100_REG_SN   3
 
#define VN100_REG_FWVER   4
 
#define VN100_REG_SBAUD   5
 
#define VN100_REG_ADOR   6
 
#define VN100_REG_ADOF   7
 
#define VN100_REG_YPR   8
 
#define VN100_REG_QTN   9
 
#define VN100_REG_QTM   10
 
#define VN100_REG_QTA   11
 
#define VN100_REG_QTR   12
 
#define VN100_REG_QMA   13
 
#define VN100_REG_QAR   14
 
#define VN100_REG_QMR   15
 
#define VN100_REG_DCM   16
 
#define VN100_REG_MAG   17
 
#define VN100_REG_ACC   18
 
#define VN100_REG_GYR   19
 
#define VN100_REG_MAR   20
 
#define VN100_REG_REF   21
 
#define VN100_REG_SIG   22
 
#define VN100_REG_HSI   23
 
#define VN100_REG_ATP   24
 
#define VN100_REG_ACT   25
 
#define VN100_REG_RFR   26
 
#define VN100_REG_YMR   27
 
#define VN100_REG_ACG   28
 
#define VN100_REG_MODEL_SIZE   12
 
#define VN100_REG_HWREV_SIZE   4
 
#define VN100_REG_SN_SIZE   12
 
#define VN100_REG_FWVER_SIZE   4
 
#define VN100_REG_SBAUD_SIZE   4
 
#define VN100_REG_ADOR_SIZE   4
 
#define VN100_REG_ADOF_SIZE   4
 
#define VN100_REG_YPR_SIZE   (3*4)
 
#define VN100_REG_QTN_SIZE   (4*4)
 
#define VN100_REG_QTM_SIZE   (7*4)
 
#define VN100_REG_QTA_SIZE   (7*4)
 
#define VN100_REG_QTR_SIZE   (7*4)
 
#define VN100_REG_QMA_SIZE   (10*4)
 
#define VN100_REG_QAR_SIZE   (10*4)
 
#define VN100_REG_QMR_SIZE   (13*4)
 
#define VN100_REG_DCM_SIZE   (9*4)
 
#define VN100_REG_MAG_SIZE   (3*4)
 
#define VN100_REG_ACC_SIZE   (3*4)
 
#define VN100_REG_GYR_SIZE   (3*4)
 
#define VN100_REG_MAR_SIZE   (9*4)
 
#define VN100_REG_REF_SIZE   (6*4)
 
#define VN100_REG_SIG_SIZE   (10*4)
 
#define VN100_REG_HSI_SIZE   (12*4)
 
#define VN100_REG_ATP_SIZE   (4*4)
 
#define VN100_REG_ACT_SIZE   (12*4)
 
#define VN100_REG_RFR_SIZE   (9*4)
 
#define VN100_REG_YMR_SIZE   (12*4)
 
#define VN100_REG_ACG_SIZE   4
 
#define VN100_DataSizeOfReg(_r)   (_r##_SIZE)
 
#define VN100_CmdID_ReadRegister   0x01
 
#define VN100_CmdID_WriteRegister   0x02
 
#define VN100_CmdID_WriteSettings   0x03
 
#define VN100_CmdID_RestoreFactorySettings   0x04
 
#define VN100_CmdID_Tare   0x05
 
#define VN100_CmdID_Reset   0x06
 
#define VN100_Error_None   0
 
#define VN100_Error_HardFaultException   1
 
#define VN100_Error_InputBufferOverflow   2
 
#define VN100_Error_InvalidChecksum   3
 
#define VN100_Error_InvalidCommand   4
 
#define VN100_Error_NotEnoughParameters   5
 
#define VN100_Error_TooManyParameters   6
 
#define VN100_Error_InvalidParameter   7
 
#define VN100_Error_InvalidRegister   8
 
#define VN100_Error_UnauthorizedAccess   9
 
#define VN100_Error_WatchdogReset   10
 
#define VN100_Error_OutputBufferOverflow   11
 
#define VN100_Error_InsufficientBandwidth   12
 
#define VN100_ADOR_OFF   0
 
#define VN100_ADOR_YPR   1
 
#define VN100_ADOR_QTN   2
 
#define VN100_ADOR_QTM   3
 
#define VN100_ADOR_QTA   4
 
#define VN100_ADOR_QTR   5
 
#define VN100_ADOR_QMA   6
 
#define VN100_ADOR_QAR   7
 
#define VN100_ADOR_QMR   8
 
#define VN100_ADOR_DCM   9
 
#define VN100_ADOR_MAG   10
 
#define VN100_ADOR_ACC   11
 
#define VN100_ADOR_GYR   12
 
#define VN100_ADOR_MAR   13
 
#define VN100_ADOR_YMR   14
 
#define VN100_ADOR_RAB   251
 
#define VN100_ADOR_RAW   252
 
#define VN100_ADOR_CMV   253
 
#define VN100_ADOR_STV   254
 
#define VN100_ADOR_COV   255
 
#define VN100_ADOF_1HZ   1
 
#define VN100_ADOF_2HZ   2
 
#define VN100_ADOF_4HZ   4
 
#define VN100_ADOF_5HZ   5
 
#define VN100_ADOF_10HZ   10
 
#define VN100_ADOF_20HZ   20
 
#define VN100_ADOF_25HZ   25
 
#define VN100_ADOF_40HZ   40
 
#define VN100_ADOF_50HZ   50
 
#define VN100_ADOF_100HZ   100
 
#define VN100_ADOF_200HZ   200
 
#define VN100_Baud_9600   9600
 
#define VN100_Baud_19200   19200
 
#define VN100_Baud_38400   38400
 
#define VN100_Baud_57600   57600
 
#define VN100_Baud_115200   115200
 
#define VN100_Baud_128000   128000
 
#define VN100_Baud_230400   230400
 
#define VN100_Baud_460800   460800
 
#define VN100_Baud_921600   921600
 
#define VN100_AccGain_2G   0
 
#define VN100_AccGain_6G   1
 
#define VN100_SPI_BUFFER_SIZE   48
 
#define VN100_Packet_SetBaud(_b)   { VN100_CmdID_WriteRegister, VN100_REG_SBAUD, 0, 0, { _b } }
 
#define VN100_Packet_SetADOR(_r)   { VN100_CmdID_WriteRegister, VN100_REG_ADOR, 0, 0, { _r } }
 
#define VN100_Packet_SetaDOF(_f)   { VN100_CmdID_WriteRegister, VN100_REG_ADOF, 0, 0, { _f } }
 
#define VN100_BytesOfWord(_w)   { (uint8_t)(_w & 0xFF), (uint8_t)((_w & (0xFF<<8))>>8), (uint8_t)((_w & (0xFF<<16))>>16), (uint8_t)((_w & (0xFF<<24))>>24) }
 
#define VN100_WordOfBytes(_b)   (((uint32_t)(_b[3])<<24)|((uint32_t)(_b[2])<<16)|((uint16_t)(_b[1])<<8)|(uint16_t)(_b[0]))
 

Data Structure Documentation

union VN100_Param

Definition at line 169 of file VN100.h.

Data Fields
float Float
uint32_t UInt
struct VN100_Req_Packet

Definition at line 178 of file VN100.h.

+ Collaboration diagram for VN100_Req_Packet:
Data Fields
uint8_t CmdID
VN100_Param Data[VN100_SPI_BUFFER_SIZE]
uint8_t RegID
uint8_t ZeroByte1
uint8_t ZeroByte2
struct VN100_Res_Packet

Definition at line 187 of file VN100.h.

+ Collaboration diagram for VN100_Res_Packet:
Data Fields
uint8_t CmdID
VN100_Param Data[VN100_SPI_BUFFER_SIZE]
uint8_t ErrID
uint8_t RegID
uint8_t ZeroByte

Macro Definition Documentation

#define VN100_AccGain_2G   0

Definition at line 165 of file VN100.h.

#define VN100_AccGain_6G   1

Definition at line 166 of file VN100.h.

#define VN100_ADOF_100HZ   100

Definition at line 150 of file VN100.h.

#define VN100_ADOF_10HZ   10

Definition at line 145 of file VN100.h.

#define VN100_ADOF_1HZ   1

Definition at line 141 of file VN100.h.

#define VN100_ADOF_200HZ   200

Definition at line 151 of file VN100.h.

#define VN100_ADOF_20HZ   20

Definition at line 146 of file VN100.h.

#define VN100_ADOF_25HZ   25

Definition at line 147 of file VN100.h.

#define VN100_ADOF_2HZ   2

Definition at line 142 of file VN100.h.

#define VN100_ADOF_40HZ   40

Definition at line 148 of file VN100.h.

#define VN100_ADOF_4HZ   4

Definition at line 143 of file VN100.h.

#define VN100_ADOF_50HZ   50

Definition at line 149 of file VN100.h.

#define VN100_ADOF_5HZ   5

Definition at line 144 of file VN100.h.

#define VN100_ADOR_ACC   11

Definition at line 130 of file VN100.h.

#define VN100_ADOR_CMV   253

Definition at line 136 of file VN100.h.

#define VN100_ADOR_COV   255

Definition at line 138 of file VN100.h.

#define VN100_ADOR_DCM   9

Definition at line 128 of file VN100.h.

#define VN100_ADOR_GYR   12

Definition at line 131 of file VN100.h.

#define VN100_ADOR_MAG   10

Definition at line 129 of file VN100.h.

#define VN100_ADOR_MAR   13

Definition at line 132 of file VN100.h.

#define VN100_ADOR_OFF   0

Definition at line 119 of file VN100.h.

#define VN100_ADOR_QAR   7

Definition at line 126 of file VN100.h.

#define VN100_ADOR_QMA   6

Definition at line 125 of file VN100.h.

#define VN100_ADOR_QMR   8

Definition at line 127 of file VN100.h.

#define VN100_ADOR_QTA   4

Definition at line 123 of file VN100.h.

#define VN100_ADOR_QTM   3

Definition at line 122 of file VN100.h.

#define VN100_ADOR_QTN   2

Definition at line 121 of file VN100.h.

#define VN100_ADOR_QTR   5

Definition at line 124 of file VN100.h.

#define VN100_ADOR_RAB   251

Definition at line 134 of file VN100.h.

#define VN100_ADOR_RAW   252

Definition at line 135 of file VN100.h.

#define VN100_ADOR_STV   254

Definition at line 137 of file VN100.h.

#define VN100_ADOR_YMR   14

Definition at line 133 of file VN100.h.

#define VN100_ADOR_YPR   1

Definition at line 120 of file VN100.h.

#define VN100_Baud_115200   115200

Definition at line 158 of file VN100.h.

#define VN100_Baud_128000   128000

Definition at line 159 of file VN100.h.

#define VN100_Baud_19200   19200

Definition at line 155 of file VN100.h.

#define VN100_Baud_230400   230400

Definition at line 160 of file VN100.h.

#define VN100_Baud_38400   38400

Definition at line 156 of file VN100.h.

#define VN100_Baud_460800   460800

Definition at line 161 of file VN100.h.

#define VN100_Baud_57600   57600

Definition at line 157 of file VN100.h.

#define VN100_Baud_921600   921600

Definition at line 162 of file VN100.h.

#define VN100_Baud_9600   9600

Definition at line 154 of file VN100.h.

#define VN100_BytesOfWord (   _w)    { (uint8_t)(_w & 0xFF), (uint8_t)((_w & (0xFF<<8))>>8), (uint8_t)((_w & (0xFF<<16))>>16), (uint8_t)((_w & (0xFF<<24))>>24) }

Definition at line 199 of file VN100.h.

#define VN100_CmdID_ReadRegister   0x01

Definition at line 96 of file VN100.h.

Referenced by vn100_periodic_task().

#define VN100_CmdID_Reset   0x06

Definition at line 101 of file VN100.h.

#define VN100_CmdID_RestoreFactorySettings   0x04

Definition at line 99 of file VN100.h.

#define VN100_CmdID_Tare   0x05

Definition at line 100 of file VN100.h.

#define VN100_CmdID_WriteRegister   0x02

Definition at line 97 of file VN100.h.

Referenced by ins_configure().

#define VN100_CmdID_WriteSettings   0x03

Definition at line 98 of file VN100.h.

#define VN100_DataSizeOfReg (   _r)    (_r##_SIZE)

Definition at line 93 of file VN100.h.

#define VN100_Error_HardFaultException   1

Definition at line 105 of file VN100.h.

#define VN100_Error_InputBufferOverflow   2

Definition at line 106 of file VN100.h.

#define VN100_Error_InsufficientBandwidth   12

Definition at line 116 of file VN100.h.

#define VN100_Error_InvalidChecksum   3

Definition at line 107 of file VN100.h.

#define VN100_Error_InvalidCommand   4

Definition at line 108 of file VN100.h.

#define VN100_Error_InvalidParameter   7

Definition at line 111 of file VN100.h.

#define VN100_Error_InvalidRegister   8

Definition at line 112 of file VN100.h.

#define VN100_Error_None   0

Definition at line 104 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_Error_NotEnoughParameters   5

Definition at line 109 of file VN100.h.

#define VN100_Error_OutputBufferOverflow   11

Definition at line 115 of file VN100.h.

#define VN100_Error_TooManyParameters   6

Definition at line 110 of file VN100.h.

#define VN100_Error_UnauthorizedAccess   9

Definition at line 113 of file VN100.h.

#define VN100_Error_WatchdogReset   10

Definition at line 114 of file VN100.h.

#define VN100_Packet_SetaDOF (   _f)    { VN100_CmdID_WriteRegister, VN100_REG_ADOF, 0, 0, { _f } }

Definition at line 197 of file VN100.h.

#define VN100_Packet_SetADOR (   _r)    { VN100_CmdID_WriteRegister, VN100_REG_ADOR, 0, 0, { _r } }

Definition at line 196 of file VN100.h.

#define VN100_Packet_SetBaud (   _b)    { VN100_CmdID_WriteRegister, VN100_REG_SBAUD, 0, 0, { _b } }

Definition at line 195 of file VN100.h.

#define VN100_REG_ACC   18

Definition at line 51 of file VN100.h.

#define VN100_REG_ACC_SIZE   (3*4)

Definition at line 81 of file VN100.h.

#define VN100_REG_ACG   28

Definition at line 61 of file VN100.h.

#define VN100_REG_ACG_SIZE   4

Definition at line 91 of file VN100.h.

#define VN100_REG_ACT   25

Definition at line 58 of file VN100.h.

#define VN100_REG_ACT_SIZE   (12*4)

Definition at line 88 of file VN100.h.

#define VN100_REG_ADOF   7

Definition at line 40 of file VN100.h.

Referenced by ins_configure(), and parse_ins_msg().

#define VN100_REG_ADOF_SIZE   4

Definition at line 70 of file VN100.h.

Referenced by ins_configure().

#define VN100_REG_ADOR   6

Definition at line 39 of file VN100.h.

Referenced by ins_configure(), and parse_ins_msg().

#define VN100_REG_ADOR_SIZE   4

Definition at line 69 of file VN100.h.

Referenced by ins_configure().

#define VN100_REG_ATP   24

Definition at line 57 of file VN100.h.

#define VN100_REG_ATP_SIZE   (4*4)

Definition at line 87 of file VN100.h.

#define VN100_REG_DCM   16

Definition at line 49 of file VN100.h.

#define VN100_REG_DCM_SIZE   (9*4)

Definition at line 79 of file VN100.h.

#define VN100_REG_FWVER   4

Definition at line 37 of file VN100.h.

#define VN100_REG_FWVER_SIZE   4

Definition at line 67 of file VN100.h.

#define VN100_REG_GYR   19

Definition at line 52 of file VN100.h.

#define VN100_REG_GYR_SIZE   (3*4)

Definition at line 82 of file VN100.h.

#define VN100_REG_HSI   23

Definition at line 56 of file VN100.h.

#define VN100_REG_HSI_SIZE   (12*4)

Definition at line 86 of file VN100.h.

#define VN100_REG_HWREV   2

Definition at line 35 of file VN100.h.

#define VN100_REG_HWREV_SIZE   4

Definition at line 65 of file VN100.h.

#define VN100_REG_MAG   17

Definition at line 50 of file VN100.h.

#define VN100_REG_MAG_SIZE   (3*4)

Definition at line 80 of file VN100.h.

#define VN100_REG_MAR   20

Definition at line 53 of file VN100.h.

#define VN100_REG_MAR_SIZE   (9*4)

Definition at line 83 of file VN100.h.

#define VN100_REG_MODEL   1

Library for the VectorNav VN100 AHRS based on VN_FWLIB from vector nav.

Definition at line 34 of file VN100.h.

#define VN100_REG_MODEL_SIZE   12

Definition at line 64 of file VN100.h.

#define VN100_REG_QAR   14

Definition at line 47 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QAR_SIZE   (10*4)

Definition at line 77 of file VN100.h.

#define VN100_REG_QMA   13

Definition at line 46 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QMA_SIZE   (10*4)

Definition at line 76 of file VN100.h.

#define VN100_REG_QMR   15

Definition at line 48 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QMR_SIZE   (13*4)

Definition at line 78 of file VN100.h.

#define VN100_REG_QTA   11

Definition at line 44 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QTA_SIZE   (7*4)

Definition at line 74 of file VN100.h.

#define VN100_REG_QTM   10

Definition at line 43 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QTM_SIZE   (7*4)

Definition at line 73 of file VN100.h.

#define VN100_REG_QTN   9

Definition at line 42 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QTN_SIZE   (4*4)

Definition at line 72 of file VN100.h.

#define VN100_REG_QTR   12

Definition at line 45 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_QTR_SIZE   (7*4)

Definition at line 75 of file VN100.h.

#define VN100_REG_REF   21

Definition at line 54 of file VN100.h.

#define VN100_REG_REF_SIZE   (6*4)

Definition at line 84 of file VN100.h.

#define VN100_REG_RFR   26

Definition at line 59 of file VN100.h.

#define VN100_REG_RFR_SIZE   (9*4)

Definition at line 89 of file VN100.h.

#define VN100_REG_SBAUD   5

Definition at line 38 of file VN100.h.

Referenced by ins_configure(), and parse_ins_msg().

#define VN100_REG_SBAUD_SIZE   4

Definition at line 68 of file VN100.h.

Referenced by ins_configure().

#define VN100_REG_SIG   22

Definition at line 55 of file VN100.h.

#define VN100_REG_SIG_SIZE   (10*4)

Definition at line 85 of file VN100.h.

#define VN100_REG_SN   3

Definition at line 36 of file VN100.h.

#define VN100_REG_SN_SIZE   12

Definition at line 66 of file VN100.h.

#define VN100_REG_YMR   27

Definition at line 60 of file VN100.h.

Referenced by parse_ins_msg(), and vn100_periodic_task().

#define VN100_REG_YMR_SIZE   (12*4)

Definition at line 90 of file VN100.h.

Referenced by vn100_periodic_task().

#define VN100_REG_YPR   8

Definition at line 41 of file VN100.h.

Referenced by parse_ins_msg().

#define VN100_REG_YPR_SIZE   (3*4)

Definition at line 71 of file VN100.h.

#define VN100_SPI_BUFFER_SIZE   48

Definition at line 175 of file VN100.h.

#define VN100_WordOfBytes (   _b)    (((uint32_t)(_b[3])<<24)|((uint32_t)(_b[2])<<16)|((uint16_t)(_b[1])<<8)|(uint16_t)(_b[0]))

Definition at line 200 of file VN100.h.