Commit Graph

60 Commits

Author SHA1 Message Date
Andrew Tridgell 519a26691e AP_GPS: make last_message_time_ms const 2013-12-29 18:39:07 +11:00
Andrew Tridgell 137880be70 AP_GPS: fixed a build warning 2013-12-11 10:22:22 +11:00
Andrew Tridgell 6f5ac1d553 AP_GPS: added support for GPS time in week/millisec
also adds time_epoch_usec() for MAVLink SYSTEM_TIME
2013-10-24 14:22:47 +11:00
Andrew Tridgell 7b1e2b0e78 AP_GPS: don't need notify.h here 2013-08-30 13:01:35 +10:00
Randy Mackay 496962f037 GPS: update notify 2013-08-30 13:01:35 +10:00
Andrew Tridgell 01c124d5f5 AP_GPS: added velocity_vector() method 2013-07-22 12:50:00 +10:00
Andrew Tridgell 7dbb898264 AP_GPS: switch fields to add units suffix
altitude -> altitude_cm
ground_speed -> ground_speed_cm
ground_course -> ground_course_cd

this helps prevent unit mixups
2013-07-10 14:04:22 +10:00
Tobias c95072ea25 AP_GPS: added explicit cast to omit [-Wconversion] warning 2013-07-08 14:53:20 +10:00
Andrew Tridgell edfebc1f29 AP_GPS: fixed indent-tabs-mode 2013-05-30 09:52:21 +10:00
Andrew Tridgell 786e4cf705 AP_GPS: added last_message_time_ms() API
used to help GPS logging
2013-04-28 14:53:02 +10:00
Andrew Tridgell f5d062d5ba AP_GPS: move byte swapping code to cpp 2013-04-28 14:51:37 +10:00
Andrew Tridgell 8d727614b4 AP_GPS: make status() const 2013-04-20 13:52:36 +10:00
Andrew Tridgell b3ec5187f2 AP_GPS: fixed uninitialied variable bugs found with valgrind 2013-04-17 23:02:13 +10:00
Randy Mackay 27309a553f GPS: fixes after review
Ensure 3D fix before returning velocity_down
UBLOX: restore check of fix_status as part of determining 2D or 3D fix
SIRF: add missing brackets on fix type check
2013-03-27 11:41:54 +09:00
Randy Mackay d7454bb09e GPS: add 2D fix type 2013-03-27 11:41:39 +09:00
Andrew Tridgell 551950c573 GPS_UBLOX: fixed auto-config of baudrate
this fixes the setting of the baudrate on a uBlox that is configured
for 9600. It fixes the NMEA message to have a \r\n, plus sends the
NAV_SOL rate config before the NMEA baudrate config message.

This fixes issue #159
2013-03-17 17:52:48 +11:00
Andrew Tridgell f67480fa50 AP_GPS: ensure constructors zero all key variables
this prevents a crash on PX4 if a GPS is attached after startup
2013-02-20 11:33:39 +11:00
Andrew Tridgell 18db7b2efd GPS: move _port setting to init()
this is needed to avoid constructor ordering dependencies
2012-12-20 14:52:32 +11:00
Andrew Tridgell 18fb9c67f6 AP_GPS: use AP_Progmem 2012-12-20 14:51:39 +11:00
Pat Hickey 9ed023aeb4 AP_GPS: Builds under AP_HAL. Not tested. 2012-12-20 14:51:25 +11:00
Andrew Tridgell 2e63b3ae8e AP_GPS: added in two more dynamic model enums 2012-11-22 16:23:29 +11:00
Andrew Tridgell e74e730992 AP_GPS: added velocity_down() call
on GPSes with raw velocity support this will be used for DCM
correction
2012-11-05 14:58:40 +11:00
Andrew Tridgell a53cbc08f3 GPS: avoid output delays in the GPS auto detection
this sends out the GPS init strings in 16 byte chunks to avoid causing
timing glitches when no GPS is attached
2012-10-18 16:18:32 +11:00
rmackay9 50a97f3092 AP_GPS: added get_lag method to return expected lag from the GPS. 2012-09-20 15:48:22 +09:00
Andrew Tridgell 59b44816ec GPS: replaced the GPS auto-detect mechanism
the old mechanism wasted most of the input bytes, and chewed a lot of
CPU, making it impractical to do GPS detection for a GPS attached
after startup

