The GPS industry is popular with the saying that "the application of GPS is only limited by people's imagination." Currently, the civilian field of GPS has included land transportation, marine transportation, civil aviation, communications, mapping, construction, mining, agriculture, power systems, Medical applications, scientific research, home appliances, entertainment and other fields, and the well-known car navigation is just one of the applications. In 2007, China's GPS has entered a period of full-scale explosion.
This article refers to the address: http://
At present, there are many GPS related products on the market, but due to various technical limitations, there are some serious problems: most products are dedicated to dedicated hardware platforms, high cost and poor portability; system development is difficult, development cycle is long, and software support is low. [2]; Using local maps, map database update is difficult.
In view of the above problems, this paper makes full use of the existing technology, integrates various existing resources, and designs a location query system based on Windows Mobile common platform and network electronic map. The communication part of the system is realized by SMS, which has the advantages of convenient map data acquisition, simple use, low cost and convenient operation.
1 overall design
Windows Mobile, Microsoft's software platform for Pocket PCs and Smartphones. Windows Mobile extends the familiar Windows desktop to personal devices. Windows Mobile is Microsoft's "mobile version of Windows" for handheld devices. The devices that use the Windows Mobile operating system mainly include PPC phones, PDAs, and portable music players. There are three kinds of Windows Mobile operating system, namely Windows Mobile Standard, Windows Mobile Professional, Windows Mobile Classic. The current version is Windows Mobile 6.1, and the latest version is 6.5.
The system can be divided into two parts: the Pocket PC Monitoring Center and the Pocket PC Monitoring Object. The main functions of the monitoring object are receiving GPS signals, extracting required information, and responding to monitoring commands of the monitoring center. The monitoring center sends a monitoring command to the monitoring object through a short message (SMS), receives data from the monitoring object, and processes the received data. In order to better display the location of the monitoring object, the monitoring center uses two kinds of network electronic maps, Google Map and Mapabc Map. The network electronic map data is downloaded in real time from the Google Maps or Mapabc map server via the HTTP protocol. The system block diagram is shown in Figure 1.
Â
Â
The main design features of the system are as follows:
(1) GPS positioning is implemented on the Windows Mobile platform;
(2) Real-time download, display, drag, zoom in/out of the network electronic map;
(3) Locating and displaying the location of the monitored object;
(4) The sound monitoring of the monitored object is realized.
2 PPC monitoring object design and implementation
Compared with PDA, PPC is a much narrower concept, specifically refers to the PDA using Microsoft Windows Mobile series operating system. The earliest Windows Mobile operating system is Poceket PC 1.0, a less successful operating system, but PPC Named after. Subsequent Poceket PC 2002, Windows Mobile 2003, and Windows Mobile 2003 SE are all very successful operating systems.
2.1 Implementation of GPS positioning data extraction
Traditional GPS programming receives the NMEA (National Marine Electronics Association) statement through serial communication, and then extracts the latitude and longitude information by parsing the NMEA statement [3]. The application monopolizes the GPS device, allowing only one application to access the GPS device at a time.
This article uses the GID interface (GPS Intermediate Driver) provided by Windows Mobile. GID is a device driver located in the middle layer of the application and GPS devices. When using GID, multiple applications are allowed to use GPS devices at the same time (all applications access GPS devices indirectly via GID), no need to parse NMEA statements, and access to almost all types of GPS devices using the same code [4].
The main steps implemented with GID are:
(1) Reference gpsapi.dll.GID is a set of local code on the Mobile Device, in. Used on the .NET Compact Framework platform, you need to use cross-platform calling technology to reference the corresponding application interface.
(2) Create a Windows CE event object with CreateEvent, so that when a GPS device acquires new data or the device status changes, it can receive a notification.
(3) Use GPSOpenDevice to establish a connection with GID. If the GPS device is off, the GPS device is activated.
(4) Wait for the GPS device to acquire new location data or device state change event by calling WaitForMultipleObjects (if only one event is called); when the GPS device acquires new location data, call GPSGetPosition to retrieve the location information. When the GPS device status changes, GPSGetDeviceState is called to retrieve the device status information.
(5) Repeat step (4) until GPS information is no longer needed.
(6) Call GPSCloseDevice to close the connection with GID. If the connection is the only connection to the GID, the GID automatically turns off the GPS device. GPS devices consume a lot of power, so turn off the connection to the GID when you no longer need to access the GPS device.
GID Full Name: Group Identification Group Identity is a versatile, adaptable and user-friendly graphical user interface for geometric simulation, data entry, model transformation, grid and visualization results for all types of numerical simulation packages. Be applicable. It is generally used for accounts such as online game testing, or for some resource users with shared nature.
2.2 Short message sending and receiving implementation
Short message sending and receiving is generally implemented by AT (Attention) instruction, and the system is implemented by Pocket Outlook. The Windows Mobile SDK provides a hosted package of services provided by Pocket Outlook, which can easily perform all personal information management functions [3]. All of these types constitute the POOM (Pocket Outlook Object Model).
(1) Short message transmission. The SmsAccount class in POOM can easily implement the sending of short messages. First, construct a short message using the SmsMessage class; then, use the Send method in the SmsAccount class to send a short message.
(2) Reception and interception of short messages. Pocket Outlook can receive and intercept short messages and only receive short messages that meet certain conditions. The short message reception and interception process is as follows:
1 Create an object of type MessageInterceptor.
2 Set the MessageCondition property to specify the MessageInterceptor object interception condition.
3 Set the InterceptionAction property to specify the action that Pocket Outlook performs after intercepting the message. In this system, the interception required short message is intercepted by setting the InterceptionAction property to NotifyAndDelete, and other programs will not receive the monitoring short message, so that the monitoring short message will not enter the short message inbox.
4 Add an intercept short message event handling method for the MessageInterceptor object. Intercepting short message events is defined as follows:
Public event MessageInterceptorEventHandler MessageReceived
This event is fired when a short message that meets the intercept condition arrives at the device. After the event processing method is added, when a short message that meets the intercept condition arrives, the MessageReceived event is triggered, and then the event processing method is automatically called for processing.
3 Design and implementation of monitoring center
Through the GPRS network, the PPC-side monitoring center sends monitoring commands to the monitoring objects mainly in the form of short messages, and realizes the functions of querying, displaying, and monitoring the monitoring objects by processing data from the monitoring objects.
3.1 Network electronic map implementation
At present, Windows Mobile does not support scripts, so the PPC-side monitoring center electronic map cannot be implemented using a map with an interface. The electronic map of the system PPC terminal monitoring center network uses Google Maps and Mapabc map of Beijing Tumeng Technology Co., Ltd.
(1) Map data download
Google Maps is composed of small map pieces of 256×256 pixels of different scales from 0 to 17 levels. Each Google Map tile is called a tile. Tile URI is similar to the following:
Among them, mt2.google.com is the Google Maps server, and x, y, and z respectively represent the coordinates and magnification factor of the tile. There are 4 Google Maps servers, mt0.google.com, mt1.google.com, mt2.google.com, and mt3.google.com. In order to improve the download speed of the map, the system downloads from 4 servers in turn.
(2) Map display
When given a latitude and longitude, to display the position it represents on the map, the latitude and longitude is converted to the tile coordinate of the corresponding magnification factor. The system adopts an approximate method transformation. After analysis, it is found that the longitude is linearly related to the x coordinate. The calculation formula is:
Â
Where longitude is the longitude value, the range is -180~+180, the west longitude is represented by a negative value, the east longitude is represented by a positive value, 0.0063 is a corrected value, and z is an amplification factor.
The latitude and y coordinate conversion formula is:
Â
Where latitude is the latitude value, the range is -90~+90, the north latitude is represented by a positive value, the south latitude is represented by a negative value, and z is an amplification factor. After converting the latitude and longitude to the tile coordinates, the latitude and longitude can be matched with the map, so that the position corresponding to the latitude and longitude can be displayed on the map.
The Windows Mobile Pocket PC's form client area width and height are 240 pixels and 268 pixels, and each tile is 256 × 256 pixels, so the client area needs 4 or 6 tiles to be stitched together. 2 and Figure 3 are shown.
Â
Â
(3) Map drag
Map movement is equivalent to changing the center coordinates of the map. The method for implementing map dragging by the system is: when clicking a point on the touch screen on the touch screen, the center coordinate of the map is moved to the click point. As shown in FIG. 4, the point O is the center of the window client area, the point P is the click point, the horizontal and vertical pixel distances ΔPx and ΔPy of the point P and the point O are calculated, and then the center of the map is horizontally and vertically respectively. Move the △Px and △Py pixels to realize the drag function of the map. The map after dragging is shown in Figure 5.
Â
Â
(4) Map zoom in/out
The zoom factor z of Google Maps ranges from 0 to 17, representing maps of different scales from 0 to 17. The 0~17 level maps are implemented with 18 maps of different levels of detail. Therefore, the zoom in/out function of the map only needs to change the size of the zoom factor, and switch the current realistic map to the map of the scale corresponding to the changed magnification factor. On the top, the center point latitude and longitude does not change.
3.2 Monitoring Center Interface Design and Main Function Test Results
Click the "Operation" menu, select "Monitor", "Location", and then set the monitoring object phone number, report times, report time interval in the pop-up menu, as shown in Figure 6.
Â
According to the setting shown in Figure 6, click the "Start" button, the PPC terminal monitoring center sends a monitoring command. After the monitoring object receives the location query command, it reports its position to the monitoring center according to the monitoring command. The PPC-side monitoring center displays the location information sent by the monitoring object and displays it on the map. Figure 7 shows the results of the test in front of the office building of Shenzhen University. The map is Google Maps. Click the "Settings" menu and then select "Use Mapabc Map" to switch to the Mapabc map, as shown in Figure 8. The short message of the PPC-side monitoring center construction monitoring command is as follows:
SmsMessage msg=new SmsMessage(15914175891, "*定◎ä½*"+interval);
Where interval specifies the time interval at which the monitored object reports location information, here "1".
The system is based on the Windows Mobile common platform, making full use of the Windows Mobile interface is friendly, easy to use and rich in support software. GPS data is realized by the GID interface provided by Windows Mobile, which enables multiple applications to use GPS devices at the same time, with good versatility and portability. Through actual testing, the system obtains map data conveniently, quickly, with low cost, convenient maintenance and high positioning accuracy, which can meet the increasing application requirements of people.
Data connectivity extends the power to integrate business and process data in a production model to give you the validated information you need to optimize and maximize valuable production resources. Minimized losses through the early detection of discrepancies. By improving productivity through more timely identification and correction of production problems.
Data Connectivity,Data Wire Connection,Data Logger Connection,Data Cable Connection
Jiangsu Sfere Electric Co., Ltd , https://www.elecnova-global.com