From 0cf8901e0e723519fa62c90d66a72cbf06dcdd4b Mon Sep 17 00:00:00 2001 From: Phanny-P Date: Wed, 17 May 2017 23:36:15 -0400 Subject: [PATCH 1/4] Changed gps.c to have gps_auto_config set mode to "airborne <2g" instead of "pedestrian" I am new to this... terminology is foreign, please bear with me :/ Using a ublox M8N gps receiver on my BFF3, velocity readings were very laggy and inaccurate; readings were unusable. After researching, I compiled a hex where the gps_auto_config sets the "dynamic platform model" to the airborne <2g mode. Once done, I compared osd velocity readings to my car with excellent results and response time. I have flown about a dozen times since and the difference is astounding (sample video: https://youtu.be/CLArfxTj15M). From the ublox documentation: "7.1 Platform settings u-blox receivers support different dynamic platform models (see table below) to adjust the navigation engine to the expected application environment. These platform settings can be changed dynamically without performing a power cycle or reset. The settings improve the receiver's interpretation of the measurements and thus provide a more accurate position output. Setting the receiver to an unsuitable platform model for the given application environment is likely to result in a loss of receiver performance and position accuracy." link: https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29_Public.pdf --- src/main/io/gps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index dca20944c3..1d1c1a7fd1 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -123,9 +123,9 @@ static const gpsInitData_t gpsInitData[] = { static const uint8_t ubloxInit[] = { - 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, // CFG-NAV5 - Set engine settings - 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Pedistrian and - 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // capturing the data from the U-Center binary console. + 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x07, 0x03, 0x00, // CFG-NAV5 - Set engine settings + 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with + 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <2g acceleration and capturing the data from the U-Center binary console. 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xC2, // DISABLE NMEA messages From 83a54d3df539cf95e6f01ebe6b568bf2703103f9 Mon Sep 17 00:00:00 2001 From: Phanny-P Date: Mon, 22 May 2017 07:06:04 -0400 Subject: [PATCH 2/4] Update gps.c Updated default gps_auto_config dynamic model to airborn4g. ALSO Added airborne1g (which is commented out) so testing can be carried out on both modes. --- src/main/io/gps.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 1d1c1a7fd1..708243156b 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -123,10 +123,15 @@ static const gpsInitData_t gpsInitData[] = { static const uint8_t ubloxInit[] = { - 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x07, 0x03, 0x00, // CFG-NAV5 - Set engine settings + // 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x06, 0x03, 0x00, // CFG-NAV5 - Set engine settings + // 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with + // 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <1g acceleration and capturing the data from the U-Center binary console. + // 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x28, + + 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x08, 0x03, 0x00, // CFG-NAV5 - Set engine settings 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with - 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <2g acceleration and capturing the data from the U-Center binary console. - 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xC2, + 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <4g acceleration and capturing the data from the U-Center binary console. + 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x6C, // DISABLE NMEA messages 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x05, 0x00, 0xFF, 0x19, // VGS: Course over ground and Ground speed From c53d2d08bb7efa73295a43959cc27cff90efb66e Mon Sep 17 00:00:00 2001 From: Phanny-P Date: Tue, 13 Jun 2017 22:06:49 -0400 Subject: [PATCH 3/4] Create gps.c --- src/main/io/gps.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 708243156b..690d6519e9 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -122,17 +122,28 @@ static const gpsInitData_t gpsInitData[] = { #define DEFAULT_BAUD_RATE_INDEX 0 static const uint8_t ubloxInit[] = { - - // 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x06, 0x03, 0x00, // CFG-NAV5 - Set engine settings - // 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with - // 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <1g acceleration and capturing the data from the U-Center binary console. - // 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x28, + //Preprocessor Pedestrian Dynamic Platform Model Option + #if defined(GPS_UBLOX_MODE_PEDESTRIAN) + 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, // CFG-NAV5 - Set engine settings + 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Pedistrian and + 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // capturing the data from the U-Center binary console. + 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xC2, + //Preprocessor Airborne_1g Dynamic Platform Model Option + #elif defined(GPS_UBLOX_MODE_AIRBORNE_1G) + 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x06, 0x03, 0x00, // CFG-NAV5 - Set engine settings + 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with + 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <1g acceleration and capturing the data from the U-Center binary console. + 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x28, + + //Default Airborne_4g Dynamic Platform Model + #else 0xB5, 0x62, 0x06, 0x24, 0x24, 0x00, 0xFF, 0xFF, 0x08, 0x03, 0x00, // CFG-NAV5 - Set engine settings 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <4g acceleration and capturing the data from the U-Center binary console. 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x6C, - + #endif + // DISABLE NMEA messages 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x05, 0x00, 0xFF, 0x19, // VGS: Course over ground and Ground speed 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x03, 0x00, 0xFD, 0x15, // GSV: GNSS Satellites in View From 7ff4605c36b9fcb57685e4908602ea58d870fcfe Mon Sep 17 00:00:00 2001 From: Phanny-P Date: Tue, 13 Jun 2017 22:07:40 -0400 Subject: [PATCH 4/4] Create gps.c --- src/main/io/gps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 690d6519e9..97d511c0f6 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -142,7 +142,7 @@ static const uint8_t ubloxInit[] = { 0x00, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, 0x05, 0x00, 0xFA, 0x00, // Collected by resetting a GPS unit to defaults. Changing mode to Airborne with 0xFA, 0x00, 0x64, 0x00, 0x2C, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, // <4g acceleration and capturing the data from the U-Center binary console. 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x6C, - #endif + #endif // DISABLE NMEA messages 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x05, 0x00, 0xFF, 0x19, // VGS: Course over ground and Ground speed