Commit Graph

115 Commits

Author SHA1 Message Date
Andrew Tridgell 78858bbcdd AP_GPS: switch ublox over to 230400 baud
this ensures we have sufficient bandwidth for raw data
2020-06-01 17:18:17 -07:00
Andrew Tridgell 3397ed766d AP_GPS: enable ublox moving baseline compilation option
disable for HAL_MINIMIZE_FEATURES and if max receivers 1. This fixes
the f103-GPS AP_Periph build
2020-04-21 15:30:54 +10:00
Andrew Tridgell 7027eecd34 AP_GPS: added GPS_DRV_OPTIONS
this allows for configuration of moving baseline with either uart1 or
uart2 for the RTCM data. Using uart2 requires an extra cable between
the two modules, but requires less uart bandwidth which is good when
DMA channels are low. Using uart2 also avoids the rtcmv3 parser, which
saves memory
2020-04-21 15:30:54 +10:00
Andrew Tridgell 9a6de209ab AP_GPS: ensure that PVT and RELPOSNED msgs time align
this ensures we wait until we have a matching PVT and RELPOSNED
message before we report new data. If we stop receiving RELPOSNED
messages then disable yaw support
2020-04-21 15:30:54 +10:00
Andrew Tridgell db777c56b9 AP_GPS: provide yaw feedback in GPS_RAW_INT and GPS2_RAW
allow GPS to display status of GPS yaw for moving baseline and NMEA
2020-01-07 12:37:35 +11:00
Andrew Tridgell e40c570615 AP_GPS: faster config of moving baseline
thanks to MdB for suggestion
2020-01-07 12:37:35 +11:00
Andrew Tridgell e660532f67 AP_GPS: fixes from PR review 2020-01-07 12:37:35 +11:00
Andrew Tridgell 93aaf98672 AP_GPS: added automatic u-blox moving baseline configuration
this uses GPS_TYPE and GPS_TYPE2 to setup two u-blox F9 receivers in a
RTK moving baseline configuration
2020-01-07 12:37:35 +11:00
Michael du Breuil 150a4edcf2 AP_GPS: UBlox fix not listing the time mode as a configuration reason 2019-11-16 15:28:52 +11:00
Andrew Tridgell 7bec9d87b4 AP_GPS: fixed TMODE config issue on non-F9 GPS
thanks to Michel Pastor for reporting this
2019-11-16 15:28:52 +11:00
Andrew Tridgell 6c31fb1bb6 AP_GPS: added automatic config of TMODE on F9
the Drotek F9 GPS ships with TMODE enabled, which means we don't get a
3D fix.

This also adds the VALGET/VALSET msgs we will need for automatic
moving baseline config
2019-11-09 17:11:32 +11:00
Andrew Tridgell 37fb028532 AP_GPS: improved checking for valid yaw for moving baseline
and fixed check for carrSolnFixed
2019-10-15 11:06:11 +11:00
Michael du Breuil 2587b13ae7 AP_GPS: UBLOX: Parse RELPOSNED messages
This does not yet:
  - validate the receiver configuration
  - manage timing out stale GPS heading info
  - relPosNormalized usage isn't clear, which may defeat the STRICT_LENGTH_CHECK
2019-10-15 11:06:11 +11:00
Andrew Tridgell 5bfb6ced84 AP_GPS: fixed u-blox F9 auto configuration 2019-07-05 13:31:40 +10:00
Michael Oborne 6031f5b6a9 AP_GPS_UBLOX: add support for TIMEGPS message. used to get gps week 2019-05-29 09:48:17 +10:00
Michael du Breuil 833bc8f12a AP_GPS: Ensure that all ublox configuration failure reasons have a description 2019-04-02 08:15:59 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Andrew Tridgell d761b24b92 AP_GPS: optionally configure a hardware PPS pin for uBlox
useful for testing time lag estimation
2018-12-04 11:37:38 +11:00
Andrew Tridgell df68d6413c AP_GPS: moved iTow handling to GPS_Backend 2018-12-04 11:37:38 +11:00
Andrew Tridgell 3fe4b9c0f8 AP_GPS: make GPS packet timestamps more accurate
this reduces the effect of processing time and uart transmit time
2018-12-04 11:37:38 +11:00
Peter Barker fd888727b8 AP_GPS: add override keyword where required 2018-11-08 11:30:12 +11:00
Michael du Breuil 5f8633e322 AP_GPS: Allow backends to report their lag confidences 2017-06-21 11:44:45 +01:00
Peter Barker 1ba59b446c AP_GPS: log ublox sw and hw versions on dataflash log start
This burns 41 bytes of RAM for each u-Blox GPS.
2017-04-23 21:04:17 +01:00
Peter Barker 2354a0ec5a AP_GPS: ability to log GPS detection state to dataflash 2017-04-23 21:03:23 +01:00
Peter Barker 4334a92ac9 AP_GPS: remove unimplemented method declarations 2017-04-23 09:08:30 +10:00
Michael du Breuil 6f297deaf7 AP_GPS: Unify inject_data interface for all classes 2017-04-19 02:05:51 +01:00
Randy Mackay e764f0d5d0 AP_GPS: sanity check update rate
Also minor spelling and parameter documentation fix
2017-03-13 11:31:51 +11:00
Michael du Breuil 398ff823c0 AP_GPS: Always consider ublox as configured in sitl 2017-03-07 12:43:30 +11:00
Michael du Breuil 7b483a1460 AP_GPS: Ublox, always quickly set the rates until we have fetched the version 2017-02-23 07:33:58 +11:00
Andrew Tridgell 5d18f3a453 AP_GPS: added backend specific get_lag() function
the ublox7 and 8 seem to produce lower lag, around 120ms. Separately
we should also look at running these at 10Hz and see if that helps.
2017-01-27 16:57:42 +09:00
Michael du Breuil 855d91145a AP_GPS: ublox - fix incorrect step ordering 2017-01-25 03:44:57 +00:00
Michael du Breuil 1c1e6e9398 AP_GPS: Support more fix types 2017-01-25 03:44:42 +00:00
Michael Oborne d05b0d5885 AP_GPS_UBLOX: add pvt message support 2017-01-25 03:34:26 +00:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell 9caf44b494 AP_GPS: update drivers for changed inject_data() API
need 16 bit length
2016-10-11 11:00:35 +11:00
Michael du Breuil cf5e79f80e AP_GPS: ublox support user controlled rate updates
Also corrects accepting bad nav rates as configured, and fixes a incorrect
index as to which GPS is being updated
2016-10-11 10:44:51 +11:00
Michael du Breuil 86c2b1d84a AP_GPS: u-blox Remove 5Hz warning
The warnings test case is better covered by the rest of the driver
while it is performing the normal settings audit.
2016-10-11 10:44:51 +11:00
Michael du Breuil 3e3f539a6a AP_GPS: Raise target baud of u-blox devices
A knockon effect is that we need less config strings as raw logging
on u-blox will use the same baud rates
2016-10-11 10:44:50 +11:00
Gustavo Jose de Sousa 174cefa8a5 AP_GPS: use ARRAY_SUBSCRIPT instead of bytes field
That fixed compilation issues and seems more semantically correct. Using array
of length 0 fails compilation because of -Werror=array-bounds in GCC 6.1.
2016-06-23 21:02:05 -03:00
Andrew Tridgell af116d238f AP_GPS: use zero length flexible arrays
this works with gcc-6.1 and also works with asan. Hopefully it will
make coverity happy too.
2016-05-25 19:55:49 +10:00
Lucas De Marchi 39bd196481 AP_GPS: do not use flexible array in union
We actually don't want a flexible array in this union, but rather a way
to access it byte by byte. This fixes the build for gcc >= 6

