~csiro-asl/csiro-asl-ros-drivers/trunk

« back to all changes in this revision

Viewing changes to csiro_asl_drivers/novatelINS/src/changedOrcaFiles/gbxnovatelacfr/gbxnovatelutilacfr/novatelmessages.h

  • Committer: Nick Hillier
  • Date: 2011-08-03 03:16:26 UTC
  • Revision ID: nick.hillier@csiro.au-20110803031626-3ekp14jxlbda9bzf
Initial add of ROS wrappers for novatel INS around the Orca driver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
 
3
 *               http://gearbox.sf.net/
 
4
 * Copyright (c) 2004-2008 Michael Moser
 
5
 *
 
6
 * This distribution is licensed to you under the terms described in
 
7
 * the LICENSE file included in this distribution.
 
8
 *
 
9
 */
 
10
/*
 
11
 * Modified by Polly Alexander and Nick Hillier
 
12
 * 2009-2011
 
13
 */ 
 
14
 
 
15
#ifndef GBX_NOVATEL_MESSAGES_H
 
16
#define GBX_NOVATEL_MESSAGES_H
 
17
 
 
18
#include <stdint.h> // for uint8_t and friends
 
19
 
 
20
namespace gbxnovatelutilacfr{
 
21
enum BinaryLogType{
 
22
        InsCovSBLogType = 320, //!cov
 
23
    RawImuSBLogType = 325,
 
24
    BestGpsPosBLogType = 423,
 
25
    BestGpsVelBLogType = 506,
 
26
    InsPvaSBLogType = 508,
 
27
    InvalidLogType
 
28
};
 
29
 
 
30
#pragma pack(push,1)
 
31
// binary packet header; long version, mostly used for GPS gear
 
32
// according to:
 
33
// OEM4 Family Firmware Version 2.300 Command and Log Reference Rev 16; Table 4; Page 17
 
34
typedef struct Oem4BinaryHeader{        //offs, size,   comment
 
35
    uint8_t  sb1;                       //0     1       0xaa
 
36
    uint8_t  sb2;                       //1     1       0x44
 
37
    uint8_t  sb3;                       //2     1       0x12/0x13 , depending on long/short format
 
38
    uint8_t  headerLength;              //3     1
 
39
    uint16_t msgId;                     //4     2       which log we have
 
40
    uint8_t  msgType;                   //6     1       binary, ascii ...
 
41
    uint8_t  portAddress;               //7     1
 
42
    uint16_t msgLength;                 //8     2       _without_ header or CRC
 
43
    uint16_t seqNr;                     //10    2       for multiple related messages at a time (i.e. one per satellite)
 
44
    uint8_t  idleTime;                  //12    1
 
45
    uint8_t  timeStatus;                //13    1
 
46
    uint16_t gpsWeekNr;                 //14    2
 
47
    uint32_t msIntoWeek;                //16    4       milliseconds from beginning of week
 
48
    uint32_t receiverStatus;            //20    4
 
49
    uint16_t reserved;                  //24    2
 
50
    uint16_t swVersion;                 //26    2
 
51
}Oem4BinaryHeader;
 
52
 
 
53
// binary packet header; short version, mostly used for (higher rate) INS gear
 
54
// according to:
 
55
// SPAN Technology for OEMV User Manual Rev 3; Table 17; Page 74
 
56
typedef struct Oem4ShortBinaryHeader{   //offs, size,   comment
 
57
    uint8_t  sb1;                       //0     1       0xaa
 
58
    uint8_t  sb2;                       //1     1       0x44
 
59
    uint8_t  sb3;                       //2     1       0x12
 
60
    uint8_t  msgLength;                 //3     1       _without_ header or CRC
 
61
    uint16_t msgId;                     //4     2       which log we have
 
62
    uint16_t GpsWeekNr;                 //6     2
 
63
    uint32_t msIntoWeek;                //8     4       milliseconds from beginning of week
 
64
}Oem4ShortBinaryHeader;
 
65
 
 
66
 
 
67
typedef struct{                 //offs  size    comment
 
68
    uint32_t solutionStatus;    //0     4
 
69
    uint32_t positionType;      //4     4
 
70
    double   latitude;          //8     8       [deg] north positive
 
71
    double   longitude;         //16    8       [deg] east positive
 
72
    double   heightAMSL;        //24    8       [m] AMSL == above mean sea level (geoid)
 
73
    float    undulation;        //32    4       [m] aka geoidal seperation: undulation == heigth_ellipsoid - height_geoid/AMSL
 
74
    uint32_t datumId;           //36    4
 
75
    float    sigmaLatitude;     //40    4       [m] 1 standard deviation error estimate
 
76
    float    sigmaLongitude;    //44    4       [m] 1 standard deviation error estimate
 
77
    float    sigmaHeight;       //48    4       [m] 1 standard deviation error estimate
 
78
    int8_t   baseStationId[4];  //52    4
 
79
    float    diffAge;           //56    4       [s]
 
80
    float    solutionAge;       //60    4       [s]
 
81
    uint8_t  numObservations;   //64    1       number of observations tracked (?) L1 code/carrier/doppler + L2 code/carrier/doppler?
 
82
    uint8_t  numL1Ranges;       //65    1       number of L1 ranges used in computation (?)
 
83
    uint8_t  numL1RangesRTK;    //66    1       number of L1 ranges above the RTK mask angle (??) number of L1 carrier ranges used?
 
84
    uint8_t  numL2RangesRTK;    //67    1       number of L2 ranges above the RTK mask angle (??) number of L2 carrier ranges used?
 
85
    uint8_t  reserved0;         //68    1
 
86
    uint8_t  reserved1;         //69    1
 
87
    uint8_t  reserved2;         //70    1
 
88
    uint8_t  reserved3;         //71    1
 
89
    uint32_t crc;               //72    4
 
90
}BestGpsPosData;
 
91
 
 
92
typedef struct{
 
93
    Oem4BinaryHeader header;
 
94
    BestGpsPosData   data;
 
95
}BestGpsPosLogB;
 
96
 
 
97
typedef struct{                 //offs  size    comment
 
98
    uint32_t solutionStatus;    //0     4
 
99
    uint32_t velocityType;      //4     4
 
100
    float    latency;           //8     4       [s]
 
101
    float    diffAge;           //12    4       [s]
 
102
    double   horizontalSpeed;   //16    8       [m/s]
 
103
    double   trackOverGround;   //24    8       [deg] w respect to true North
 
104
    double   verticalSpeed;     //32    8       [m/s]
 
105
    float    reserved;          //40    4
 
106
    uint32_t crc;               //44    4
 
107
}BestGpsVelData;
 
108
 
 
109
typedef struct{
 
110
    Oem4BinaryHeader header;
 
111
    BestGpsVelData   data;
 
112
}BestGpsVelLogB;
 
113
 
 
114
typedef struct{                 //offs  size    comment
 
115
    uint32_t gpsWeekNr;         //0     4
 
116
    double   secIntoWeek;       //4     8
 
117
    double   latitude;          //12    8       [deg] north positive WGS84
 
118
    double   longitude;         //20    8       [deg] east positive WGS84
 
119
    double   height;            //28    8       [m] above ellipsoid WGS84 (heigth_ellipsoid - undulation == height_geoid/AMSL)
 
120
    double   northVelocity;     //36    8       [m/s] south is negative; true north?
 
121
    double   eastVelocity;      //44    8       [m/s] west is negative; true east?
 
122
    double   upVelocity;        //52    8       [m/s] down is negative; geoid/ellipsoid vertical?
 
123
    //The default IMU axis definitions are:
 
124
    //  Y - forward
 
125
    //  Z - up
 
126
    //  X - right hand side
 
127
    double   roll;              //60    8       [degree] right handed rotation from local level around y-axes
 
128
    double   pitch;             //68    8       [degree] right handed rotation from local level around x-axes
 
129
    double   azimuth;           //60    8       [degree] left handed around z-axes rotation from (true?) north clockwise
 
130
    uint32_t insStatus;         //68    4
 
131
    uint32_t crc;               //72    4
 
132
}InsPvaData;
 
133
 
 
134
//binary log with full headers
 
135
typedef struct{
 
136
    Oem4BinaryHeader header;
 
137
    InsPvaData   data;
 
138
}InsPvaLogB;
 
139
 
 
140
//binary log with short header; *preferred*, since this log is usually done at high rate
 
141
typedef struct{
 
142
    Oem4ShortBinaryHeader header;
 
143
    InsPvaData   data;
 
144
}InsPvaLogSB;
 
145
 
 
146
//!cov:start --- pity Novatel does not know that cov matrices are/should be symmetric !!!
 
147
typedef struct{                 //offs  size    comment
 
148
    uint32_t gpsWeekNr;         //0     4
 
149
    double   secIntoWeek;       //4     8
 
150
        
 
151
    double   posxx;                     //12    8       
 
152
    double   posxy;                 //20    8       
 
153
    double   posxz;             //28    8       
 
154
    double   posyx;             //36    8       
 
155
    double   posyy;             //44    8       
 
156
    double   posyz;             //52    8       
 
157
    double   poszx;             //60    8       
 
158
    double   poszy;             //68    8       
 
159
    double   poszz;             //76    8       
 
160
 
 
161
    double   attxx;                 //84    8       
 
162
    double   attxy;             //92    8       
 
163
    double   attxz;             //100   8       
 
164
    double   attyx;             //108   8       
 
165
    double   attyy;             //116   8       
 
166
    double   attyz;             //124   8       
 
167
    double   attzx;             //132   8       
 
168
    double   attzy;             //140   8       
 
169
    double   attzz;             //148   8       
 
170
        
 
171
    double   velxx;                 //156   8       
 
172
    double   velxy;             //164   8       
 
173
    double   velxz;             //172   8       
 
174
    double   velyx;             //180   8       
 
175
    double   velyy;             //188   8       
 
176
    double   velyz;             //196   8       
 
177
    double   velzx;             //204   8       
 
178
    double   velzy;             //212   8       
 
179
    double   velzz;             //220   8       
 
180
        
 
181
    uint32_t crc;               //228   4
 
182
}InsCovData;
 
183
 
 
184
//binary log with full headers
 
185
typedef struct{
 
186
    Oem4BinaryHeader header;
 
187
    InsCovData   data;
 
188
}InsCovLogB;
 
189
 
 
190
//binary log with short header; *preferred*, since this log is usually done at high rate
 
191
typedef struct{
 
192
    Oem4ShortBinaryHeader header;
 
193
    InsCovData   data;
 
194
}InsCovLogSB;
 
195
//!cov:end
 
196
 
 
197
typedef struct{                 //offs  size    comment
 
198
    uint32_t gpsWeekNr;         //0     4
 
199
    double   secIntoWeek;       //4     8
 
200
    uint32_t imuStatus;         //12    4
 
201
    //The default IMU axis definitions are:
 
202
    //  Y - forward
 
203
    //  Z - up
 
204
    //  X - out the right hand side
 
205
    int32_t zAccelCnt;          //16    4
 
206
    int32_t yNegativAccelCnt ;  //20    4
 
207
    int32_t xAccelCnt;          //24    4
 
208
    int32_t zGyroCnt;           //28    4
 
209
    int32_t yNegativGyroCnt;    //32    4
 
210
    int32_t xGyroCnt;           //36    4
 
211
    int32_t crc;                //40    4
 
212
}RawImuData;
 
213
 
 
214
//binary log with full headers
 
215
typedef struct{
 
216
    Oem4BinaryHeader header;
 
217
    RawImuData   data;
 
218
}RawImuLogB;
 
219
 
 
220
//binary log with short header; *preferred*, since this log is done at high rate
 
221
typedef struct{
 
222
    Oem4ShortBinaryHeader header;
 
223
    RawImuData   data;
 
224
}RawImuLogSB;
 
225
#pragma pack(pop)
 
226
} //namespace
 
227
#endif