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
Peter Barker
40daa8e15f
AP_GPS: use mavlink definition to get statustext size
...
Also, add one for null-termination
2018-10-16 10:11:28 +11:00
liang.tang
7885b267f0
AP_GPS: fix UAVCAN gps message handlers
2018-09-05 17:23:14 +10:00
Michael du Breuil
70e587b572
AP_GPS: Fix accidental quantization to float on SBF logging
2018-08-31 01:16:31 +01:00
Siddharth Purohit
ca54123b7d
AP_GPS: move UAVCAN GPS related code to AP_GPS_UAVCAN backend
2018-08-29 22:54:59 +01:00
Patrick José Pereira
10ffd89a0c
AP_GPS: Remove unused operation
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-08-27 23:35:34 +01:00
Dr.-Ing. Amilcar do Carmo Lucas
9c97f35b19
AP_GPS: Use GPS_AUTO_SWITCH parameter to choose exacly which GPS to use
2018-08-26 01:05:09 -07:00
Francisco Ferreira
b29369eb82
AP_GPS: adapt to changes in AP_BoardConfig_CAN
2018-08-12 13:35:03 +01:00
Michael du Breuil
1a406dacfc
AP_GPS: Ensure a lag value is always provided
...
The value may not be the optimal value for the driver, but we should
always try to provide a value for the caller
2018-08-07 09:55:26 +10:00
Michael du Breuil
cca6b54921
AP_GPS: Remove unneeded field limitations
...
Saves ~1100 bytes of flash
2018-08-01 09:19:20 +10:00
Michael du Breuil
fcb1c4cdfd
AP_GPS: Remove unused ADC include
2018-07-17 09:29:50 +10:00
Alexander Remizov
dc15cbd513
AP_GPS: fixed ublox configuration
2018-06-24 15:25:00 -07:00
Andrew Tridgell
796291f176
AP_GPS: improved ccache build speed
...
making this header equal improves speed of fmuv2 build after fmuv3
build with ccache, without affecting binary
2018-06-22 11:13:03 +10:00
Peter Barker
5b41db5120
AP_GPS: use AP_RTC
...
set the system time from a GPS if we have a 3D fix or better
2018-06-15 08:01:22 +10:00
Eugene Shamaev
9985d4a937
AP_GPS: uniform naming
2018-06-09 22:46:48 -07:00
Eugene Shamaev
9f27a65f4b
AP_GPS: helper func
2018-06-09 22:46:48 -07:00
Eugene Shamaev
a805b3ce18
AP_GPS: reducing indenting by linearizing the logic
2018-06-09 22:46:48 -07:00
Andrew Tridgell
dc2a776985
AP_GPS: fixed fake ublox 3D lock PVT speed accuracy
...
allows EKF to startup fully with fake GPS lock
2018-06-06 07:15:41 +10:00
Francisco Ferreira
5fc7da0e83
AP_GPS: remove Qualcomm board support
2018-05-17 09:57:20 +10:00
Michael du Breuil
53c66106d6
AP_GPS: Remove unneeded intilizers
...
saves 160 bytes on make px4-v2
2018-05-16 20:34:00 +10:00
Dr.-Ing. Amilcar do Carmo Lucas
9b9932ca9c
AP_GPS: Document septentrio RXERROR flags
2018-05-06 20:32:39 -06:00
Andrew Tridgell
4e1d310959
AP_GPS: fixed use of pow()
2018-05-07 11:43:23 +10:00
Andrew Tridgell
53d36c02ae
AP_GPS: enable double precision maths where needed
2018-05-07 11:43:23 +10:00
Michael du Breuil
88ea7ac5fa
AP_GPS: Remove software check from SBF driver
2018-05-06 14:52:04 -06:00
Michael du Breuil
b1a3e0a537
AP_GPS: Report when SBF errors change
2018-04-24 12:32:35 -07:00
Peter Barker
643e7e039a
AP_GPS: log received data
...
Also log a set of flag values if a driver is deleted
2018-04-18 13:50:55 +09:00
Patrick José Pereira
a255c47c33
AP_GPS: Do not restart driver if type is defined as MAV
...
Fix bluerobotics/ardusub#104
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-04-16 17:08:39 -07:00
Michael du Breuil
362fb470c4
AP_GPS: Allow HIL_GPS to flag vertical velocity
...
Closes #7997
2018-04-10 17:01:21 +01:00
Michael du Breuil
a21eb12f9e
AP_GPS: Correct HIL_GPS altitude conversion
2018-04-02 20:21:20 -07:00
Peter Barker
816045c1ab
AP_GPS: correct compiler warnings
...
In file included from ../../libraries/AP_GPS/AP_GPS_SBF.cpp:22:
../../libraries/AP_GPS/AP_GPS_SBF.h:75:14: warning: private field
'last_injected_data_ms' is not used [-Wunused-private-field]
uint32_t last_injected_data_ms = 0;
^
../../libraries/AP_GPS/AP_GPS_SBF.h:210:7: warning: private field
'RxError_bits' is not used [-Wunused-private-field]
} RxError_bits;
2018-03-02 09:26:37 +09:00
chobits
ea1a6b2044
AP_GPS: set have_vertical_velocity if MAVLink GPS report it
2018-03-01 14:31:56 -07:00
Tom Pittenger
793f50808d
AP_GPS: add param defaults for EMLID_EDGE for GPS_TYPE=9
2018-02-13 15:29:53 +11:00
Michael du Breuil
9e37e9ee82
AP_GPS: Remove unused blending function.
...
Thanks to ender-chen for noticing, closes #7510
2018-01-09 12:52:32 -08:00
Dr.-Ing. Amilcar Do Carmo Lucas
479d4be3fd
AP_GPS: Add horizontal, vertical and speed accuracy to the GPS_RAW_INT message
2018-01-09 13:01:05 +11:00
Andrew Tridgell
d2c9e2719e
AP_GPS: removed create() method for objects
...
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
9b2e48ce10
AP_GPS: Improve comments (NFC)
2017-12-05 10:44:58 +09:00
Peter Barker
47f8ed7fab
AP_GPS: set GPS_SAVE_CFG default to save GPS config as required
2017-11-29 00:58:43 -07:00
Andrew Tridgell
9677d570e9
AP_GPS: faster GPS lock
...
use 9600 and 115200 first
2017-11-29 00:58:43 -07:00
Peter Barker
693823ae0d
AP_GPS: add gps() to AP:: namespace
2017-11-15 13:43:03 +00:00
Michael du Breuil
236e74c529
AP_GPS: Singleton
2017-11-06 01:33:57 +00:00
Michael du Breuil
c856cc6f33
AP_GPS: Allow GPS's to run functions on arming (used by SBF)
...
Supports starting/stopping GPS logging
2017-11-06 01:33:57 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
68828511cd
AP_GPS: Only send GPS*_RTK mavlink messages if the backend supports them
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
e0c2a45eec
AP_GPS: support GPS_RTK and GPS2_RTK messages in Emlid reach modules. Requires Reach FW >= 2.7.4
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
c0dd7984ad
AP_GPS: Publish information on the GPS*_RTK mavlink messages
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
bf6778277e
AP_GPS: implement GPS*_RTK mavlink messages
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
430b863f42
AP_GPS: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one
2017-10-30 18:28:20 +00:00
Michael du Breuil
b0e18de576
AP_GPS: Remove detect helpers for MTK/SIRF when minimizing the build
...
Removes 16 bytes
2017-10-22 03:03:29 +01:00
Michael du Breuil
0300f86913
AP_GPS: u-blox: Log unconfigured messages
2017-10-06 12:53:32 +01:00
Michael du Breuil
3023fac4d0
AP_GPS: SBF enable comment block logging
...
This is intended to help with GCS's injecting custom data to the GPS
2017-09-27 19:29:32 +01:00
Michael du Breuil
561acb372e
AP_GPS: SBF send port enable string on start
...
Also prohibts SBF, GSOF, NOVA drivers from getting config strings not
meant for them
2017-09-27 19:29:32 +01:00
Michael du Breuil
bfbec02736
AP_GPS: SBF track the GPS error bits
2017-09-27 19:29:32 +01:00
Michael du Breuil
0d522663b2
AP_GPS: SBF: fix the PVTMode to support PPK (and baseline) units
2017-09-27 19:29:32 +01:00
Michael du Breuil
80b71b9ced
AP_GPS: SBF: Validate that configuration was accepted
...
Note: The config string of "spm, Rover, StandAlone+SBAS+DGPS+RTK\n" is
incompatible with AsteRx-M FW 3.6.3 and will result in refusing to
arm/pass configuration checks
2017-09-27 19:29:32 +01:00
Michael du Breuil
20988b9f05
AP_GPS: SBF respect GPS_AUTO_CONFIG
2017-09-27 19:29:32 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
09baac8f25
AP_GPS: Preserve the instance number, otherwise it will get set to zero
...
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
8b9fb19061
AP_GPS: Added const just to be explicit (NFC)
...
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
175b7c5389
AP_GPS: spellcheck in coment (NFC)
2017-09-26 23:15:10 -07:00
Lucas De Marchi
b05610870c
global: use static method to construct AP_Rally
2017-09-26 03:01:21 +01:00
Lucas De Marchi
69b6d95cb2
global: use static method to construct AP_Board_Config{,_CAN}
2017-09-26 03:01:21 +01:00
Lucas De Marchi
72fd2d6f05
global: use static method to construct AP_SerialManager
2017-09-26 03:01:21 +01:00
Lucas De Marchi
8094482f21
global: use static method to construct AP_GPS
2017-09-26 03:01:21 +01:00
Lucas De Marchi
2cb2727a31
AP_GPS: add static create method
2017-09-26 03:01:21 +01:00
chobitsfan
02cfe9128d
AP_GPS: parse RTK status in NMEA GGA message
2017-09-15 22:33:47 +01:00
Michael du Breuil
2f8f2ffd2d
AP_GPS: Remove NMEA init blobs for binary drivers
...
All of the init strings that were sent in the NMEA driver are for GPS protocols
which have binary drivers, which provide far more features and are more robust.
It also appears that due to driver changes the config strings for SIRF/UBLOX
were no longer correct anyways).
2017-09-15 14:30:48 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
d3a18e803e
AP_GPS: Fix MAVLink message field SYSTEM_TIME.time_unix_usec when GPS_AUTO_SWITCH = blend
...
The mavlink message field SYSTEM_TIME.time_unix_usec works fine with GPS_AUTO_SWITCH == 0 (no switch) or ==1 (usebest)
But when GPS_AUTO_SWITCH == 2 (blend) then state[GPS_BLENDED_INSTANCE].last_gps_time_ms gets initialized with 0 and never rewritten.
The consequence: SYSTEM_TIME.time_unix_usec gets stuck at zero.
The solution: Do not reset state[GPS_BLENDED_INSTANCE].last_gps_time_ms because it would overwrite the correct value already set on line 1149
2017-09-14 12:38:30 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
e03826890a
AP_GPS: Fix typo in comment
2017-09-13 14:22:57 -07:00
Michael du Breuil
04eb7f411e
AP_GPS: Track the delta time between the last GPS positions
2017-09-13 13:36:40 +01:00
Michael du Breuil
be371e09f9
AP_GPS: SBF: Reject short packets early, allow 256 byte long messages to be decoded
2017-09-06 10:41:36 +10:00
Andrew Tridgell
048dfee68a
AP_GPS: make SBF driver more robust
...
this fixes a crash bug in the SBF GPS driver where a badly formed packet
could cause crc16_ccitt to reference invalid memory
2017-09-06 10:41:33 +10:00
Lucas De Marchi
b62e8909c4
AP_GPS: add missing fallthrough
2017-09-01 13:45:22 -07:00
Lucas De Marchi
3414883f05
AP_GPS: remove tabs and fix coding style
2017-08-22 23:59:13 -07:00
Lucas De Marchi
8389158d76
AP_GPS: use FALLTHROUGH define
...
When falling through on a case switch, allow to add an empty statement
with the correct attribute to tell the compiler this behavior is
intended.
2017-08-22 23:59:13 -07:00
Peter Barker
7f59279670
AP_GPS: make time_epoch_usec const
2017-07-28 14:27:53 +01:00
Peter Barker
e7ff5107fb
AP_GPS: tidy mavlink message handling using switch statement
2017-07-27 12:03:25 +01:00
Peter Barker
2ad453fc89
AP_GPS: handle inject packets as part of handle_msg
2017-07-27 12:03:25 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
b791fef7cb
AP_GPS: Publish the number of satellites in the RTK correction messages, and the age of the RTK correction messages
2017-07-19 20:42:23 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
ae47ac5a09
AP_GPS: implement missing "RTK number of satellites" and "RTK correction age" information in the GPS2_RAW MAVLink message
2017-07-19 20:42:23 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
059c213d19
AP_GPS: Improve comments and documentation (NFC)
2017-07-19 20:42:23 +09:00
Michael du Breuil
5684a5dd36
AP_GPS: Only setup state's instance field during init
2017-07-18 21:21:50 +01:00
Andrew Tridgell
82e7e44cc3
AP_GPS: fixed UAVCAN as 2nd GPS
...
This fixes the issue here:
https://discuss.ardupilot.org/t/ac3-6-dev-dual-gps-issues/19172
thanks to Francisco for spotting the issue
this is tested with UAVCAN as 2nd GPS, ublox as primary
2017-07-18 18:57:55 +01:00
Peter Barker
76847a2487
AP_GPS: eliminate GCS_MAVLINK::send_statustext_all
2017-07-11 23:53:53 +01:00
Michael du Breuil
cb1b9b6674
AP_GPS: Fix SBF race condition on start
...
Unsure what the underlying problem is, but the length of the first string in
the initilisation_blob increasing resulted in a race condition, waiting
longer before retrying the message resolves it, but we still need to identify
the underlying problem. This patch just results in the GPS working with current
configurations. Tested against AsteRx-M firmware 3.6.3
2017-07-11 09:40:02 +09:00
Eugene Shamaev
5341e51f45
AP_GPS: support for multiple instances on different interfaces
2017-07-03 11:44:32 +01:00
Peter Barker
cbe9627bf5
AP_GPS: correct example
2017-06-29 15:43:38 +01:00
Peter Barker
7258cfd20b
AP_GPS: check dataflash to see if we should log backend gps messages
2017-06-29 15:43:38 +01:00
Francisco Ferreira
f35f0d59dd
AP_GPS: fix SBP2 driver build warnings by using memcpy
...
Build gave the following warnings:
../../libraries/AP_GPS/AP_GPS_SBP2.cpp: In member function ‘void AP_GPS_SBP2::_sbp_process_message()’:
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:181:78: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_heartbeat = *((struct sbp_heartbeat_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:181:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_heartbeat = *((struct sbp_heartbeat_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:186:76: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_gps_time = *((struct sbp_gps_time_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:186:27: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_gps_time = *((struct sbp_gps_time_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:190:74: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_vel_ned = *((struct sbp_vel_ned_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:190:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_vel_ned = *((struct sbp_vel_ned_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:194:74: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_pos_llh = *((struct sbp_pos_llh_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:194:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_pos_llh = *((struct sbp_pos_llh_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:198:68: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_dops = *((struct sbp_dops_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:198:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_dops = *((struct sbp_dops_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:202:74: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_event = *((struct sbp_ext_event_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:202:24: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_event = *((struct sbp_ext_event_t*)parser_state.msg_buff);
^
2017-06-29 15:18:09 +01:00
ebethon
005dbf41a7
AP_GPS: Add SBP EXT_EVENT Message to dataflash log
2017-06-29 15:18:05 +01:00
ebethon
4779a8f1f1
AP_GPS: Rename SBR1/SBR2 to SBRH/SBRM and change format
...
Add (sender_id, msg_len) in SBRM message
Add index/pages in SBRH/SBRM messages
Change format to integers to avoid GCS string parsing
Decrease data size in SBRH
2017-06-29 15:14:54 +01:00
Rob Ratcliff
60c6f8ad60
AP_GPS: fix bug when injecting messages bigger than 255 bytes
...
Commit 5261654
changed the used injection method so change this method signature to use uint16 for message length like previous injection method did
2017-06-27 03:06:26 +01:00
Michael du Breuil
249849dfa4
AP_GPS: Add an enum for _auto_config
2017-06-21 11:44:45 +01:00
Michael du Breuil
5f8633e322
AP_GPS: Allow backends to report their lag confidences
2017-06-21 11:44:45 +01:00
priseborough
5dcfc94371
AP_GPS: Add validity boolean to GPS lag reporting
2017-06-21 11:44:45 +01:00
priseborough
bd0229b7bc
AP_GPS: Fix bug in calculation of blended GPS delay
2017-06-21 11:44:45 +01:00
Michael du Breuil
6c3db3939e
AP_GPS: Update comment on get_rate_ms()
...
AP_GPS::get_rate_ms() is only meant to help the GPS backends
2017-06-12 01:06:38 +01:00
Michael du Breuil
ffe701bda3
AP_GPS: Use a static assert to check that the init blob is small enough
2017-05-31 14:39:53 +01:00
Michael du Breuil
1877d09f7c
AP_GPS: Don't track detection time to broadcast baud rate
2017-05-30 23:37:59 +01:00
Michael du Breuil
84598544fb
AP_GPS: Don't autodetect NMEA instances
2017-05-30 23:37:59 +01:00
Michael du Breuil
a1479c4138
AP_GPS: SBF report driver lag
2017-05-26 17:42:15 +01:00
Michael du Breuil
3da3ad05bf
AP_GPS: SBF report velocity accuracy
2017-05-26 17:42:15 +01:00
Michael du Breuil
c7a89d5aa0
AP_GPS: Set unknown DOP's to UINT16_MAX, rather then 9999
...
This fixes the MAVLink reporting for unknown dops, and avoids the situation where a GPS driver could report a worse DOP then we could handle.
Also corrects an apparent error in the HIL_GPS MAVLink message, where we would always select the unknown dop value rather then provided DOP.
2017-05-25 11:03:33 -07:00
Michael du Breuil
397ae00526
AP_GPS: SBF report VDOP
2017-05-24 20:03:29 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
2d5033b132
AP_GPS: Use SI units conventions in parameter units
...
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Peter Barker
e9ce3aa0ce
AP_GPS: use HAL_SEMAPHORE_BLOCK_FOREVER macro
2017-05-08 10:23:03 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
e31ac00f26
AP_GPS: fix spelling in comments
2017-05-08 10:08:31 +09:00
Andrew Tridgell
3687b6bdf0
AP_GPS: rename macros to avoid conflicts
...
these macros were also defined in NuttX in clock.h
2017-05-06 15:21:14 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas
1691a39b36
AP_GPS: spell in comments
2017-05-03 08:45:08 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
5b67b33310
AP_GPS: Remove un-used AP_GPS::inject_data_all() function
2017-05-01 13:06:18 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
5261654756
AP_GPS: Only inject RTCM data to the selected GPS device defined in GPS_INJECT_TO parameter
2017-05-01 13:06:18 +01:00
Michael du Breuil
12f83ecf75
AP_GPS: SBF if RAW_DATA is enabled check that the GPS is succeeding at logging
2017-05-01 13:04:52 +01:00
Michael du Breuil
d91f89d24b
AP_GPS: Remove stale ublox config files
...
These configurations no longer (and haven't for quite awhile) matched the
desired command set or baud rates, loading them will still require the GPS
driver to tweak settings, or have AUTO_CONFIG turned off, which is a less
safe configuration.
2017-04-23 21:15:58 +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
b7baca8d43
AP_GPS: move GPS type announcements into backend
...
See #4584
2017-04-23 21:04:17 +01:00
Peter Barker
c46ea73426
AP_GPS: rename QURTGPS to QURT
2017-04-23 21:04:15 +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
94a5e94ec9
AP_GPS: canonicalise statustext messages
...
Use "GPS %d" prefix, where %d is instance+1, to correspond
with parameters
2017-04-23 09:09:30 +10: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
Niels Joubert
4bf9fc071c
AP_GPS: Adds SBP Version 2: Swift Navigation Piksi Multi support
...
This commit adds:
- New driver for SBPv2
--- Support Piksi Multi, Swift Navigation's multi-band multi-constellation GPS
--- Proper parsing of SBP flags
--- Instant response to Piksi status changes (no more timeouts)
--- Support for Piksi Multi as a Single-Point-Positioning GPS or only onboard GPS
--- Incorporates horizontal and vertical accuracy estimates, and vdop.
- Updates driver for SBPv0
--- Continue support for previous Piksi
- Dispatches correct driver based on SBP version.
2017-04-18 18:25:54 +01:00
Eugene Shamaev
8130d85b42
AP_GPS: removal of legacy UAVCAN support
2017-04-17 17:27:18 +10:00
Pierre Kancir
292fa5f413
AP_GPS: example fix travis warning
...
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Eugene Shamaev
dfe9b0e6fc
AP_GPS: support for UAVCAN connected GNSS receivers
2017-04-10 22:38:12 +01:00
Michael du Breuil
6b523cbd46
AP_GPS: Fix a memory leak in QURT GPS
...
Fixes part of #6000
2017-04-09 16:56:00 +10:00
Jacob Walser
1b00dfb642
AP_GPS: Fix parameter metadata
2017-03-22 16:16:26 -07:00
Pierre Kancir
afb488c627
AP_GPS: fix implicit conversion warning from float to double
2017-03-17 13:07:57 +01:00
Randy Mackay
b82098ca44
AP_GPS: fix blended ground course
...
Thanks to jyl58 for finding this
2017-03-13 11:21:47 +09:00
Randy Mackay
3e628f30ff
AP_GPS: fix blending when accuracy reported as 1mm
...
Thanks to Michael DuBreuil for suggesting the fix
2017-03-13 11:31:51 +11:00
Randy Mackay
2002827de3
AP_GPS: rename pre-arm blending health check
2017-03-13 11:31:51 +11:00
Randy Mackay
e9c881c668
AP_GPS: stop blending if too many blending failures
2017-03-13 11:31:51 +11:00
Randy Mackay
b7ad8da9b9
AP_GPS: minor bracketing fix
...
This silences a warning from eclipse
No functional change
2017-03-13 11:31:51 +11:00
Randy Mackay
5de64273ec
AP_GPS: more efficient initialisation of blending arrays
2017-03-13 11:31:51 +11:00
Randy Mackay
81b20e971b
AP_GPS_UBLOX: use get_rate_ms accessor
2017-03-13 11:31:51 +11:00
Randy Mackay
ef1399a52f
AP_GPS: fixups after peer review
...
This includes these changes:
RATE_MS, RATE_MS2 parameter description Range minimum reduced to 50
_blend_health_counter is reset to 0 if blending is disabled
GPS_MAX_RECEIVERS is replaced with GPS_BLENDED_INSTANCE where appropriate
simplify all_consistent functions check of number of receivers
calc_blended_weights fix for initial check of how many receivers we have
remove unnecessary setting of GPS last time when blending fails
remove RebootRequired from AUTO_SWITCH param description
2017-03-13 11:31:51 +11:00
Randy Mackay
729ce34ce3
AP_GPS: add all_consistent and blend health for use as pre-arm check
2017-03-13 11:31:51 +11:00
Randy Mackay
72dfe1127f
AP_GPS: protect parameters from being accessed externally
...
backends become friends so they can continue to access parameters held in frontend
get_rate_ms made private because only used by frontend
Also moved static arrays higher in cpp file
2017-03-13 11:31:51 +11:00
Randy Mackay
3172657f26
AP_GPS: move constructor and complex accessors to cpp file
...
These functions are slightly long and make the .h file hard to read. Also saves a small amount of flash space.
No functional change
2017-03-13 11:31:51 +11:00
Randy Mackay
0066022a7f
AP_GPS: check for valid instance in highest_supported_status
...
highest_supported_status will always return FIX_3D for blended or invalid instance
setHIL_Accuracy checks instance is 2 or less
send_mavlink_gps2_raw uses num_instances variable directly to avoid confusion with num_sensors
2017-03-13 11:31:51 +11: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
priseborough
6b26bdd454
AP_GPS: Add option to blend multiple GPS receivers
...
Fix pre-existing bug in hard switch logic
Update GPS_AUTO_SWITCH description
protect against zero accuracy estimates returned by GPS drivers
2017-03-13 11:31:51 +11:00
Randy Mackay
cd379b0e86
AP_GPS: move time_epoch calcs into proper file
...
The frontend implementation was in the backend file
No functional change
2017-03-13 11:31:51 +11:00
Randy Mackay
a79474dcbc
AP_GPS: minor comment fix
...
No functional change
2017-03-13 11:31:51 +11:00
Randy Mackay
201504dbae
AP_GPS: remove unused get_antenna_offsets()
...
callers always specify an instance
2017-03-13 11:31:51 +11:00
Randy Mackay
2d0258b6a2
AP_GPS: remove unused highest_supported_status(void)
2017-03-13 11:31:51 +11:00
Randy Mackay
ac86c7999b
AP_GPS_MAV: set have_accuracy as boolean
2017-03-13 11:31:51 +11:00
Michael Oborne
e4ff445ea7
AP_GPS_GSOF-NOVA: fix last_gps_time_ms
2017-03-09 10:41:48 -08: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
44bcd74a57
AP_GPS: Remove dead SBF code
...
CID 125035
2017-03-06 15:24:22 +00: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
3ce7e4b322
AP_GPS: fixed fake uBlox with PVT message support
2017-02-21 06:09:33 +11:00
Lucas De Marchi
9f09442548
AP_GPS: rename UNIX_OFFSET
...
To keep consistency with other constants and make clear the unit.
2017-02-11 01:34:09 -08:00
murata
30151c8253
Global: Define MSEC_PER_SEC, MSEC_PER_WEEK, SEC_PER_WEEK and UNIX_OFFSET.
2017-02-11 01:34:09 -08:00
Lucas De Marchi
747f15b514
AP_GPS: add casts to consider literals as doubles
...
Since we pass -fsingle-precision-constant to the compiler, add casts to
make literals real doubles.
2017-02-06 09:27:22 -08:00
murata
b77941c4f2
AP_GPS: Delete unnecessary code.
2017-02-03 15:11:27 +09:00
Andrew Tridgell
c0cc2faefd
AP_GPS: disable esoteric GPS types on FMUv2
2017-01-29 16:31:06 +11:00
Francisco Ferreira
7ea0baefb1
AP_GPS: re-fix SBP fix status
2017-01-28 17:43:58 +00:00
Francisco Ferreira
512bd08326
AP_GPS: fix SBP supported status
2017-01-28 17:29:48 +00:00
priseborough
6d53ab7b76
AP_GPS: minor comment change
2017-01-27 16:57:42 +09:00
priseborough
4a490d522e
AP_GPS: use standard unit descriptor for milliseconds
2017-01-27 16:57:42 +09:00
priseborough
be0096e812
AP_GPS: Allow the user to specify the GPS time delay
...
If the user sets a non-zero value of the delay it will be used in preference over the default value for that GPS type.
If the GPS type is unknown and the parameter is set to zero, then a default delay of 1 sample period will be used (eg 200ms for 5Hz).
2017-01-27 16:57:42 +09:00
Andrew Tridgell
bdc0630ccf
AP_GPS: added all_configured() function
...
used for EKF to tell if gps_lag is valid
2017-01-27 16:57:42 +09: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
murata
3200f24106
AP_GPS: Unify from print or println to printf.
2017-01-27 18:20:22 +11:00
Francisco Ferreira
1fc0dbe0bd
AP_GPS: fix GSOF highest supported status
2017-01-26 00:04:32 +00:00
Michael Oborne
8e9f382240
AP_GPS_GSOF: update for new GPS_FIX's
2017-01-26 00:04:19 +00:00
Michael du Breuil
0cf41c9288
AP_GPS: Force ublox baud rate if we are allowed to config the GPS
2017-01-26 07:48:22 +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
Francisco Ferreira
d472fbde0c
AP_GPS: fix PX4 GPS driver leap seconds
2017-01-21 21:59:36 +00:00
Michael du Breuil
c696137a42
AP_GPS: Update the number of leapseconds
2017-01-18 18:07:26 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
b7f32e216d
AP_GPS: update parameter descriptions
2017-01-09 13:32:28 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
9aaeb6fe1a
AP_GPS: Add missing GPS Types
2017-01-06 21:24:42 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
8419045aea
Spell in comments
2017-01-06 10:57:39 -08:00
murata
fd153f2861
AP_GPS: Change search method of GPS type to switch statement.
...
AP_GPS: Correct the tab code to white space.
2016-12-21 10:31:43 +09:00
priseborough
453ced4a38
AP_GPS: remove unused EKF1 include
2016-12-19 08:07:11 +11:00
Randy Mackay
b296bc1d00
GPS: MAV driver fix for sanity checks of cog, sat count
2016-12-08 15:52:26 +09:00
Randy Mackay
8118222946
GPS: MAV driver fix for GPS_INPUT altitude
2016-12-08 15:52:26 +09:00
Randy Mackay
9e62f12dd7
GPS: MAV driver gets support for HIL_GPS message
2016-12-08 15:52:26 +09:00
Michael du Breuil
d97861d685
AP_GPS: Ublox: Skip SBAS request if we don't want to alter it
2016-11-21 14:15:19 +09:00
Michael Oborne
c62050dc1b
AP_GPS_SBF: fix accuracy reported by driver
2016-11-12 16:42:35 +09:00
Holger Steinhaus
5b66062f85
AP_GPS_PX4: unsubscribe on driver destruction.
2016-11-07 08:00:57 -03:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Michael Oborne
c5f8d8a695
AP_GPS_SBF: change reported altitude from geoid to MSL
2016-11-01 13:06:59 +09:00
Randy Mackay
aeb1de08f5
AP_GPS: fix MAV compile error
2016-10-29 16:45:00 +09:00
Randy Mackay
9290ee65cc
AP_GPS: MAV driver uses existing baud rates
...
GPS_INPUT messages can arrive through any mavlink serial port so we shouldn't be modifying any port's baud rates.
2016-10-29 14:33:44 +09:00
Peter Barker
7b75a4ec09
AP_GPS: add missing parameter metadata
2016-10-27 09:15:03 -07:00
Andrew Tridgell
af332cb336
AP_GPS: use const reference
2016-10-27 15:05:58 +11:00
priseborough
1dec6dd9b0
AP_GPS: Update parameter documentation
...
Add brief description of body frame conventions.
2016-10-27 14:54:45 +11:00
priseborough
b51c9dea6c
AP_GPS: Add parameters defining antenna offset in body frame
2016-10-27 14:54:41 +11:00
murata
762a66c9e5
AP_GPS_SBF: Adjust the initial value of HDOP
2016-10-26 09:54:59 +11: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
Peter Barker
6e72c899d1
AP_GPS: AP_GPS_GSOF: remove unused variable
2016-10-24 08:57:56 -02:00
Peter Barker
e17a71c6cc
AP_GPS: AP_GPS_NOVA: remove unused variables
2016-10-24 08:57:55 -02:00
Randy Mackay
e6e6e36da7
AP_GPS_MAV: fix hdop conversion
2016-10-18 20:24:55 +09:00
Lucas De Marchi
ae53920e5b
build: don't build examples with old build system
...
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file. Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11: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
Andrew Tridgell
500df1edf2
AP_GPS: support GPS_RTCM_DATA fragmented MAVLink message
...
support re-assembly of RTCM data packets
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
Andy Little
0d113b265c
Examples: fix examples for px4
...
The change to use AP_BoardConfig messed up the examples. Here are some
updated but there are plenty more to do.
2016-10-04 12:50:47 -03:00
Michael du Breuil
9c4b3ec1e1
AP_GPS: Fix incorrect incrementing of last_baud rate
...
This is a revert of 7c3b8dceb
which tried to start at index 0 of the
array of baudrates, however because of the way last_baud is used
this lead to a GPS always being reported as being 1 index off which
lead to users getting reports of baud rates that their GPS wasn't
configured for
Also renames last_baud to be current_baud as that is how it's
actuallly used and should reduce future confusion
And fixed some tabs/vs space issues around where the last_baud rate
was incremented.
2016-09-25 08:50:47 -07:00
Michael Oborne
11c376588d
AP_GPS_NOVA: support tersus/novatel/comnav gps
2016-09-20 10:53:49 +10:00
Matthew Brener
06388b0417
Global: Fix typos
2016-09-17 00:36:36 -03:00
Randy Mackay
38b3d3ff3a
AP_GPS_MAV: initialise location while handling_msg
...
This reduces a covarity warning but it likely not really an issue because we always initialise newly allocated memory to zero anyway
2016-09-01 12:01:14 +09:00
Lee Hicks
51e8d8a294
AP_GPS: Don't send config blob to GPS unless AUTO_CONFIG=1
...
All GPS types will recieve startup up blob config. For
some recievers this will cause them to hang. This commit
only allows sending of blobs if AUTO_CONFIG=1. Fixes #2622
2016-08-16 10:56:37 +10:00
Lee Hicks
7c3b8dceb9
AP_GPS: Fixed GPS serial speeds starting at 1 instead of 0
...
The counting of this will increment the counter before
selecting the baud speed, skipping the first baud rate.
2016-08-16 10:56:36 +10:00
Lee Hicks
3dd4f30460
AP_GPS: Adding 19200 as serial speed for GPS
...
APM supports baud speeds of 19200, but GPS baud rates
don't support it. This commit adds it to follow APM supported
baud rates.
2016-08-16 10:56:36 +10:00
Holger Steinhaus
cc4fafc3e4
AP_GPS_PX4: fixed GPS epoch calculations
2016-08-02 11:20:48 +10:00
Randy Mackay
6e224158f1
AP_GPS_MAV: use GPS_INPUT_IGNORE_FLAGS
2016-07-12 15:44:46 +09:00
Randy Mackay
e34aa0bc72
AP_GPS_MAV: minor formatting fixes
...
No functional change
2016-07-12 15:44:19 +09:00
Allan Matthew
4249f7dbe6
AP_GPS: Add GPS_MAV type and accept GPS_INPUT message
2016-07-12 15:34:27 +09: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
2239fd6a6e
AP_GPS: fixed hexdigit in NMEA detector
...
thanks to adorus for spotting this! See issue#4255
2016-06-06 07:36:31 +10: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
035937ea7e
AP_GPS: add some safety checks to _parse_decimal_100()
2016-05-20 10:06:45 -03:00
Lucas De Marchi
994b2fc966
AP_GPS: add unit test for _parse_decimal_100()
2016-05-20 10:06:44 -03:00
Lucas De Marchi
fc6dd97e61
AP_GPS: make _parse_decimal_100() a static function
...
This allows to easily write tests for it as opposed to having to
construct the entire object.
2016-05-20 10:06:44 -03:00
Bert Regelink
7379d120e1
AP_GPS: fix _parse_decimal_100() with negative numbers
...
_parse_decimal_100() did not parse the fractional part for negative
numbers. Furthermore, use the third decimal (when present) for proper
rounding.
2016-05-20 10:06:44 -03: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
Ricardo de Almeida Gonzaga
4047fb63fc
AP_GPS: Fix typos
2016-05-13 19:20:06 -03:00
dgrat
41661f815f
AP_Math: Replace the pythagorous* functions with a variadic template
...
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Andrew Tridgell
5ddb872b79
AP_GPS: allow Replay to set last sample time
2016-05-07 18:27:23 +10:00
Andrew Tridgell
428923b4b1
AP_GPS: use 3D velocity for uBlox
...
this makes uBlox use the 3D velocity for ground course and speed,
ensuring we use a consistent value everywhere (so same vector in EKF
as in navigation)
2016-05-07 18:27:23 +10:00
Andrew Tridgell
d24bbcd1ff
AP_GPS: convert vdop to cm
2016-05-07 18:27:22 +10:00