diff --git a/docs/Gps.md b/docs/Gps.md index d0754d5fb..1d914e71c 100644 --- a/docs/Gps.md +++ b/docs/Gps.md @@ -14,7 +14,8 @@ Enable the GPS from the CLI as follows: Note: GPS packet loss has been observed at 115200. Try using 57600 if you experience this. -For the last step check the Board documentation for pins and port numbers and check the Serial documentation for details on serial port scenarios where you will also find some example configurations. +For the connections step check the Board documentation for pins and port numbers and check the Serial documentation for details on serial port scenarios where you will also find some example configurations. + ### GPS Provider @@ -25,6 +26,14 @@ Set the `gps_provider` appropriately. | 0 | NMEA | | 1 | UBLOX | +### GPS Auto configuration + +When using UBLOX it is a good idea to use GPS auto configuration so your FC gets the GPS messages it needs. + +Enable GPS auto configuration as follows `set gps_auto_config=1`. + +If you are not using GPS auto configuration then ensure your GPS receiver sends out the correct messages at the right frequency. See below for manual UBlox settings. + ### SBAS When using a UBLOX GPS the SBAS mode can be configured using `gps_sbas_mode`. @@ -100,7 +109,7 @@ This will cause the GPS receive to send the require messages out 10 times a seco Next change the mode, click `NAV5 (Navigation 5)` in the Configuration View. -Set to `Dynamic Model` to `airborne <1g` and click `Send`. +Set to `Dynamic Model` to `Pedestrian` and click `Send`. Next change the SBAS settings. Click `SBAS (SBAS Settings)` in the Configuration View. @@ -113,3 +122,13 @@ Finally, we need to save the configuration. Click `CFG (Configuration` in the Configuration View. Select `Save current configuration` and click `Send`. + +### UBlox Navigation model + +Cleanflight will use `Pedestrian` when gps auto config is used. + +From the UBlox documentation: + +* Pedestrian - Applications with low acceleration and speed, e.g. how a pedestrian would move. Low acceleration assumed. MAX Altitude [m]: 9000, MAX Velocity [m/s]: 30, MAX Vertical, Velocity [m/s]: 20, Sanity check type: Altitude and Velocity, Max Position Deviation: Small. +* Portable - Applications with low acceleration, e.g. portable devices. Suitable for most situations. MAX Altitude [m]: 12000, MAX Velocity [m/s]: 310, MAX Vertical Velocity [m/s]: 50, Sanity check type: Altitude and Velocity, Max Position Deviation: Medium. +* Airbourne < 1G - Used for applications with a higher dynamic range and vertical acceleration than a passenger car. No 2D position fixes supported. MAX Altitude [m]: 50000, MAX Velocity [m/s]: 100, MAX Vertical Velocity [m/s]: 100, Sanity check type: Altitude, Max Position Deviation: Large diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 20168c472..d3eb8af05 100644 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -125,6 +125,13 @@ static const gpsInitData_t gpsInitData[] = { #define DEFAULT_BAUD_RATE_INDEX 0 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. + 0x00, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0xC2, + + // 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 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x01, 0x00, 0xFB, 0x11, // GLL: Latitude and longitude, with time of position fix and status @@ -132,6 +139,7 @@ static const uint8_t ubloxInit[] = { 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x02, 0x00, 0xFC, 0x13, // GSA: GNSS DOP and Active Satellites 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0xF0, 0x04, 0x00, 0xFE, 0x17, // RMC: Recommended Minimum data + // Enable UBLOX messages 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x02, 0x01, 0x0E, 0x47, // set POSLLH MSG rate 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x03, 0x01, 0x0F, 0x49, // set STATUS MSG rate 0xB5, 0x62, 0x06, 0x01, 0x03, 0x00, 0x01, 0x06, 0x01, 0x12, 0x4F, // set SOL MSG rate