Peter Barker
da66ecf1f2
AP_GPS: move SBP logging structures into AP_GPS
2021-09-28 10:45:51 +10:00
Peter Barker
1ae8385a0f
AP_GPS: correct GPS switching when GPS blending disabled
2021-09-28 09:08:50 +10:00
Peter Barker
6d615a3e16
AP_GPS: move from HAL_NO_GCS to HAL_GCS_ENABLED
2021-09-22 21:37:00 +10:00
bugobliterator
f3fef657f9
AP_GPS: handle failure to allocation of GPS CAN message subscribers
2021-09-22 21:36:34 +10:00
Josh Henderson
06251335da
AP_GPS: use vector.xy().length() instead of norm(x,y)
2021-09-14 10:43:46 +10:00
bugobliterator
ddc50a8420
AP_GPS: add option to set a dedicated line for Moving Baseline Data
2021-08-19 14:20:58 +10:00
bugobliterator
d32111b376
AP_GPS: fix handling of RTCM3 parser with user notification for bad cfg
2021-08-19 14:20:58 +10:00
bugobliterator
3b58463bfd
AP_GPS: initialise uavcan drv interim_state with state structure at startup
2021-08-19 14:20:58 +10:00
bugobliterator
85d8becb8c
AP_GPS: add support for auto config Moving Baseline for AP_Periph GPS
2021-08-19 14:20:58 +10:00
bugobliterator
9fc57e40b4
AP_GPS: add support for dual GPS heading using Periph GPSes
2021-08-19 14:20:58 +10:00
Andrew Tridgell
4f4a0a02f6
AP_GPS: added doc message for bit 2 of DRV_OPTIONS
2021-08-10 10:54:14 +10:00
Andrew Tridgell
1479566921
AP_GPS: added GPS_DRV_OPTIONS bit for forcing ublox GPS to 115200
...
this may help with some GPS modules
2021-08-10 10:54:14 +10:00
Peter Barker
c9699d7ce4
AP_GPS: log GPS primary change event in GPS library
2021-08-06 15:30:18 +10:00
Andrew Tridgell
f8e40eef00
AP_GPS: fixed printf format errors
2021-08-05 09:43:35 +10:00
Andrew Tridgell
9a262d19ed
AP_GPS: mark log messages as streaming
2021-08-03 10:23:36 +10:00
Andrew Tridgell
0e7c2a27a6
AP_GPS: added arming checks for yaw available on ublox RTK rover
2021-07-30 06:51:21 +10:00
Andrew Tridgell
e5d878eebd
AP_GPS: change handling of moving baseline yaw
...
this changes yaw handling in a few ways:
- GPS yaw now has a timestamp associated with the yaw separate from
the timestamp associated with the GPS fix
- we no longer force the primary to change to the UBLOX MB rover when
it has a GPS yaw. This means we don't change GPS primary due to GPS
loss, which keeps the GPS more stable. It also increases accuracy
as the rover is always less accurate in position and velocity than
the base
- now we force the primary to be the MB base if the other GPS is a
rover and the base has GPS lock
2021-07-21 17:59:49 +10:00
Siddharth Purohit
c18652f35a
AP_GPS: add option to enable configuring PPS pin in UBLOX driver
2021-07-02 08:50:16 +10:00
Peter Barker
c0c3f92c39
AP_GPS: remove @Values from param metadata where @Bitmask exists
2021-06-23 18:37:34 +10:00
Peter Barker
9e5662e927
AP_GPS: remove HIL support
2021-06-15 09:47:31 +10:00
Peter Barker
15cd41ca19
AP_GPS: add support for AP_Logger into AP_Periph
2021-06-08 09:57:55 +10:00
Michael du Breuil
60e47b56f5
AP_GPS: Nova: Remove unneeded injection override
2021-05-25 10:07:05 +10:00
Andrew Tridgell
02feaaffcd
AP_GPS: setup ublox moving baseline at 230400 when using uart2
...
this avoids issues with needing DMA on the UARTs when using UART2 to
transport RTCMv3 data
2021-05-21 08:49:25 +09:00
Peter Barker
a61b6ebda8
AP_GPS: move from HAL_NO_LOGGING to HAL_LOGGING_ENABLED
2021-05-19 17:38:47 +10:00
Michael du Breuil
1288f4c81b
AP_GPS: Support GPS_SBAS_MODE on SBF GPS units
...
Also swaps to using an AP_Enum for the SBAS type, and fixes up the fact
that the prearm/failure reasons should be using the config step, rather
then the init blob index
2021-05-18 09:52:07 +10:00
murata
747de2c28c
AP_GPS: Change to STM32's faster processing operations
2021-05-12 06:49:03 +10:00
Andrew Tridgell
0cd97ce3d8
AP_GPS: fixed GPS yaw for GPS_INPUT mavlink
2021-05-11 17:45:46 +10:00
Peter Barker
30b9a7aeb4
AP_GPS: correct GPS_AUTO_SWITCH parameter description
2021-05-05 16:41:50 +10:00
Andrew Tridgell
7cc11e6856
AP_GPS: fixed handling of loss of GPS yaw
...
when the GPS yaw data doesn't pass the internal tests of validity for
400ms we need to stop telling the EKF that we have valid yaw
2021-05-04 10:37:15 +10:00
Andrew Tridgell
de5da74df1
AP_GPS: fixed spelling of GLONASS
2021-04-29 13:01:09 +10:00
giacomo892
a245100ae6
AP_GPS_UBLOX: Fix GALILEO auto configuration
2021-04-29 13:01:09 +10:00
Andrew Tridgell
dd86e0cc89
AP_GPS: added comment explaining the approach
2021-04-20 17:43:01 +10:00
Andrew Tridgell
8bc31ec5e9
AP_GPS: account for rotation rate in moving baseline Z test
...
this avoids switching GPS on rapid roll/pitch
2021-04-20 17:43:01 +10:00
Peter Barker
a7e0c565dc
AP_GPS: populate extension fields in GPS2_RAW
2021-04-20 11:46:35 +10:00
Philippe Hamelin
738d000f86
AP_GPS: Add NMEA THS message.
2021-04-14 17:20:28 +10:00
Andrew Tridgell
3650c02745
AP_GPS: use common nmea_printf()
2021-04-13 09:36:52 +10:00
murata
3a006ae226
AP_GPS: Supplementary explanation of configuration parameters (NFC)
2021-03-16 10:43:18 +11:00
Siddharth Purohit
edceb4e3a4
AP_GPS: move underscore one layer down for GPS
2021-03-12 16:32:36 +09:00
bugobliterator
0031fee851
AP_GPS: add support for ordering UAVCAN GPS
2021-03-12 16:32:36 +09:00
Michael du Breuil
a3ddf5264d
AP_GPS: Support uavcan ardupilot.gnss.Status
...
Also makes the drive by change to make GPS_Backend::is_configured const
2021-03-12 09:39:55 +11:00
Michael du Breuil
f227d67d58
AP_GPS: Remove unused enum
2021-03-03 10:00:15 +09:00
Peter Barker
9da9d8c94b
AP_GPS: provide method for getting single char representing fix type
...
Should allow us to be consistent across places in the code base that
need a compact representation for a user display.
2021-02-18 08:59:23 +11:00
Peter Barker
c2cba52ad8
AP_GPS: move gps logging structures into AP_GPS
2021-02-17 11:30:01 +11:00
Michael du Breuil
4c4e613f6a
AP_GPS: Don't send SBF config unless there is free space in the port
2021-02-15 16:31:45 -07:00
Michael du Breuil
4d42996068
AP_GPS: Force the buadrate on SBF units
2021-02-15 16:31:45 -07:00
Michael du Breuil
5f3b1b92a4
AP_GPS: SBF don't send configuration until we've recieved a prompt
...
This fixes a configuration problem with SBF unit's where sometimes we
fail to detect the GPS unit continously, until it's been manually
configured. This was tested by doing a hard reset to the GPS unit.
This also now accepts a set of defines from the hwdef, or build
environment, which allows us to specify extra config options.
2021-02-05 11:52:29 -07:00
Michael du Breuil
d9ffd04a96
AP_GPS: Broadcast the detect message on AP_Periph over CAN
2021-02-05 11:52:29 -07:00
Patrick José Pereira
6bdc1704f4
AP_GPS: Remove pointer check before delete
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-04 09:01:19 +11:00
Patrick José Pereira
2e75425a2a
AP_GPS: Add missing const in member functions
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Michael du Breuil
0f363809f5
AP_GPS: Fix some unit errors with the GPS blended instance
...
Also add a static assert and some docs on the fact that blending only
works with 2 actual recievers at the moment
Also a small optimization to not call get_rate_ms() twice
2021-01-28 11:55:30 +11:00
Peter Barker
d426d8e1f8
AP_GPS: use ground_course in preference to ground_course_cd
2021-01-26 10:22:28 +11:00
E Thomas
2ee052b36e
AP_GPS: Made GPS_DISABLE prevent last_fix_time_ms updates
2021-01-23 17:25:00 +11:00
Michael Oborne
d2720da4a2
AP_GPS: support yaw for UAVCAN GPS
2021-01-07 15:56:28 +11:00
Andrew Tridgell
bf51478dd1
AP_GPS: added ExternalAHRS backend
2021-01-05 21:13:12 +11:00
Ari Krupnik
1d288316cc
AP_GPS: standard spelling of variant
2020-12-25 00:01:50 +11:00
Andrew Tridgell
e02047861a
AP_GPS: convert to using hal.serial() instead of hal.uartX
2020-12-15 10:32:46 +11:00
Andrew Tridgell
1a4f094025
AP_GPS: allow hwdef override of default for GPS_COM_PORT
2020-12-06 16:48:08 +11:00
Andrew Tridgell
92bcc7667c
AP_GPS: allow for SBF GPS on F3 AP_Periph
2020-12-06 16:48:08 +11:00
Andrew Tridgell
862ae59e28
AP_GPS: support $PHD message for AllyStay NMEA GPS
...
this adds vertical velocity support
2020-12-01 09:04:43 +11:00
Hwurzburg
7a82898e92
AP_GPS: expand gps rate description
2020-11-26 18:25:29 +11:00
Andrew Tridgell
05194ed8b6
AP_GPS: don't accept infinite accuracies for blending
...
these result in NaN values for velocities
2020-11-24 12:00:41 +11:00
Andrew Tridgell
83c479bcc2
AP_GPS: prevent UAVCAN GPS from giving infinite accuracy values
...
this can happen due to the complex encodings of accuracies in UAVCAN
2020-11-24 12:00:41 +11:00
Andrew Tridgell
a762926526
AP_GPS: fixed constrained NaN in EKF3 caused by bad GPS blending
...
if the accuracies reported are very low then we can do a division by
zero and this results in a constraining NaN for GPS vertical velocity
filter in NavEKF3_core::calcGpsGoodToAlign
2020-11-24 12:00:41 +11:00
Peter Barker
e257dd9fee
AP_GPS: correct logging for GPS blending
2020-11-20 09:45:57 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
58f0c34612
AP_GPS: fix dataflash logging of blended GPS instance
2020-11-20 09:45:57 +11:00
Peter Barker
428c9ef0e1
AP_GPS: correct logging in dual-ublox setups
2020-11-10 17:39:51 +11:00
Andrew Tridgell
6c4e552a0b
AP_GPS: removed have_ekf_logging()
2020-11-10 16:15:45 +11:00
Iampete1
60951a7891
AP_GPS: add use primary if 3D fix GPS_AUTO_SWITCH option
2020-11-10 12:01:56 +11:00
Iampete1
347723dbaf
AP_GPS: add primary param
2020-11-10 12:01:56 +11:00
Michael du Breuil
b30c55b3f3
AP_GPS: Support yaw from moving base station on SBF drivers
2020-11-03 11:12:20 +11:00
Michael du Breuil
4161e2eb28
AP_GPS: Factor out moving base offset helper
2020-11-03 11:12:20 +11:00
Michael du Breuil
a61444cec0
AP_GPS: Don't reset the entire buffer when handling RTCM data
...
This is a micro optimization intended to just make handling GPS
corrections a bit faster.
2020-10-25 14:21:39 +11:00
murata
4c835a0df9
AP_GPS: Move the CRC24 to the AP_Math class
2020-10-21 18:24:07 +11:00
Andrew Tridgell
e529d475d4
AP_GPS: use mktime for NMEA and MTK time conversion
...
this fixes NMEA time handling, which was off by 3 days
2020-10-20 11:21:00 +11:00
Andrew Tridgell
e995a198bd
AP_GPS: always send GPS2_RAW if 2nd GPS configured
...
this improves the display on the GCS when the GPS has not yet been
found. This is particularly important after a reboot, as otherwise the
GCS may display stale information from the previous boot
2020-10-06 16:48:19 +11:00
Andrew Tridgell
8e08d93026
AP_GPS: fixed pre-arm check on ublox M9 GPS
...
this prevents a failure from config of SOL and TMODE messages
2020-10-06 10:22:52 +11:00
Donione
ff80be19c1
AP_GPS: fix type and update reserved bytes in ublox PVT
2020-09-28 16:31:14 -07:00
Andrew Tridgell
8c1bc94053
AP_GPS: fixed build warnings for MSP with AP_Periph
2020-09-15 09:40:03 +10:00
Andrew Tridgell
94670879f8
AP_GPS: allow hwdef.dat override of GPS rate
2020-09-09 06:35:50 +10:00
yaapu
85b61d6bf3
AP_GPS: added support for MSP GPS sensors
2020-09-09 06:35:50 +10:00
Andrew Tridgell
5647aadbcf
AP_GPS: added API for getting last iTOW
2020-09-09 06:35:50 +10:00
Andrew Tridgell
56b743dfca
AP_GPS: build SBF driver with double precision
2020-09-03 09:56:29 +10:00
Michael du Breuil
6a8680d31d
AP_GPS: Send RTK baseline data from SBF
2020-09-03 09:56:29 +10:00
Andrew Tridgell
87c7781be2
AP_GPS: show GPS as unhealthy if it is lagged too much
...
this detects GPS data lag, and if 5 samples in a row are lagged by
more than 50ms beyond the expected lag for the GPS then we declare the
GPS as unhealthy.
This is useful to detect users who have asked for more data from the
GPS then it can send at the baudrate that is being used. The case that
led to this path was a F9 GPS with GPS_RAW_DATA=1 at 115200 baud. In
that case the UART data is quickly lagged by over 1s
2020-08-25 10:22:05 +10:00
Siddharth Purohit
0690b7bd68
AP_GPS: move to using CANManager library
2020-08-19 17:31:09 +10:00
Michael du Breuil
08d4e1c062
AP_GPS: Support configuring the SBF com port
2020-08-13 15:04:38 +10:00
Iampete1
997ffcf30d
AP_GPS: NMEA: only decode each measage once
2020-08-09 11:37:16 +10:00
Siddharth Purohit
d122f00c14
AP_GPS: redetection not necessary for UAVCAN GPS
2020-07-29 17:32:56 +10:00
Tom Pittenger
8f6e9caf93
AP_GPS: change GPS_AUTO_SWITCH #define list to enum class
...
enumeration entry had to change to NONE to avoid name conflict with DISABLED
2020-06-25 11:10:31 +10:00
Andrew Tridgell
4aa10a6c30
AP_GPS: added force_disable_yaw() API
2020-06-18 15:01:00 +10:00
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
529bfe8fcd
AP_GPS: fixed issue with GPS selection for moving baseline
...
when you have a moving baseline pair of ublox GPS modules and the
rover GPS does not have full fixed RTK lock on the base GPS then we
should not use it as our primary GPS as it's position and velocity can
be badly affected by the attempts of the GPS to gain a fixed lock.
This was observed in a flight with two F9P GPS, where the GPS velocity
data from the rover GPS went way off when it lost full RTK lock. It's
status stayed at 4, so it was selected as the primary GPS
2020-05-27 10:59:46 +10:00
Andrew Tridgell
f00392d567
AP_GPS: don't accept a zero GNSS timestamp from UAVCAN GPS
...
this is needed for a bug in AP_Periph 1.0 which could briefly send a
zero timestamp on first fix marked as a UTC time
2020-04-29 12:20:19 +10:00
Andrew Tridgell
4f591a338f
AP_GPS: use GCS_SEND_TEXT()
2020-04-29 07:36:55 +10:00
Andrew Tridgell
6347d0adb0
AP_GPS: leave uart2 config enabled when using uart2 MB setup
2020-04-21 15:30:54 +10:00
Andrew Tridgell
f3a5d915f3
AP_GPS: allow for larger average delta on MB rover than normal
2020-04-21 15:30:54 +10:00
Andrew Tridgell
36098c3221
AP_GPS: improved delay health threshold
...
allow for missing frames without showing unhealthy on GCS
2020-04-21 15:30:54 +10: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
ae2132d861
AP_GPS: added check for Z error in moving baseline ublox
...
this ensures we don't get bad yaw from having the right distance but
incorrect Z offset for the currently expected roll/pitch
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
3fbeae613b
AP_GPS: fixed moving baseline yaw calculation
...
this reverts #13955 and instead applies the correct fix, which is to
subtract the angle instead of adding.
2020-04-21 15:30:54 +10:00
Andrew Tridgell
077ab22767
AP_GPS: fixed AP_Periph build with gcc 9.x
2020-04-01 17:08:48 +11:00
Andrew Tridgell
4456732911
AP_GPS: fixed rotation of moving baseline GPS
...
we were off by 180 degrees. Thanks to Jaime for noticing this!
2020-04-01 17:08:19 +11:00
Peter Barker
2b08af69bc
AP_GPS: fix dereference-of-nullptr warning from scan-build
...
This is kind-of a false positive as this in practise could never be
nullptr.
2020-03-31 10:37:16 +11:00
Andrew Tridgell
f00314a5d1
AP_GPS: removed dead blending code
2020-03-17 12:13:54 +11:00
Andrew Tridgell
9fa034d1de
AP_GPS: fixed antenna offset for blending
...
we were accessing beyond the end of the antenna_offset array
2020-03-17 12:13:54 +11:00
Randy Mackay
a19634b9d2
AP_GPS: reduce POS param range to 5m and add increment
2020-02-01 08:46:03 +09:00
Andrew Tridgell
7efd5248ee
AP_GPS: added get_type() API
2020-01-26 09:12:55 +11:00
Andrew Tridgell
e59f32074d
AP_GPS: fixed yaw error when one GPS has zero position
...
the M_PI correction was only valid for one zero side. Much simpler to
always calculate difference
2020-01-24 11:46:40 +11:00
Andrew Tridgell
cf8becfa71
AP_GPS: make all semaphores recursive
...
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell
f0d1d3fa90
AP_GPS: added get_semaphore()
2020-01-16 20:36:54 +11: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
41289fe945
AP_GPS: adjust lag for MB RTK ublox
...
rover will lag by about 40ms
2020-01-07 12:37:35 +11:00
Andrew Tridgell
b86c43aa66
AP_GPS: prefer RTK MB rover when it has yaw available
...
this ensures that yaw data is time aligned with position and velocity
data
2020-01-07 12:37:35 +11:00
Andrew Tridgell
261465ef96
AP_GPS: split out update_primary() from update()
...
this makes the selection of primary GPS a lot clearer, with less
nesting of if statements
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
Andrew Tridgell
71a0f3a1dc
AP_GPS: added RTCMv3 parser
...
will be used for moving baseline support
2020-01-07 12:37:35 +11:00
Andrew Tridgell
6efbc484fd
AP_GPS: cope with UAVCAN GPS that don't provide Aux message
...
thanks to @VadimZ for the suggestion
2019-12-05 15:48:51 -07:00
Michael du Breuil
8ca6535661
AP_GPS: Log SBF commanded disarms
2019-11-20 11:06:16 -07:00
Michael du Breuil
f8808022b8
AP_GPS: Check the driver logging health
2019-11-20 11:06:16 -07:00
Andrew Tridgell
379e3d60a1
AP_GPS: fixed sizes of config items
2019-11-16 15:28:52 +11:00
Michael du Breuil
63a6a1084c
AP_GPS: UBlox: Fix the assumption that all keys are 1 byte keys
2019-11-16 15:28:52 +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
8aa781206d
AP_GPS: fixed signed/unsigned comparisons
2019-11-09 17:11:32 +11:00
Andrew Tridgell
b7c9391619
AP_GPS: support Fix2 message for UAVCAN
...
this allows for RTK fix levels
2019-11-09 17:11:32 +11:00
Andrew Tridgell
632114d687
AP_GPS: support RTCMStream for RTCM injection on UAVCAN
2019-11-09 17:11:32 +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
Michael du Breuil
d623da0de6
AP_GPS: Always send GPS2_RAW after we've seen the second GPS
...
This significantly improves the GCS's ability to correctly display whats
happening with the second GPS.
2019-11-02 10:35:08 +11:00
Michael du Breuil
5bafd7d72c
AP_GPS: Don't defeat the GCS message interval code
2019-10-28 00:26:28 -07:00
Andrew Tridgell
14cdac9202
AP_GPS: fixed GPS to UART mapping
...
this allows for first GPS as UAVCAN and 2nd as UART. That is not
possible currently unless you waste a uart
2019-10-24 14:37:30 +11:00
Andrew Tridgell
00260db65a
AP_GPS: fixed UAVCAN GPS status when disconnected
...
this fixes the status reported for a UAVCAN GPS when the cable is
unplugged. It should be "NO GPS", but was instead reporting "NO
FIX". The user had no way to distinguish between not finding a CAN GPS
at all and it not getting satellites
thanks to CUAV for reporting
2019-10-14 19:08:37 -06: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
b5217412f9
AP_GPS: fixed a bug in handling corrupt u-blox packets
...
when we have corrupt input due to loss of bytes on a UART we can end
up with a u-blox packet with zero payload bytes. When that happens we
need to bypass payload reading as otherwise we will end up keeping
reading bytes until the driver resets at 4 seconds, causing a GPS
outage.
This was causing GPS outages every few hours in copters running 3.6.7,
and was also reproduced in SITL using SIM_GPS_BYTELOSS.
2019-09-30 15:20:30 -06:00
Andrew Tridgell
9eb6c1be64
AP_GPS: use jitter correction on GPS_INPUT data
...
this allows for more accurate timing when using GPS_INPUT for indoor
positioning systems
2019-09-17 09:17:04 +10:00
Michael du Breuil
f857eb4640
AP_GPS: Take responsibility for logging the GPS if the EKF wants logging
2019-09-10 09:09:17 +10:00
Michael du Breuil
ca0dad9a7f
AP_GPS: Directly include needed headers
2019-08-28 13:13:03 +10:00
Andrew Tridgell
291d72601b
AP_GPS: enabled reduced size for AP_Periph support
2019-08-27 10:29:56 +10:00
Peter Barker
8c21a279ea
AP_GPS: examples: var_info is now in GCS_MAVLINK_Parameters
2019-08-14 18:25:43 +10:00
Andrew Tridgell
8d7262994b
AP_GPS: support yaw in GPS_INPUT mavlink GPS
...
useful for Vicon setups
2019-08-12 10:25:40 +10:00
murata
e4455491aa
AP_GPS: Use common hexadecimal character to number conversion method
2019-08-06 10:14:12 +10:00
Peter Barker
46ad04aab7
AP_GPS: correct format string warnings in SBF driver
2019-08-05 11:20:35 +10:00
Andrew Tridgell
be9c98db12
AP_GPS: ensure we have full timestamp before setting RTC clock
...
thanks to Martin Sollie for this bug report
2019-07-31 20:13:55 +10:00
Michael du Breuil
d33006a2e7
AP_GPS: Refactor first_unconfigured_gps to return bool
2019-07-30 10:12:43 +10:00
Randy Mackay
64637dba8f
AP_GPS: resolve gcs::send_text compiler warning
2019-07-30 09:02:39 +09:00
Peter Barker
678c11f048
AP_GPS: supply format string to send_text
2019-07-26 10:54:41 +10:00
Pierre Kancir
13ac187fd8
AP_GPS: pass mavlink_message_t by const reference
2019-07-16 20:51:42 +10:00
Grant Morphett
64ed76326b
AP_GPS: Adding support for the NMEA GPHDT sentence
...
The NMEA GPHDT sentence can be used to determine the vehicles bearing
instead of a compass even when the vehicle is stationary. This type
of GPS is normally very expensive and does the bearing using some sort
of phase ambituity algorithm.
2019-07-13 11:05:57 +10:00
Andrew Tridgell
5bfb6ced84
AP_GPS: fixed u-blox F9 auto configuration
2019-07-05 13:31:40 +10:00
Michael du Breuil
eed710db5f
AP_GPS: Fix a lot of unneded example includes
2019-06-18 10:02:05 +10:00
Peter Barker
73c81519da
AP_GPS: fix missing-declaration warning in example
2019-06-04 10:25:15 +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
Andrew Tridgell
9f5a598697
AP_GPS: removed unusued AP_Common/Semaphore.h
2019-05-15 15:33:48 +10:00
Michael du Breuil
7871040bb6
AP_GPS: Pass an in range value for the param initilizer
2019-05-13 15:46:38 +10:00
Pierre Kancir
deb6aafcbe
AP_GPS: fix GPS_AUTO_test
2019-05-01 14:17:34 -07:00
Michael du Breuil
e6d97f63a5
AP_GPS: Remove unneeded wrappers
2019-04-26 08:07:19 +10:00
Michael du Breuil
cc679db55b
AP_GPS: Log reciever status to GPS SD card
...
This improves log analysis of bad GPS health messages when you have a
report of bad GPS health but lost the MAVLink message, or didn't have
access to the autopilot log with the information for some reason.
2019-04-14 13:24:36 -07:00
Michael du Breuil
32c583bd20
AP_GPS: Remove external event from GPS data stream
...
If the event pin floats, this can lead to UART congestion, causing the
EKF to reject the GPS data, and the vehicle will drift around the sky in
a most disturbing manner
2019-04-14 13:24:36 -07:00
Pierre Kancir
36f12e9818
AP_GPS: use get_distance_NED
2019-04-09 20:59:48 +10:00
Pierre Kancir
4ea10ce5f5
AP_GPS: use get_distance_NE instead of location_diff
2019-04-08 08:00:52 -07:00
Michael du Breuil
27ad9ac3ca
AP_GPS: Refactor get_singleton() to return a pointer
2019-04-05 23:09:47 -07:00
Michael du Breuil
52eb832883
AP_GPS: Remove stuff from headers
2019-04-05 20:12:53 +11:00
Sagnik Bhattacharya
47f3720040
AP_GPS: add more comments to example and improved existing
2019-04-02 19:41:45 +11:00
Peter Barker
81d51b1d1a
AP_GPS: move print_latlon into sole caller
2019-04-02 10:19:38 +11: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
Tom Pittenger
12c3446777
AP_GPS: rename dataflash to logger
2019-03-28 16:40:57 +11:00
Francisco Ferreira
5a64f8d8ba
AP_GPS: use proper macro in array sizes
2019-03-07 19:48:32 -07:00
Francisco Ferreira
ba5ef18ef7
AP_GPS: correct blending check
2019-03-07 19:48:32 -07:00
Francisco Ferreira
cb1ce70ae8
AP_GPS: fix out-of-bounds array access
2019-03-07 19:48:32 -07:00
Dr.-Ing. Amilcar do Carmo Lucas
d7edd396bd
AP_GPS: replace location_offset() and get_distance() function calls with Location object member function calls
...
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Peter Barker
2aa0de49bb
AP_GPS: remove pointless initialisers
2019-02-26 09:53:28 +11:00
Peter Barker
4194812633
AP_GPS: uavcan: reindent after WITH_SEMAPHORE change (NFC)
2019-02-16 14:33:11 +11:00
Peter Barker
1ffbc0ae56
AP_GPS: uavcan: use WITH_SEMAPHORE in place of give/take _registry
2019-02-16 14:33:11 +11:00
Tom Pittenger
5d66c3ed62
AP_GPS: unify singleton naming to _singleton and get_singleton()
2019-02-10 19:09:58 -07:00
Ben Kurtz
08092ea72b
AP_GPS: fix typo in log message
2019-01-31 03:07:30 +00:00
Ben Kurtz
a525f30573
AP_GPS: update implementation of SBP2 flags
...
Some flags were out of date or named incorrectly.
Updates based on protocol version 2.4.1, documented here:
b02e8d835c/docs/sbp.pdf
2019-01-31 03:07:30 +00:00
Peter Barker
6fc76a32af
GLOBAL: use AP::logger() and strip redundant Log_ from methods
2019-01-18 18:08:20 +11:00
Peter Barker
b47733142f
GLOBAL: rename DataFlash_Class to AP_Logger
2019-01-18 18:08:20 +11:00
Peter Barker
30980815a8
AP_GPS: adjust for Location_Class and Location unification
2019-01-16 11:45:29 +11:00
Peter Barker
30d5d6b578
AP_GPS: do not zero options after assigning from location
...
On the assumption that the assignment operator knows what it is doing,
and that we have no idea what fields are actually present in options
2019-01-16 11:45:29 +11:00
Arjun Vinod
978cea97cf
AP_GPS: whitespace and typo fixes
2019-01-05 08:45:24 +09:00
Randy Mackay
c7287bb98f
AP_GPS: add range to POS param description
2018-12-13 20:13:58 +09:00
Andrew Tridgell
7c50aacc92
AP_GPS: moved place we graph uart timestamp
2018-12-04 11:37:38 +11:00
Andrew Tridgell
685771c145
AP_GPS: constrain rate_ms from 5Hz to 20Hz
2018-12-04 11:37:38 +11:00
Andrew Tridgell
7a4b8d76c1
AP_GPS: added jitter correction to timestamp calculation
...
this allows for much more accurate (and consistent) timestamping of GPS
messages where the protocol has a ITOW field.
2018-12-04 11:37:38 +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
2eae4901c1
AP_GPS: look for iTow on uBlox MSG_STATUS
2018-12-04 11:37:38 +11:00
Andrew Tridgell
b5f3750014
AP_GPS: convert NOVA, SBP and SBP2 to use check_new_itow()
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
4af857da44
AP_GPS: adjust NMEA sentence length calculation
...
review feedback
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
Andrew Tridgell
2512b73106
AP_GPS: added ability to disable GPS
...
this is used for GPS loss testing in real vehicles, by linking it to a
RCn_OPTION value. GPS position is still logged, but is not used
2018-11-29 08:49:23 +11:00
Peter Barker
fd888727b8
AP_GPS: add override keyword where required
2018-11-08 11:30:12 +11:00
Michael du Breuil
d6944510da
AP_GPS: Suppress clearing non-trival type warning
2018-10-30 16:17:03 -07:00
ebethon
f67a9af339
AP_GPS: fix SBAS mode in the SBP2 driver
2018-10-24 13:12:34 -07:00
Andrew Tridgell
249291eac0
AP_GPS: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00