GPS intermediate driver

Source: Internet
Author: User

GPS intermediate driver

Since the introduction of GPS intermediate driver (gpsid) in Windows Mobile 5.0, it has developed a global positioning system (GPS) windows Mobile applications become much simpler. The reason is that it adds an intermediate layer between the application program compiled by the developer and the GPS device, so that the developer does not need to directly access the gps device through the serial port, but access the API function provided by the gpsid, gpsid then accesses the gps device. In this way, the compiled GPS
Applications are device-independent. In addition, gpsid has the following two benefits:
1. Multiple applications can access the same GPS device at the same time, because you are accessing the gpsid
2. You do not need to parse the NMEA command. gpsid will help you parse it

For more information about gpsid, see GPS intermediate driver reference.
Mobile is easy to integrate with GPS webcast, which will not be discussed in this article.

The fake GPS and GPS settings tools provided by Windows Mobile 6 SDK are developed and used for gpsid Based on. NET Compact Framework 1.0, so they are suitable for Windows Mobile 5.0. You can find these two gadgets in the C:/program files/Windows Mobile 6 SDK/tools/GPS directory.

Fake GPS

If you want to develop a GPS application running on Windows Mobile, but you cannot find the gps device for debugging, or you can debug the program indoors, the GPS device cannot receive satellite signals, fake GPS is the tool you need.

All settings of gpsid are saved in the registry. You can modify the Registry to change the settings of gpsid. One setting allows gpsid to read GPS data from a. txt file containing the NMEA command without reading data from the GPS device. In Windows
Mobile integration with GPS is also introduced. The working principle of fake GPS is to modify the gpsid device of the registry so that the gpsid can read GPS data from a text file. For applications we develop, they are no different from accessing real devices.

Install fake GPS on your windows mobile device or simulator. The installation file is fakegps. Cab. Here I install fake GPS in the Windows Mobile 6 standard simulator. After the installation is successful, find and run it in the Start Menu.

 

The fake GPS settings do not take effect by default. In the first input box, we can change the status to enabled. Now we can select the file from which the GPS data is read in the second input box. Fake GPS logs contain two test files. When fakegpsdata.txt is opened, the gpsid will immediately receive the location information, while dixies.txt will wait for a while to receive the location information.

 

If you want to use your own test data, you can compile it. copy the TXT file to the/program files/fakegps/gpsfiles directory, and run fake GPS again to view it in the NMEA file list.

Below is a piece of NMEA data available for testing:
$ Gpgll, 4738.0173, N, 12211.1874, W, 191934.767, A * 21
$ Gpgsa, A, 2.6, 1.4, 2.3, * 3E
$ Gpgsv, 71,307, 26,283, 40*77
$ Gpgsv, 13,317, 37,226, 32,155, 42*42
$ Gpgsv, 3, 3, 9,134, 0, 0*46
$ Uplmc, 191934.767, A, 4738.0173, N, 12211.1874, W, 0.109623, 12.14, 291004, * 21
$ Gpgga, 191935.767, 4738.0172, N, 12211.1874, W, 1.4, 32.9, 17.2, M,-0.0, M, 0000, * 75
$ Gpgll, 4738.0172, N, 12211.1874, W, 191935.767, A * 21
$ Gpgsa, A, 2.6, 1.4, 2.3, * 3E
$ Uplmc, 191935.767, A, 4738.0172, N, 12211.1874, W, 0.081611, 15.81, 291004, * 2a

Here I chose fakegpsdata.txt as the test data. Click Done To save the settings and disable fake GPS. Then run the smart GPS tracker, a coordinate acquisition tool that I wrote some time ago. It was written based on Windows Mobile 5.0 gpsid and the effect is as follows:

So far, I have not used a real device. Fake
GPS is applicable to the Pocket PC and smartphone operating systems, which are adaptive.

GPS settings

In the Pocket PC operating system of Windows Mobile 5.0 and Windows Mobile 6, a gpsid configuration program is provided, in Windows Mobile 6 Professional, select start --> Settings --> System --> external GPS.

 

However, the smartphone operating system does not have a similar gpsid configuration program, which makes it inconvenient to develop the GPS application on the smartphone. I wrote one by myself, but it is not difficult, that is, to read/write the key values of several registries.

The Windows Mobile 6 SDK provides a tool named GPS settings, which is used to configure gpsid in the smartphone operating system. The function is the same as that on the Pocket PC. Find settings.exe in the C:/program files/Windows Mobile 6 SDK/tools/GPS directory and copy it to smartphone for running.

For more information about how to set gpsid, see the recommended learning materials.

Summary

GPS intermediate driver has brought many benefits to the development of GPS applications. The fake GPS and GPS settings tools provided by Windows Mobile 6 SDK make up for the vacancies in the Windows Mobile 5.0 SDK, this makes it easier to develop gpsid-based applications. If you are interested in the working principles of these two tools, you can use reflector to open their assembly and study it carefully. If you do not understand it, you can check the SDK help. In addition, the Windows Mobile 6 SDK comes with
The complete project code of the gpsid sample is helpful for understanding the working principle of gpsid, and its code has high reuse value. In D: this example can be found in the/program files/Windows Mobile 6 SDK/samples/pocketpc/CS/GPS directory.

Original address http://blog.csdn.net/hugengyong/article/details/5651177

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.