LCOV - code coverage report
Current view: top level - AP_GPS - AP_GPS_Params.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 3 100.0 %
Date: 2026-09-09 11:02:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : 
       2             : /*
       3             :    This program is free software: you can redistribute it and/or modify
       4             :    it under the terms of the GNU General Public License as published by
       5             :    the Free Software Foundation, either version 3 of the License, or
       6             :    (at your option) any later version.
       7             : 
       8             :    This program is distributed in the hope that it will be useful,
       9             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      10             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      11             :    GNU General Public License for more details.
      12             : 
      13             :    You should have received a copy of the GNU General Public License
      14             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.
      15             :  */
      16             : 
      17             : #include "AP_GPS_config.h"
      18             : 
      19             : #if AP_GPS_ENABLED
      20             : 
      21             : #include "AP_GPS.h"
      22             : 
      23             : // table of user settable parameters
      24             : const AP_Param::GroupInfo AP_GPS::Params::var_info[] = {
      25             :     // @Param: TYPE
      26             :     // @DisplayName: GPS type
      27             :     // @Description: GPS type
      28             :     // @Values: 0:None,1:AUTO,2:uBlox,5:NMEA,6:SiRF,7:HIL,8:SwiftNav,9:DroneCAN,10:Septentrio(SBF),11:Trimble(GSOF),13:ERB,14:MAVLink,15:NOVA,16:HemisphereNMEA,17:uBlox-MovingBaseline-Base,18:uBlox-MovingBaseline-Rover,19:MSP,20:AllyStar,21:ExternalAHRS,22:DroneCAN-MovingBaseline-Base,23:DroneCAN-MovingBaseline-Rover,24:UnicoreNMEA,25:UnicoreMovingBaselineNMEA,26:Septentrio-DualAntenna(SBF)
      29             :     // @RebootRequired: True
      30             :     // @User: Advanced
      31             :     AP_GROUPINFO_FLAGS("TYPE",    1, AP_GPS::Params, type, 0, AP_PARAM_FLAG_ENABLE),
      32             : 
      33             :     // @Param: GNSS_MODE
      34             :     // @DisplayName: GNSS system configuration
      35             :     // @Description: Bitmask for what GNSS system to use (all unchecked or zero to leave GPS as configured)
      36             :     // @Bitmask: 0:GPS,1:SBAS,2:Galileo,3:Beidou,4:IMES,5:QZSS,6:GLONASS,7:NAVIC
      37             :     // @User: Advanced
      38             :     AP_GROUPINFO("GNSS_MODE", 2, AP_GPS::Params, gnss_mode, 0),
      39             : 
      40             :     // @Param: RATE_MS
      41             :     // @DisplayName: GPS update rate in milliseconds
      42             :     // @Description: Controls how often the GPS should provide a position update. Lowering below 5Hz(default) is not allowed. Raising the rate above 5Hz usually provides little benefit and for some GPS (eg Ublox M9N) can severely impact performance.
      43             :     // @Units: ms
      44             :     // @Values: 100:10Hz,125:8Hz,200:5Hz
      45             :     // @Range: 50 200
      46             :     // @User: Advanced
      47             :     AP_GROUPINFO("RATE_MS", 3, AP_GPS::Params, rate_ms, 200),
      48             : 
      49             :     // @Param: POS_X
      50             :     // @DisplayName: Antenna X position offset
      51             :     // @Description: X position of the first GPS antenna in body frame. Positive X is forward of the origin. Use antenna phase centroid location if provided by the manufacturer.
      52             :     // @Units: m
      53             :     // @Range: -5 5
      54             :     // @Increment: 0.01
      55             :     // @User: Advanced
      56             : 
      57             :     // @Param: POS_Y
      58             :     // @DisplayName: Antenna Y position offset
      59             :     // @Description: Y position of the first GPS antenna in body frame. Positive Y is to the right of the origin. Use antenna phase centroid location if provided by the manufacturer.
      60             :     // @Units: m
      61             :     // @Range: -5 5
      62             :     // @Increment: 0.01
      63             :     // @User: Advanced
      64             : 
      65             :     // @Param: POS_Z
      66             :     // @DisplayName: Antenna Z position offset
      67             :     // @Description: Z position of the first GPS antenna in body frame. Positive Z is down from the origin. Use antenna phase centroid location if provided by the manufacturer.
      68             :     // @Units: m
      69             :     // @Range: -5 5
      70             :     // @Increment: 0.01
      71             :     // @User: Advanced
      72             :     AP_GROUPINFO("POS", 4, AP_GPS::Params, antenna_offset, 0.0f),
      73             : 
      74             :     // @Param: DELAY_MS
      75             :     // @DisplayName: GPS delay in milliseconds
      76             :     // @Description: Controls the amount of GPS  measurement delay that the autopilot compensates for. Set to zero to use the default delay for the detected GPS type.
      77             :     // @Units: ms
      78             :     // @Range: 0 250
      79             :     // @User: Advanced
      80             :     // @RebootRequired: True
      81             :     AP_GROUPINFO("DELAY_MS", 5, AP_GPS::Params, delay_ms, 0),
      82             : 
      83             : #if AP_GPS_SBF_ENABLED
      84             :     // @Param: COM_PORT
      85             :     // @DisplayName: GPS physical COM port
      86             :     // @Description: The physical COM port on the connected device, currently only applies to SBF and GSOF GPS
      87             :     // @Range: 0 10
      88             :     // @Increment: 1
      89             :     // @User: Advanced
      90             :     // @Values: 0:COM1(RS232) on GSOF, 1:COM2(TTL) on GSOF
      91             :     // @RebootRequired: True
      92             :     AP_GROUPINFO("COM_PORT", 6, AP_GPS::Params, com_port, HAL_GPS_COM_PORT_DEFAULT),
      93             : #endif
      94             : 
      95             : #if GPS_MOVING_BASELINE
      96             :     // @Group: MB_
      97             :     // @Path: MovingBase.cpp
      98             :     AP_SUBGROUPINFO(mb_params, "MB_", 7, AP_GPS::Params, MovingBase),
      99             : #endif
     100             : 
     101             : #if HAL_ENABLE_DRONECAN_DRIVERS
     102             :     // @Param: CAN_NODEID
     103             :     // @DisplayName: Detected CAN Node ID for GPS
     104             :     // @Description: GPS Node id for GPS.  Detected node unless CAN_OVRIDE is set
     105             :     // @ReadOnly: True
     106             :     // @User: Advanced
     107             :     AP_GROUPINFO("CAN_NODEID", 8, AP_GPS::Params, node_id, 0),
     108             : 
     109             :     // @Param: CAN_OVRIDE
     110             :     // @DisplayName: DroneCAN GPS NODE ID
     111             :     // @Description: GPS Node id for GPS. If 0 the gps will be automatically selected on a first-come-first-GPS basis.
     112             :     // @User: Advanced
     113             :     AP_GROUPINFO("CAN_OVRIDE", 9, AP_GPS::Params, override_node_id, 0),
     114             : #endif
     115             : 
     116             :     AP_GROUPEND
     117             : };
     118             : 
     119        6294 : AP_GPS::Params::Params(void)
     120             : {
     121        6294 :     AP_Param::setup_object_defaults(this, var_info);
     122        6294 : }
     123             : 
     124             : #endif  // AP_GPS_ENABLED

Generated by: LCOV version 1.14