C# 在windows mobile 6中检索NMEA数据
我想从我的集成gps硬件中检索数据。我读了更多关于stackoverflow的帖子,但我没有找到c#源代码。非常感谢…在这里查看我的GPS示例 获取原始NMEA数据的线索是使用GPSID直接端口。它在regitrsy中编码:C# 在windows mobile 6中检索NMEA数据,c#,gps,windows-mobile-6,C#,Gps,Windows Mobile 6,我想从我的集成gps硬件中检索数据。我读了更多关于stackoverflow的帖子,但我没有找到c#源代码。非常感谢…在这里查看我的GPS示例 获取原始NMEA数据的线索是使用GPSID直接端口。它在regitrsy中编码: private string GetGPSPort() { string szStr=""; if (Registry.GetStringValue(Registry.HKLM,
private string GetGPSPort()
{
string szStr="";
if (Registry.GetStringValue(Registry.HKLM,
"System\\CurrentControlSet\\GPS Intermediate Driver\\Multiplexer",
"DriverInterface",
ref szStr)
== 0)
{
return szStr;
}
else
{
if (Registry.GetStringValue(Registry.HKLM,
"System\\CurrentControlSet\\GPS Intermediate Driver\\Drivers",
"CurrentDriver",
ref szStr) == 0)
{
string szPath = "System\\CurrentControlSet\\GPS Intermediate Driver\\Drivers\\" + szStr;
if (Registry.GetStringValue(Registry.HKLM, szPath, "CommPort", ref szStr) == 0)
{
return szStr;
}
}
}
return "";
}
上面给出了可用于打开和读取原始NMEA数据的端口名
以上假设设备支持MS GPSID
此外,有两种可能使用原始端口:a)使用串行通信或b)使用流。网站提供的完整源代码中同时使用了访问和读取方法。thaks获取答案。我无法尝试代码,为什么我刚刚找到了我的集成GPS的COM端口。对于检索数据,我使用SerialPort组件。。。在DataReceived事件上,我解析NMEA字符串!谢谢…如前所述,如果GPS驱动程序只支持流式传输,SerialPort组件可能不合适!