您好,我是这个领域的新手,需要您的帮助。 我想在Android中获取GNSS星历表数据。我不想从任何网站下载它。 这就是我目前正在做的事情:
我使用GnssNavigationMessage.java(https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/location/java/android/location/GnssNavigationMessage.java)在Android上记录GNSS导航消息。
在我的记录器中,我使用以下命令获取数据: byte [] data = navigationMessage.getData();
现在我得到的数据看起来像这样:
导航,103,769,1,2,1,8,16,-4,19,66,-112,-126,-42,25,20,-8,后跟标题
我想获得以下参数以供进一步计算:
如果有办法将我收到的导航消息解析为这些参数,请告诉我。 如果我朝错误的方向走,请告诉我。 任何领导将不胜感激。 感谢。
答案 0 :(得分:0)
Google已实现了将导航消息作为其GNSSLogger app的一部分进行解析的代码:
GpsNavigationMessageStore
类描述说:
/**
* A class to extract the fields of the GPS navigation message from the raw bytes received from the
* GPS receiver.
*
* <p>Raw bytes are passed by calling the method
* {@link #onNavMessageReported(byte, byte, short, byte[])}
*
* <p>A {@link GpsNavMessageProto} containing the extracted field is obtained by calling the method
* {@link #createDecodedNavMessage()}
*
* <p>References:
* http://www.gps.gov/technical/icwg/IS-GPS-200D.pdf and
* http://www.gps.gov/technical/ps/1995-SPS-signal-specification.pdf
*
*/