The new code is async, and detects a GPS by looking for a fully formed
packet with the right checksum for each GPS type
2012-09-17 14:45:47 +10:00
uncrustify 97035fbead uncrustify libraries/AP_GPS/GPS.h 2012-08-21 19:19:52 -07:00
rmackay9 c10d01f24b AP_GPS: revert delay callback to be "unsigned long" 2012-08-18 20:33:45 +09:00
rmackay9 8a29f47ce0 AP_GPS: replaced "int" with "int16_t" and "long" with "int32_t" 2012-08-18 16:35:38 +09:00
Andrew Tridgell 2d47bd0386 GPS: support getting raw velocity values from a UBlox
this may give better velocity numbers than the value from COG
2012-08-15 20:06:35 +10:00
Andrew Tridgell 618f43bef6 AP_GPS: added last_ground_speed() method
used for dead-reckoning in AHRS
2012-08-11 11:59:47 +10:00
Andrew Tridgell 8a6fcf998b AP_GPS: fixed types to be stdint types 2012-08-11 11:59:03 +10:00
Andrew Tridgell 37db5247cd GPS: added velocity and acceleration components
used by AHRS for acceleration correction
2012-06-27 16:01:49 +10:00
rmackay9 068fe64b9b ArduCopter HIL: changed calls to setHIL to send in time as a uint32_t (it was a float) 2012-06-26 22:50:17 +09:00
Andrew Tridgell a851c53de4 GPS: need pgmspace.h for _write_progstr_block() 2012-06-15 16:27:11 +10:00
Andrew Tridgell 70f18289c5 GPS: fixed auto-config of UBlox setup with no UBX messages
if a UBlox is configured for NMEA only, with no UBX messages at all
then it would never trigger the GPS_AUTO detection. This adds a UBX
config message to the init strings that enables the NAV_SOL message
2012-06-15 15:53:27 +10:00
Andrew Tridgell 33a2ad7e07 GPS: add stub settings for nav_setting in the other GPS drivers
only Ublox supports nav_setting so far
2012-06-10 16:34:53 +10:00
Jason Short 73e23aab2a GPS time set to unsigned int32 2012-06-03 11:13:50 -07:00
Andrew Tridgell 4dff78b9c0 GPS: expose last_fix_time 2012-03-10 10:34:32 +11:00
Andrew Tridgell 57f67ca6e3 GPS: added an acceleration estimate to the GPS driver
This uses the GPS ground speed to estimate acceleration
2012-03-10 10:34:30 +11:00
James Goppert 14d27b1e4c Cleaned up AP_GPS formatting. 2011-10-28 14:52:50 -04:00
Andrew Tridgell 6048f3870f GPS: fixed type to be consistent with declaration 2011-10-09 22:08:59 +11:00
tridge60@gmail.com 91e101f47e GPS: added delay hook for GPS detection
this allows for MAVLink to be up during GPS detection

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2987 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-31 22:34:37 +00:00
deweibel@gmail.com 8d7e7ff58e revert gps lib to 2602
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2608 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-21 01:38:31 +00:00
deweibel@gmail.com 26d1ec1f56 remove static declaration from idleTimeout
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2607 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-21 01:26:57 +00:00
deweibel@gmail.com 5b9e7eff9d clean up idleTimeout
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2606 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-21 01:20:39 +00:00
jasonshort 76d072591b made timeout public, settable
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2563 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-16 16:33:08 +00:00
deweibel@gmail.com 4f514faf97 Small bug fix for HIL gps when using auto-detect
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1663 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-16 18:19:07 +00:00
deweibel e620eb1326 Change MediaTek timestamps to millisecond Time of Day
Add epoch method to return timestamp epoch.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1589 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-01 23:50:36 +00:00
DrZiplok 2c0e8515d5 Add a date field to the standard GPS data. This may be zero, and its format is TBD (may be GPS-dependent).
Increase the no-data timeout to slightly more than a second, so that GPS' with a 1Hz update rate don't cause problems.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1461 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 00:44:09 +00:00
DrZiplok@gmail.com f2f38f2e71 Make the GPS ctor protected so that it can't be accidentally constructed or copied.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1353 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-29 03:32:37 +00:00