关于GPSID(GPS Intermediate Driver )的学习了解

GPSID是Windows Mobile 5.0及更高版本中的一种中间件,它提供了一个虚拟串口以便多个应用同时访问GPS数据。尽管适用于常规GPS模块,但可能不支持特殊或多星座(如GLONASS、北斗)的GPS硬件。微软提到可以通过raw接口获取原始数据,通过CreateFile、ReadFile和CloseHandle等函数进行交互。然而,直接写入或设备控制通常不推荐,可能影响其他客户端。若GPSID开源,理论上可以修改以支持更多星座的GPS模块。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

         在mobile5.0 以及wince6.0 以上系统才有支持,定制系统的时候加入组件即可。

          GPSID 是一个中间件,相当于一个专门针对GPS 数据的虚拟串口,支持多个应用程序同时打开,同时操作。

        但是我担心的是这个GPSID 被微软固定死了,出来的数据都是一些比较死板的数据,万一我想获得一些原始数据怎么办?

是否能获得原始数据呢?

      因为一些特殊的GPS 模块估计GPSID是不支持的,甚至有一些不是GPS模块比如北斗 ,伽利略,等等。

不过我在微软的网站上看到说支持获得原始数据,那么怎么获取的呢?

Of most interest may be the Accessing Parsed GPS Data and Accessing Raw GPS Data topics, which explain how to write code that uses GPS Intermediate Driver location data.

还有,就是我们如何给GPS模块发命令呢?GPSID 能否透传呢?

   希望在这里能找到一些答案  http://msdn.microsoft.com/en-us/library/ms850332.aspx


The raw interface is one of two interfaces provided by the GPS Intermediate Driver for accessing GPS information. The raw interface, which makes GPS information available through a virtual COM port, mimics the design of many existing GPS scenarios. In both the existing scenarios and with the raw interface, applications callCreateFile to open a connection, call ReadFile some number of times to retrieve raw data, and call CloseHandle to close the connection.

For information about how to use the raw interface, see Overall Raw Data Code Structure, which explains how to use CreateFileReadFile, and CloseHandle with the GPS Intermediate Driver raw interface.

While it is not recommended in most scenarios, privileged applications can also call WriteFile and DeviceIoControl using the handle returned by CreateFile. In this case, the GPS Intermediate Driver forwards these calls to the hardware-specific device driver that interacts with the underlying GPS hardware. On platforms where trust is enabled, normal applications cannot successfully call WriteFile or DeviceIoControl. In this case, the last error, accessible through GetLastError, will be set to ERROR_ACCESS_DENIED.

In most cases, applications should avoid calling WriteFile or DeviceIoControl. Without the GPS Intermediate Driver, applications often interact directly with GPS hardware. In addition, in most cases only a single application uses the GPS hardware at a time. In this situation, it often doesn't matter if an application usesDeviceIoControl to put the GPS hardware into a non-standard mode (for example, one where the hardware returns GPS data in a proprietary format). Because the application makes the change, it knows how to interpret data in the new format. In contrast, with the GPS Intermediate Driver, changing this type of setting affects all clients, some of which may not know how to interpret data in the proprietary format, or to even know that a change has been made.

Note   Calling  DeviceIoControl with the same handle used to access data is different from calling  DeviceIoControl with a handle to the GPS Intermediate Driver. In the former case - the case that uses the handle discussed in this topic - the IOCTL is handled by the device driver that controls the underlying hardware. In the latter case - when you call  CreateFile with "GPD0:" - the IOCTL is handled by the GPS Intermediate Driver itself. For more information about controlling the GPS Intermediate Driver using  DeviceIoControl, see  Controlling GPS Intermediate Driver Execution.


从上面的说明看来,这个GPSID 对于一些常用的GPS 是有用的,比如导航仪,普通的只是单星的,只是GPS 的,但是万一支持GLONASS 或者北斗啥的,那这个GPSID是无法胜任完成这个任务的。

     不知道这个GPSID是否开源的,如果开源就可以修改成支持 GLONASS和北斗 ,GPS等共存的中间件。





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值