gpt4 book ai didi

安卓 GPS : How can I get satellites number in use from NMEA?

转载 作者:行者123 更新时间:2023-11-29 17:42:00 27 4
gpt4 key购买 nike

我用 android 获得了 NMEA 字符串。但我不知道如何才能获得正在使用的卫星编号?

最佳答案

您需要从您的 nmea 字符串中读取 GGA 字段。它为您提供被跟踪的卫星数量

GGA - 提供 3D 位置和精度数据的基本修复数据,

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

地点:

     GGA          Global Positioning System Fix Data
123519 Fix taken at 12:35:19 UTC
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
1 Fix quality: 0 = invalid
1 = GPS fix (SPS)
2 = DGPS fix
3 = PPS fix
4 = Real Time Kinematic
5 = Float RTK
6 = estimated (dead reckoning) (2.3 feature)
7 = Manual input mode
8 = Simulation mode
08 Number of satellites being tracked <-- this is what you want
0.9 Horizontal dilution of position
545.4,M Altitude, Meters, above mean sea level
46.9,M Height of geoid (mean sea level) above WGS84
ellipsoid
(empty field) time in seconds since last DGPS update
(empty field) DGPS station ID number
*47 the checksum data, always begins with *

然后您可以使用 String::split() 方法读取正在跟踪的卫星数量。

关于安卓 GPS : How can I get satellites number in use from NMEA?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28354033/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com