BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
skytraq.h
Go to the documentation of this file.
1 /* Copyright 2013-2014, Peter A. Bigot
2  *
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * * Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * * Neither the name of the software nor the names of its contributors may be
16  * used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef BSP430_SENSORS_SKYTRAQ_H
33 #define BSP430_SENSORS_SKYTRAQ_H
34 
74 #include <bsp430/core.h>
75 
77 typedef enum eSkyTraqMessageID {
80  /* Input System Messages */
92  /* Input GPS messages */
107  /* Output System Messages */
114  /* Output GPS Messages */
123 
126 {
127  uint8_t mid;
128  uint8_t payload[1];
129 };
130 
134 {
135  uint8_t mid;
136  uint8_t mode;
137  uint16_t year_be;
138  uint8_t mon;
139  uint8_t mday;
140  uint8_t hour;
141  uint8_t min;
142  uint8_t sec;
143  int16_t lat_cdeg_be;
144  int16_t lon_cdeg_be;
145  int16_t alt_m_be;
146 };
147 
151 {
152  uint8_t mid;
153  uint8_t type;
154 };
155 
159 {
160  uint8_t mid;
161  uint8_t type;
162 };
163 
168 {
169  uint8_t mid;
170  uint8_t type;
171 };
172 
176 {
177  uint8_t mid;
178  uint8_t port;
179  uint8_t baud_idx;
180  uint8_t attributes;
181 };
182 
186 {
187  uint8_t mid;
188  uint8_t gga_s;
189  uint8_t gsa_s;
190  uint8_t gsv_s;
191  uint8_t gll_s;
192  uint8_t rmc_s;
193  uint8_t vtg_s;
194  uint8_t zda_s;
195  uint8_t attributes;
196 };
197 
201 {
202  uint8_t mid;
203  uint8_t type;
204 };
205 
209 {
210  uint8_t mid;
211  uint8_t type;
212  uint32_t kernel;
213  uint32_t odm;
214  uint32_t revision;
215 };
216 
221 {
222  uint8_t mid;
223  uint8_t in_mid;
224 };
225 
229 {
230  uint8_t mid;
231  uint8_t fix_mode;
232  uint8_t nsv;
233  uint16_t gps_week_be;
234  uint32_t gps_tow_cs_be;
235  int32_t lat_xdeg_be;
236  int32_t lon_xdeg_be;
237  uint32_t ell_alt_cm_be;
238  uint32_t msl_alt_cm_be;
239  uint16_t gdop_pc_be;
240  uint16_t pdop_pc_be;
241  uint16_t hdop_pc_be;
242  uint16_t vdop_pc_be;
243  uint16_t tdop_pc_be;
244  int32_t ecef_x_cm_be;
245  int32_t ecef_y_cm_be;
246  int32_t ecef_z_cm_be;
247  int32_t ecef_vx_cm_be;
248  int32_t ecef_vy_cm_be;
249  int32_t ecef_vz_cm_be;
250 };
251 
254 typedef union uSkyTraqMsgIn {
256  struct sSkyTraqMsgIn_RESTART restart;
257  struct sSkyTraqMsgIn_SW_VERSION sw_version;
258  struct sSkyTraqMsgIn_FACTORY_DEFAULTS factory_defaults;
259  struct sSkyTraqMsgIn_CFG_SERIAL cfg_serial;
260  struct sSkyTraqMsgIn_CFG_NMEA cfg_nmea;
261  struct sSkyTraqMsgIn_CFG_FORMAT cfg_format;
262 } uSkyTraqMsgIn;
263 
266 typedef union uSkyTraqMsgOut {
268  struct sSkyTraqMsgOut_SW_VERSION sw_version;
269  struct sSkyTraqMsgOut_ACK ack;
270  struct sSkyTraqMsgOut_ACK nack;
271  struct sSkyTraqMsgOut_NAV_DATA nav_data;
273 
277 typedef union uSkyTraqMsg {
279  char nmea[1];
282 } uSkyTraqMsg;
283 
293 #ifndef SKYTRAQ_NMEA_RX_POOL_SIZE
294 #define SKYTRAQ_NMEA_RX_POOL_SIZE 100
295 #endif /* SKYTRAQ_NMEA_RX_POOL_SIZE */
296 
304 #ifndef SKYTRAQ_NMEA_RX_POOL_FRAGMENTS
305 #define SKYTRAQ_NMEA_RX_POOL_FRAGMENTS 4
306 #endif /* SKYTRAQ_NMEA_RX_POOL_FRAGMENTS */
307 
308 #endif /* BSP430_SENSORS_SKYTRAQ_H */
Definition: skytraq.h:158
Definition: skytraq.h:125
uint8_t rmc_s
Definition: skytraq.h:192
union uSkyTraqMsgOut uSkyTraqMsgOut
uint8_t mid
Definition: skytraq.h:187
Definition: skytraq.h:115
uint8_t type
Definition: skytraq.h:153
int16_t lat_cdeg_be
Definition: skytraq.h:143
int32_t ecef_y_cm_be
Definition: skytraq.h:245
Definition: skytraq.h:150
uint8_t hour
Definition: skytraq.h:140
Definition: skytraq.h:208
Definition: skytraq.h:228
uint16_t hdop_pc_be
Definition: skytraq.h:241
Definition: skytraq.h:101
uint32_t revision
Definition: skytraq.h:214
Definition: skytraq.h:81
Definition: skytraq.h:85
Definition: skytraq.h:89
Definition: skytraq.h:90
Definition: skytraq.h:200
uint32_t msl_alt_cm_be
Definition: skytraq.h:238
Definition: skytraq.h:133
Definition: skytraq.h:112
Definition: skytraq.h:167
uint32_t kernel
Definition: skytraq.h:212
Definition: skytraq.h:102
int16_t alt_m_be
Definition: skytraq.h:145
uint8_t mid
Definition: skytraq.h:160
Common header included by all BSP430 leaf headers.
uint8_t nsv
Definition: skytraq.h:232
uint8_t mid
Definition: skytraq.h:177
Definition: skytraq.h:118
int32_t ecef_vx_cm_be
Definition: skytraq.h:247
Definition: skytraq.h:82
uint8_t port
Definition: skytraq.h:178
Definition: skytraq.h:277
uint8_t gsv_s
Definition: skytraq.h:190
int32_t ecef_vz_cm_be
Definition: skytraq.h:249
Definition: skytraq.h:93
Definition: skytraq.h:97
uint8_t baud_idx
Definition: skytraq.h:179
struct sSkyTraqMsg_GENERIC generic
Definition: skytraq.h:255
Definition: skytraq.h:111
uint8_t type
Definition: skytraq.h:161
uint8_t mid
Definition: skytraq.h:230
uint8_t type
Definition: skytraq.h:211
Definition: skytraq.h:119
uint8_t gll_s
Definition: skytraq.h:191
Definition: skytraq.h:103
Definition: skytraq.h:175
uint32_t ell_alt_cm_be
Definition: skytraq.h:237
int32_t lon_xdeg_be
Definition: skytraq.h:236
#define BSP430_CORE_PACKED_STRUCT(nm_)
Definition: core.h:468
Definition: skytraq.h:86
Definition: skytraq.h:108
union uSkyTraqMsg uSkyTraqMsg
Definition: skytraq.h:88
uint32_t odm
Definition: skytraq.h:213
uint8_t vtg_s
Definition: skytraq.h:193
Definition: skytraq.h:98
uint8_t gsa_s
Definition: skytraq.h:189
uint8_t fix_mode
Definition: skytraq.h:231
uint8_t mid
Definition: skytraq.h:210
int32_t ecef_x_cm_be
Definition: skytraq.h:244
uint8_t attributes
Definition: skytraq.h:180
uint8_t type
Definition: skytraq.h:203
uint32_t gps_tow_cs_be
Definition: skytraq.h:234
uint8_t mid
Definition: skytraq.h:127
uint8_t mid
Definition: skytraq.h:222
char nmea[1]
Definition: skytraq.h:279
Definition: skytraq.h:105
uint16_t tdop_pc_be
Definition: skytraq.h:243
Definition: skytraq.h:100
Definition: skytraq.h:120
uint8_t sec
Definition: skytraq.h:142
int32_t ecef_z_cm_be
Definition: skytraq.h:246
int32_t ecef_vy_cm_be
Definition: skytraq.h:248
Definition: skytraq.h:109
uint16_t gdop_pc_be
Definition: skytraq.h:239
Definition: skytraq.h:95
uint8_t gga_s
Definition: skytraq.h:188
uint8_t mid
Definition: skytraq.h:169
uint16_t pdop_pc_be
Definition: skytraq.h:240
int32_t lat_xdeg_be
Definition: skytraq.h:235
uSkyTraqMsgIn in
Definition: skytraq.h:280
Definition: skytraq.h:220
uint8_t attributes
Definition: skytraq.h:195
Definition: skytraq.h:185
union uSkyTraqMsgIn uSkyTraqMsgIn
uint8_t type
Definition: skytraq.h:170
uint8_t mid
Definition: skytraq.h:135
uint8_t mid
Definition: skytraq.h:202
uint8_t mday
Definition: skytraq.h:139
Definition: skytraq.h:84
Definition: skytraq.h:83
Definition: skytraq.h:99
int16_t lon_cdeg_be
Definition: skytraq.h:144
uint8_t mid
Definition: skytraq.h:152
uint16_t year_be
Definition: skytraq.h:137
Definition: skytraq.h:87
uint8_t min
Definition: skytraq.h:141
uint16_t gps_week_be
Definition: skytraq.h:233
Definition: skytraq.h:266
struct sSkyTraqMsg_GENERIC generic
Definition: skytraq.h:278
struct sSkyTraqMsg_GENERIC generic
Definition: skytraq.h:267
uSkyTraqMsgOut out
Definition: skytraq.h:281
uint8_t zda_s
Definition: skytraq.h:194
Definition: skytraq.h:117
Definition: skytraq.h:104
eSkyTraqMessageID
Definition: skytraq.h:77
Definition: skytraq.h:96
Definition: skytraq.h:254
Definition: skytraq.h:110
Definition: skytraq.h:94
Definition: skytraq.h:78
uint16_t vdop_pc_be
Definition: skytraq.h:242
Definition: skytraq.h:116
uint8_t mon
Definition: skytraq.h:138
uint8_t mode
Definition: skytraq.h:136
uint8_t in_mid
Definition: skytraq.h:223