2 ******************************************************************************
4 * @file gpsv9protocol.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
6 * @brief brief goes here.
8 * @see The GNU Public License (GPL) Version 3
10 *****************************************************************************/
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #ifndef GPSV9PROTOCOL_H_
27 #define GPSV9PROTOCOL_H_
29 #include <openpilot.h>
30 #include <pios_struct_helper.h>
31 #include <pios_helpers.h>
32 #include <ubx_utils.h>
34 #define UBX_CFG_CLASS 0x06
35 #define UBX_CFG_PRT 0x00
36 #define UBX_OP_CUST_CLASS 0x99
37 #define UBX_OP_SYS 0x01
38 #define UBX_OP_MAG 0x02
41 #define SYS_DATA_OPTIONS_FLASH 0x01
42 #define SYS_DATA_OPTIONS_MAG 0x02
44 #define CFG_PRT_DATA_PORTID_DDC 0x00
45 #define CFG_PRT_DATA_TXREADI_DISABLED 0x00
46 #define CFG_PRT_DATA_PORTID_DDC 0x00
47 #define CFG_PRT_DATA_MODE_ADDR (0x42 << 1)
48 #define CFG_PRT_DATA_PROTO_UBX 0x01
49 #define CFG_PRT_DATA_PROTO_NMEA 0x02
50 #define CFG_PRT_DATA_PROTO_RTCM 0x04
51 #define CFG_PRT_DATA_FLAGS_EXTTIMEOUT 0x02
59 } __attribute__((packed
)) MagData
;
66 } __attribute__((packed
)) fragments
;
74 uint8_t board_revision
;
75 uint8_t commit_tag_name
[26];
77 } __attribute__((packed
)) SysData
;
96 uint16_t outProtoMask
;
99 } __attribute__((packed
)) CfgPrtData
;
110 #endif /* GPSV9PROTOCOL_H_ */