diff --git a/en/gnsslib/quecgnss.md b/en/gnsslib/quecgnss.md index 0f4c9eb9776c52e46d84e084de003ce5a8abbc7b..22be09e718d11ff2b3c1809654a7aaf3b966eb3b 100644 --- a/en/gnsslib/quecgnss.md +++ b/en/gnsslib/quecgnss.md @@ -73,6 +73,171 @@ $GNGSA,A,3,31,3 ``` +## GNSS positioning data introduction + +```python +NMEA port data classification: + $GPGGA Satellite positioning information + $GPGSA Satellite PRN data + $GPGSV Visual satellite information + $GPRMC Recommended location information + $GPVTG Ground speed information + $GPDTM Geodetic coordinate system information + $GPGNS GNSS location data +NMEA statement parsing: +The basic format of a GSV statement is as follows: + + $GPGSV,(1),(2),(3),(4),(5),(6),(7),...,(4),(5),(6),(7)*hh(CR)(LF) + + Field 1:Total GSV statements + + Field 2:GSV number of this sentence + + Field 3:The total number of visible satellites (00~12, the previous 0 will also be transmitted) + + Field 4:Satellite number (01~32, the previous 0 will also be transmitted) + + Field 5:Satellite elevation (00~90 degrees, the previous 0 will also be transmitted) + + Field 6:Satellite azimuth (000~359 degrees, the previous 0 will also be transmitted) + + Field 7: Signal-to-noise ratio (00~99dB, empty when no satellite is tracked) (the CN value is often said) + +The basic format of the GGA statement is as follows: + + $GPGGA,(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12)*hh(CR)(LF) + + Field 1:UTC time, hhmmss.sss, in minute-second format + + Field 2:Latitude ddmm.mmmm, degree division format (0 if leading number is insufficient) + + Field 3:Latitude N (North latitude) or S (South latitude) + + Field 4:Longitude DDDDMM.mmmm, degree division format (0 if leading digit is insufficient) + + Field 5:Longitude E (East) or W (West) + + Field 6:GPS status, 0= unlocated, 1= non-differential positioning, 2= differential positioning, 3= invalid PPS, 6= Estimating + + Field 7:Number of satellites in use (00-12) (0 if leading digit is insufficient) + + Field 8:HDOP horizontal accuracy factor (0.5-99.9) + + Field 9:Altitude (-9999.9-99999.9) + + Field 10:Unit of altitude, meters + + Field 11:The height of the Earth's ellipsoid relative to the geoid + + Field 12:Unit of height of the Earth's ellipsoid relative to the geoid, in meters + +The basic format of a VTG statement is as follows: + + $GPVTG,(1),(2),(3),(4),(5),(6),(7),(8),(9)*hh(CR)(LF) + + Field 1:Motion Angle, 000-359, (0 if leading digit is insufficient) + + Field 2:T = true North reference system + + Field 3:Motion Angle, 000-359, (0 if leading digit is insufficient) + + Field 4:M = Magnetic North reference system + + Field 5:Horizontal motion speed (0.00) (0 if leading digit is insufficient) + + Field 6:N = sections, Knots + + Field 7:Horizontal motion speed (0.00) (0 if leading digit is insufficient) + + Field 8:K = km/hour, km/h + + Field 9:Status Indicator E(Dead reckoning) A(Non-DGPS) + +The basic format of the RMC statement is as follows: + + $GPRMC,(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13)*hh(CR)(LF) + + Field 1:UTC time in hhmmss.sss format + + Field 2:Status, A = located, V = not located + + Field 3:Latitude ddmm.mmmm, degree division format (0 if leading number is insufficient) + + Field 4:Latitude N (North latitude) or S (South latitude) + + Field 5:Longitude DDDDMM.mmmm, degree division format (0 if leading digit is insufficient) + + Field 6:Longitude E (East) or W (West) + + Field 7:Speed, Knots, Knots + + Field 8:Azimuth, degree + + Field 9:UTC date in DDMMYY format + + Field 10:Magnetic declination, (000-180) degrees (0 if leading digit is insufficient) + + Field 11:Magnetic declination direction, E = East W = west + + Field 12:Status Indicator E(Dead reckoning) A(Non-DGPS) + + Field 13:Navigation status. V indicates that no navigation status is provided + +The basic format of a DTM statement is as follows: + + $GNDTM,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>*<9>(CR)(LF) + + <1>Local coordinate system codes W84, P90 + + <2>Coordinate subcode is empty + + <3>Latitude offset + + <4>Latitude hemispheres N (Northern Hemisphere) or S (Southern Hemisphere) + + <5>Longitude offset + + <6>Longitude hemisphere E (East longitude) or W (West longitude) + + <7>Height offset + + <8>Coordinate system code W84 + + <9>Check code + +The basic format of a GNS statement is as follows: + + $GNGNS,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>.<9>,<10>,<11>,<12>,<13>,*<14>(CR)(LF) + + <1> UTC time: Location time hhmmss.ss -- 000000.00~235959.99 + + <2> Latitude: ddmm.mmmmm -- 0000.00000 ~8959.9999 + + <3> North latitude: N latitude, S latitude south + + <4> Longitude: DDDDmm.mmmmm -- 0000.00000 ~17959.99999 + + <5> East Longitude West longitude: E, W + + <6> Positioning mode: N- not positioned; A- Located; D-ordinary differential positioning; P- High precision positioning; R-RTK positioning fixed solution; F-RTK locating floating-point solutions; E- estimated value; M- injection position; S- Analog input + + <7> Positioning satellites: Participating positioning satellites, 00-99 + + <8> HDOP: Horizontal accuracy factor, 0.5-99.9 + + <9> Altitude: Unit: meters + + <10> Geoid: The height of the Earth's ellipsoid relative to the geoid + + <11> Differential data time: null at the beginning of GN + + <12> Base station ID: GN is null at the beginning + + <13> Navigation status -- C= alarm, S= Safe, U= unsafe, V= invalid + + <14> Checksum +``` + ## Initialize GNSS ### **`quecgnss.init`** @@ -146,9 +311,213 @@ Gets GNSS location data. **Return Value** -A tuple `(size, data)` - Successful execution +Return a tuple on success, integer -1 on failure. The tuple form is as follows: +`(size, data)` +'size' - The size of the actual read data +'data' - GNSS positioning data + +## GNSS/LTE priority Settings + +> Currently only BG95M1/M3 models support this feature. + +### `quecgnss.setPriority` + +```python +quecgnss.setPriority(Priority) +``` + +On some modules, GNSS and LTE reuse RF resources, and this interface is used to control the priority of using RF resources between GNSS and LTE + +**Parameter Description** + +`Priority`,type int, sets the value of GNSS/LTE priority. + +The corresponding relationship between GNSS/LTE priorities of different platforms: + +|Priority| BG95M1/M3| +| ------ | -------- | +| 0 | GNSS>LTE | +| 1 | LTE>GNSS | + +**Return value description** + +Return integer '0' on success, integer '-1' on failure. + +## GNSS/LTE priority acquisition + +> Currently only BG95M1/M3 models support this feature. + +### `quecgnss.getPriority` + +```python +quecgnss.getPriority() +``` + +On some modules, GNSS and LTE reuse RF resources, and this interface is used to read the priority of using RF resources between GNSS and LTE + +**Return value description** + +Returns an integer representing the GNSS/LTE priority. + +The corresponding relationship between GNSS/LTE priorities of different platforms: + +|Priority| BG95M1/M3| +| ------ | -------- | +| 0 | GNSS>LTE | +| 1 | LTE>GNSS | + +## Built-in GNSS configuration parameter Settings + +> Currently, only EC800M GA/GB/GC/GD series, EG810M GA series, and EC200UCN_AA models support this function + +### `quecgnss.configSet` + +```python +quecgnss.configSet(config_type, config_value) +``` + +Set GNSS parameters, including satellite system, NMEA statement type, whether AGNSS and APFLASH are used, etc + +**Parameter Description** + +* `config_type`, int, the GNSS configuration option type to set, meaning as follows: + +| Parameter | Type | +| ---- | ---------------------- | +| 0 | The satellite system used in the configuration | +| 1 | Configures the type of NMEA statement to output | +| 2 | Configures whether to enable AGPS | +| 3 | Configures whether to enable APFLASH | +| 4 | Configure whether to enable GNSS backup | + +* `config_value`, int, GNSS configuration option value, meaning as follows: + +Satellite system (config_type = 0) : + +| Parameter | Meaning | +| ---- | ----------------------- | +| 0 | GPS | +| 1 | GPS + BeiDou | +| 3 | GPS + GLONASS + Galileo | +| 4 | GPS + GLONASS | +| 5 | GPS + BeiDou + Galileo | +| 6 | GPS + Galileo | +| 7 | BeiDou | + +NMEA statement type (config_type = 1) : This is represented by bitmap, with the option to be opened set to 1 +If you need to output GGA+RMC+GSV+GSA+VTG, bitmap (011111) should be used and converted to decimal 31 + +| Parameter | Meaning | +| ---- | ------------------------ | +| 0 | Disable output NMEA statement (000000) | +| 1 | GGA(000001) | +| 2 | RMC(000010) | +| 4 | GSV(000100) | +| 8 | GSA(001000) | +| 16 | VTG(010000) | +| 32 | GLL(100000) | +| 63 | All output (111111) | + +AGPS enabled (config_type = 2) : When this option is turned on, GNSS downloads ephemeris from the network and attempts to use ephemeris acceleration at startup + +| Parameter | Meaning | +| ---- | -------- | +| 0 | Closing AGPS | +| 1 | Open AGPS | + +APFLASH enabled (config_type = 3) : When this is enabled, GNSS saves ephemeris in the Quecpython module and attempts to use ephemeris acceleration at startup + +| Parameter | Meaning | +| ---- | ----------- | +| 0 | Closing APFLASH | +| 1 | Open APFLASH | + +Power backup enabled (config_type = 4) : When this option is enabled and the backup power is correctly connected, the GNSS chip can save ephemeris information by itself + +>The EC800M GB/GD series supports backup power supply + +| Parameter | Meaning | +| ---- | ----------- | +| 0 | Turn off the backup power| +| 1 | Turn on the backup power | + +**eturn value description** + +int, 0 indicates success, otherwise, failure + +## Built-in GNSS configuration parameter reading + +> Currently, only EC800M GA/GB/GC/GD series, EG810M GA series, and EC200UCN_AA models support this function + +### `quecgnss.configGet` + +```python +quecgnss.configGet(config_type) +``` + +Read GNSS parameters, including satellite system, NMEA statement type, whether AGNSS and APFLASH are used, etc + +**Parameter Description** + +* `config_type`, int, the type of GNSS configuration options to be read, meaning as follows: + +| Parameter | Type | +| ---- | ---------------------- | +| 0 | Configuration of the satellite system used | +| 1 | Configures the type of NMEA statement to output | +| 2 | Configures whether to enable AGPS | +| 3 | Configures whether to enable APFLASH | +| 4 | Configure whether to enable GNSS backup | + +**Return value description** + +int, meaning as follows (-1 indicates failure) + +Satellite system (config_type = 0) : + +| Parameter | Meaning | +| ---- | ----------------------- | +| 0 | GPS | +| 1 | GPS + BeiDou | +| 3 | GPS + GLONASS + Galileo | +| 4 | GPS + GLONASS | +| 5 | GPS + BeiDou + Galileo | +| 6 | GPS + Galileo | +| 7 | BeiDou | + +NMEA statement type (config_type = 1) : This is represented by bitmap, with the open option set to 1 +For example, when GGA+RMC+GSV+GSA+VTG is output, the returned value is 31, which is converted to binary bitmap (011111) + +| Parameter | Meaning | +| ---- | ------------------------ | +| 0 | disables output of the NMEA statement (000000) | +| 1 | GGA(000001) | +| 2 | RMC(000010) | +| 4 | GSV(000100) | +| 8 | GSA(001000) | +| 16 | VTG(010000) | +| 32 | GLL(100000) | +| 63 | All output is (111111) | + +AGPS enabled (config_type = 2) : When this option is turned on, GNSS downloads ephemeris from the network and attempts to use ephemeris acceleration at startup + +| Parameter | Meaning | +| ---- | -------- | +| 0 | Closing AGPS | +| 1 | Open AGPS | + +APFLASH enabled (config_type = 3) : When this is enabled, GNSS saves ephemeris in the Quecpython module and attempts to use ephemeris acceleration at startup + +| Parameter | Meaning | +| ---- | ----------- | +| 0 | Closing APFLASH | +| 1 | Open APFLASH | + +Power backup enabled (config_type = 4) : When this option is enabled and the backup power is correctly connected, the GNSS chip can save ephemeris information by itself -`size` - Size of the data read. -`data` - GNSS location data. +>The EC800M GB/GD series supports backup power supply --1 - Failed execution \ No newline at end of file +| Parameter | Meaning | +| ---- | ----------- | +| 0 | Turn off the backup power | +| 1 | Turn on the backup power | \ No newline at end of file diff --git a/zh/gnsslib/quecgnss.md b/zh/gnsslib/quecgnss.md index c2b35271d2890189575cef686856a60224535333..f5b9798bf5db55e07573ffd6f324a9ce64911525 100644 --- a/zh/gnsslib/quecgnss.md +++ b/zh/gnsslib/quecgnss.md @@ -82,12 +82,12 @@ $GNGSA,A,3,31,3 ```python NMEA端口数据分类: $GPGGA 卫星定位信息 - $GPGSA  卫星PRN数据 - $GPGSV  可视卫星信息 + $GPGSA 卫星PRN数据 + $GPGSV 可视卫星信息 $GPRMC 推荐定位信息 - $GPVTG  地面速度信息 + $GPVTG 地面速度信息 $GPDTM 大地坐标系信息 - $GPGNS  GNSS定位数据 + $GPGNS GNSS定位数据 NMEA语句解析: GSV 语句的基本格式如下: @@ -237,27 +237,27 @@ GNS语句的基本格式如下: <3> 南纬北纬: 北纬N,S南纬 - <4>经度:dddmm.mmmmm——0000.00000~17959.99999 + <4> 经度:dddmm.mmmmm——0000.00000~17959.99999 - <5>东经西经: 东经E,西经W + <5> 东经西经: 东经E,西经W - <6>定位模式: N-未定位;A-已定位;D-普通差分定位;P-高精度定位;R-RTK定位固定解;F-RTK定位浮点解;E-估算值;M-注入位置;S-模拟输入 + <6> 定位模式: N-未定位;A-已定位;D-普通差分定位;P-高精度定位;R-RTK定位固定解;F-RTK定位浮点解;E-估算值;M-注入位置;S-模拟输入 - <7>定位卫星:参与定位卫星,00-99 + <7> 定位卫星:参与定位卫星,00-99 - <8>HDOP:水平精度因子,0.5-99.9 + <8> HDOP:水平精度因子,0.5-99.9 - <9>海拔:单位:米 + <9> 海拔:单位:米 - <10>大地水准面: 地球椭球面相对大地水准面的高度 + <10> 大地水准面: 地球椭球面相对大地水准面的高度 - <11>差异数据时间:GN开头时为空 + <11> 差异数据时间:GN开头时为空 - <12>基准站ID:GN开头时为空 + <12> 基准站ID:GN开头时为空 - <13>导航状态—— C=告警, S=安全, U=不安全, V=无效 + <13> 导航状态—— C=告警, S=安全, U=不安全, V=无效 - <14>校验和 + <14> 校验和 ``` ## GNSS 功能初始化