Switch from GPLv2 to GPLv2+
[fw/altos] / src / drivers / ao_gps_ublox.h
index 13bf6955b2401a9cb203f19f82bd3ca04e6c4b97..1d9bcee89897e472c75a0245ecdcdc9c5c6cdb60 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -50,8 +51,8 @@ struct ublox_nav_posllh {
        uint16_t        length;         /* 28 */
 
        uint32_t        itow;           /* ms */
-       int32_t         lat;            /* deg * 1e7 */
        int32_t         lon;            /* deg * 1e7 */
+       int32_t         lat;            /* deg * 1e7 */
        int32_t         height;         /* mm */
        int32_t         hmsl;           /* mm */
        uint32_t        hacc;           /* mm */
@@ -238,4 +239,30 @@ struct ublox_nav_velned {
        uint32_t        cacc;           /* deg */
 };
 
+#define UBLOX_CFG      0x06
+
+#define UBLOX_CFG_NAV5 0x24
+
+#define UBLOX_CFG_NAV5_MASK_DYN                        0
+#define UBLOX_CFG_NAV5_MASK_MINE1              1
+#define UBLOX_CFG_NAV5_MASK_FIXMODE            2
+#define UBLOX_CFG_NAV5_MASK_DRLIM              3
+#define UBLOX_CFG_NAV5_MASK_POSMASK            4
+#define UBLOX_CFG_NAV5_MASK_TIMEMASK           5
+#define UBLOX_CFG_NAV5_MASK_STATICHOLDMASK     6
+#define UBLOX_CFG_NAV5_MASK_DGPSMASK           7
+
+#define UBLOX_CFG_NAV5_DYNMODEL_PORTABLE       0
+#define UBLOX_CFG_NAV5_DYNMODEL_STATIONARY     2
+#define UBLOX_CFG_NAV5_DYNMODEL_PEDESTRIAN     3
+#define UBLOX_CFG_NAV5_DYNMODEL_AUTOMOTIVE     4
+#define UBLOX_CFG_NAV5_DYNMODEL_SEA            5
+#define UBLOX_CFG_NAV5_DYNMODEL_AIRBORNE_1G    6
+#define UBLOX_CFG_NAV5_DYNMODEL_AIRBORNE_2G    7
+#define UBLOX_CFG_NAV5_DYNMODEL_AIRBORNE_4G    8
+
+#define UBLOX_CFG_NAV5_FIXMODE_2D              1
+#define UBLOX_CFG_NAV5_FIXMODE_3D              2
+#define UBLOX_CFG_NAV5_FIXMODE_AUTO            3
+
 #endif /* _AO_GPS_UBLOX_H_ */