In file included from ../../libraries/AP_GPS/AP_GPS.cpp:24:0:
../../libraries/AP_GPS/AP_GPS_ERB.h:93:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_ERB.cpp:22:0:
../../libraries/AP_GPS/AP_GPS_ERB.h:93:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_MTK.cpp:25:0:
../../libraries/AP_GPS/AP_GPS_MTK.h:75:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_MTK19.cpp:26:0:
../../libraries/AP_GPS/AP_GPS_MTK.h:75:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_SIRF.cpp:22:0:
../../libraries/AP_GPS/AP_GPS_SIRF.h:101:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_UBLOX.cpp:23:0:
../../libraries/AP_GPS/AP_GPS_UBLOX.h:387:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.
2016-05-16 13:50:39 -03:00
Lucas De Marchi ff10d1136c AP_GPS: reorganize includes
Due to the way the headers are organized a single change in a
AP_GPS backend would trigger a rebuild for most of the files in the
project. Time could be saved by using ccache (since most of the things
didn't change) but we can do better, i.e.  re-organize
the headers so we don't have to re-build everything.

This makes internal headers internal and then other libraries only
depend on the AP_GPS.h header.
2016-04-14 21:01:51 -03:00
Lucas De Marchi affa759fb4 AP_GPS: add missing override 2016-04-13 11:27:19 -03:00
Michael du Breuil 2538c17ee0 AP_GPS: add fetching of gps configuration failure reasons 2016-04-13 11:24:01 -03:00
Michael Oborne 92106a944f AP_GPS_UBLOX: add data injection support 2016-03-18 15:51:32 +11:00
Lucas De Marchi cd266fbf4f AP_GPS: replace header guard with pragma once 2016-03-16 18:40:40 +11:00
Tom Pittenger 18163bd01f AP_GPS_UBLOX: save cfg only when needed
added GPS_SAVE_CFG param option 2
2016-02-12 15:33:18 -08:00
Michael du Breuil 4251ee0e4b AP_GPS: u-blox verify ublox settings
The ublox driver will now continuosly poll for the settings from the GPS and correct any that are found to be in correct.
This status is then reported to the arming library as an additional arming check, allowing the user to be sure that the
gps is correctly configured before using it. If a user has a GPS2 configured that is not present they will fail the arming
checks until after they have disabled the second GPS.

2 new parameters were introduced as well:
  -GPS_AUTO_CONFIG: Will not request any configuration packets to attempt to change them. (If the packet is recieved then
    a update will be sent to it, but in testing this scenario never occured. This is set to 1 or 0 to change the setting.
    (Defaults to 1 enabling auto config)
  -GPS_GNSS_MODE2: Behaves the same way as GPS_GNSS_MODE but only applies to the second GPS.

GPS drivers are now allowed 2 seconds of non responsiveness before being unloaded
2016-02-12 00:37:04 -08:00
Randy Mackay 36c0beb918 GPS_UBlox: reorder init to resolve compiler warning
Also removed duplicate init of noReceivedHdop
2015-11-16 15:09:17 +09:00
Siddharth Bharat Purohit 5e2382ea09 AP_GPS:UBLOX: send save cfg msg once per 5s and 5 times only 2015-11-10 15:16:55 +11:00