gps - 阅读 uint8_t XsRawGnssPvtData 在 C++ 和 Ubuntu 中检查 GPS RTK
问题描述
如果我的问题太愚蠢,我很抱歉,但不幸的是,我不是 C++ 开发人员。因此,我想读取 m_fixType 和 m_flags 的值,它们是名为 XsRawGnssPvtData 的结构的数据成员。
以下是关于这两个成员的信息:
uint8_t XsRawGnssPvtData::m_fixType
GNSSfix Type, range 0..5 0x00 = No Fix 0x01 = Dead Reckoning only 0x02 = 2D-Fix 0x03 = 3D-Fix 0x04 = GNSS + dead reckoning combined 0x05 = Time only fix 0x06..0xff: reserved
uint8_t XsRawGnssPvtData::m_flags
Fix Status Flags bit(0) = Set if there is a valid fix (i.e. within DOP & accuracy masks) bit(1) = Set if differential corrections were applied bit(4..2) = Power save mode state bit(5) = Set if heading of vehicle is valid bit(7..6) = Carrier phase range solution status: 0 = none, 1 = floating, 2 = fixed
我正在尝试以这种方式阅读它们:
if (packet.containsRawGnssPvtData()){
XsRawGnssPvtData status = packet.rawGnssPvtData();
cout << "type: " << unsigned(status.m_fixType) << " corrections: " << unsigned(status.m_flags);
}
我得到的是输出整数,我不知道它是否正确。例如,我得到:
类型:3 更正:1
这是预期的结果吗?我想检查我的 GPS 是否处于 RTK 模式,如果它正在接收更正,但我不明白如何读取结果。如果它是正确的,我应该得到更正:0 因为没有应用更正。
解决方案
推荐阅读
- makefile - Makefile:向编译文件添加横幅
- r - 查找分布在 data.frame 的 2 列中的成对重复
- spring-boot - 创建名为“rabbitListenerContainerFactory”的 bean 时出错
- python-3.x - Python CMD2 中断打印提示
- python - 如何将范围映射转换为字典
- ios - UIAlertcontroller 的可点击 url
- tensorflow - TensorFlow TFDV 不适用于图像
- c++ - 如何在 C++ 中正确管理发送到线程的消息
- python - Jupyter Notebook中Tensorflow中的导入错误
- sql - 如何计算不同的登录次数