0% found this document useful (0 votes)
7 views

Design_and_implementation_of_embedded_GPS_system

This document presents the design and implementation of an embedded GPS system utilizing WGS84 coordinates and Mercator projection on an ARM-Linux platform. The system includes an electronic map, a graphical user interface, and GPS functionality, allowing for improved positioning accuracy and usability on various devices. Experimental results demonstrate the system's effectiveness in reducing positioning errors and facilitating map interactions.

Uploaded by

mekinjemal999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Design_and_implementation_of_embedded_GPS_system

This document presents the design and implementation of an embedded GPS system utilizing WGS84 coordinates and Mercator projection on an ARM-Linux platform. The system includes an electronic map, a graphical user interface, and GPS functionality, allowing for improved positioning accuracy and usability on various devices. Experimental results demonstrate the system's effectiveness in reducing positioning errors and facilitating map interactions.

Uploaded by

mekinjemal999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Design and Implementation of Embedded GPS System

SHI Jun-yong
Department of Computer Science and Application
Zhengzhou Institute of Aeronautical Industry Management
Zhengzhou, China
e-mail:shjy@zzia.edu.cn

Abstract—The development of embedded intelligent device operating system, software library and embedded GPS
facilitates the application of the GPS system. In order to avoid application respectively.
performing conversion between different coordinate systems, a
kind of GPS system is proposed based on free software by Embedded GPS Application
directly using WGS84 coordinate system and Mecator
projection. In the GPS system, ARM-Linux operating system E-Map GUI GPS
is configured on S3C2410 embedded development board, the
electronic map of Zhengzhou city in TAB format is parsed Embedded Operating System
using Mitab software package. Furthermore, through
MiniGUI graphical user interface, various functions such as Hardware
map viewing, map zooming and roaming can be realized.
Through positioning tests, it is showed that the GPS system x Figure 1 System Structure
has reduced the positioning error, and is thus applicable to
many platforms including various palmtop devices, smart The software library includes three modules: an e-map
phones and so on. module, a GUI module and a GPS module. The e-map
module is responsible for parsing the electronic map and
Keywords-GPS; WGS84; Mercator projection; Mitab; reading spatial objects from data files in TAB format. The
MiniGUI
GUI module is a graphical user interface used for receiving
I. INTRODUCTION and processing various user messages and implementing the
function of map displaying and zooming. The GPS module
With the development of modern communication, people is responsible for receiving GPS positioning sentences, and
can easily get to much more places than ever before. thus parsing the positioning information such as longitude,
Accordingly, embedded GPS devices are becoming more latitude, direction, speed and so on.
widely used and become navigation tool for vehicles in
travel. Embedded GPS is a system realizing various GPS III. IMPLEMENTATION OF ELECTRONIC MAP
functions, including electronic map browsing, coordinates
positioning and real time navigation, on embedded devices, A. WGS84 Coordinate
such as PDA, smart phones and other handheld devices. At present, WGS84 coordinates are used by most of the
Traditional embedded GPS systems usually adopt the GPS devices as the standard output data. WGS84 coordinate
WINCE operating system and are developed using EVC system is a space rectangular coordinate system with the
development tool. Furthermore, the electronic terrain map of origin located at the Earth's center of mass, Z-axis directing
China is usually drawn by Gauss-Kruger projection to terrestrial pole defined by Bureau International de
according to BJ54 or Xi'an 80 coordinates. In this kind of 1’Heure (BIH) 1984.0, X-axis directing to the intersection of
GPS system, it needs to perform multiple times of the meridian plane and the CTP equator of (BIH) 1984.0,
coordinate transformation to realize the positioning, which and Y-axis forming a right handed coordinate system with
leads to a complex process and a relatively high cost [1]. In Z-axis and X-axis. The semi-major axis of the earth ellipsoid
recent years, major mobile telephone manufactures launch is 6,378,137 meters and the first eccentricity of the earth
their own smart phone operating system, such as Android, ellipsoid is 0.081819218.
Symbian, etc. This provides a broader space for the
application of embedded GPS. In this paper, a kind of B. Map Projection
embedded GPS system is proposed based on Linux-like Map projection is a solution of establishing a one-to- one
embedded operating system platform using electronic map relationship between the points on earth surface and the
drawn according to WGS84 coordinate system and Mercator points on projection plane by using mathematical analysis,
projection. as showed in figure 2, so as to solve the problem of
coordinate conversion between the non-flat ellipsoid surface
II. DESIGNATION OF GPS SYSTEM and the plane. In the figure 2, ˄¬ˈ¶˅represents the
Fig. 1 shows the structure of the GPS system, which can latitude and longitude coordinates, and (x, y) represents the
be divided into 4 layers including hardware, embedded plane coordinates.
___________________________________
978-1-4673-0089-6/12/$26.00 ©2012 IEEE


Authorized licensed use limited to: Addis Ababa University. Downloaded on March 05,2025 at 20:38:30 UTC from IEEE Xplore. Restrictions apply.
poly-line object is widely used. Hereinafter, the storage of
electronic map is illustrated taking poly-line as an example.
A poly-line consists of a serial of straight lines and can
be defined as:
{L1, L2, L3, ... , Ln},
wherein Li is the ith straight lines making up the
poly-line. For each straight line segment Li, a pair of ordered
points can be defined:
Li={Pi-1ˈPi},
Where Pi-1 is the starting point of straight line Li and Pi
is the end point. Therefore, the poly-line can be described
using n +1 points:
x Figure 2 Map Projection {P0ˈP1ˈP2ˈĂˈPn}.
Different poly-lines may have different number of
There are many ways for map projections. Because most straight line n whose value is indicated using num_parts
part of China does not belong to high latitude area, and the field. Furthermore, the feature_type field is added to
most important role of travel map is guiding, Mercator describe various types of graphical objects in the same layer.
projection is selected. Mercator projection belongs to In addition, since the map is stored in indexed file structure,
conformal cylindrical projection, in which latitude and the feature_id field is used for recording the identifier of the
longitude lines are parallel lines respectively, and latitude graph elements. The poly-line storage structure is shown in
lines cross longitude lines with right angles. The latitude Figure 3.
lines are disposed equidistantly, while longitude lines have feature_id feature_type num_parts P0 P1 Ă Pn
larger intervals there between near the poles. Mercator
projection has the advantage of maintaining the correct x Figure 3 poly-line storage structure
direction and angle. If going along the straight line
connecting two points on Mercator projection map, one can IV. IMPLEMENTATION OF GUI
get to the destination without changing his direction. A. Displaying the E-map
However, compared with Gauss-Kruger projection,
Mercator projection has larger deformation in terms of The electronic map is displayed based on the software of
length and area, especially at high latitude region. MiniGUI which is a kind of graphical user interface. By
Taking the equator as the x-axis, the meridian as the using its GDI interface, graphics including images and text
y-axis and the equator as the standard latitude, the formula can be outputted on computer screen or other kind of display
of Mercator projection calculated under the condition of device. In the MiniGUI software, any output device is
equal angle is as following: abstracted as a device context which is similar to graphic
device concept commonly used in the Windows and X
x a x¬ (1) Windows. Each graphic device defines a rectangular output
¶ 1  e sin ¶ 2
e region, i.e. a window, on the computer display screen.
y a x ln[tan( 45 $  ˅x˄ ˅] Before it is used, the device context should be initialized, for
2 1  e sin ¶ (2) example by defining the color of lines, selecting the
In (1) and (2), a is the long radius of the ellipsoid mapping mode and setting the window coordinate origin, etc.
[2-3]. When drawing the graphics by calling the graphic output
In MapInfo, the electronic map in TAB format can be function, the device context in use should be indicated [4-5].
created by transforming the raster image into vector image, After receiving the message of MSG_PAINT, MiniGUI
selecting "Mercator WGS84 [EPSG: 41001]" as the application would update the windows. The drawing code of
projection type, registering the control point, adding an map is written where the message is handled. Before the
image layer, and drawing the points, lines, areas and text drawing, the device context should be obtained first and then
objects according to raster image which is placed below the BeginPaint(HWND hWnd) function should be called. After
added image layer. In TAB format file, objects are located the device context is initialized, the origin of the coordinate
by plane coordinates and measured in unit of meter. system is usually located at the top left corner of the output
rectangle, X-axis horizontally directs to right side, Y-axis
C. Storage Strategy of Graphic Object directs downwards in vertical line, and both axes are
Electronic map is the abstract description on spatial measured in the unit of pixel. In order to display the
objects in the plane, for example, by using a point to electronic map with correct orientation, it needs to call
represent the building, a line to represent the road, a polygon SetWindowOrg(hdc, &p) function, and make the origin of
to represent a closed region such as lawn and lake, and a the window in accordance with the origin of the map plane.
piece of text to show the remark information. MapInfo At last, EndPaint(HWND hWnd) function is called to end
software supports various types of graphic objects. As the the drawing. The flow diagram of the map displaying is in
navigation map is mainly used to depict the road information, Fig. 4.


Authorized licensed use limited to: Addis Ababa University. Downloaded on March 05,2025 at 20:38:30 UTC from IEEE Xplore. Restrictions apply.
V. IMPLEMENTATION OF GPS
Most of the GPS devices support GPS positioning
information in NMEA-0183 standard format, including
$GPGGA, $GPGSA, $GPGSV, $GPRMC, and other
sentences in ASCII code. Particularlyˈ$GPRMC include
all information necessary for the positioning system, such as
latitude, longitude, speed, direction, date and so on. The
output data of $GPRMC follows below format:
$GPRMC, <UTC Time>, <Status>, <Latitude>, <N/S
Indicator>, <Longitude>, <E/W Indicator>, <Speed Over
Ground>, <Course Over Ground>, <Date>, <Magnetic
Variation>, <Checksum> <CR> <LF>
VI. EXPERIMENTAL RESULTS
In this paper, the visualization of electronic map is
realized on the ARM-Linux system platform. In the
experiment system, the terminal device is based on the
S3C2410 embedded development board with CPU working
x Figure 4 Flow Diagram of Display Process
at 200MHz, 64MB SDRAM, 3.5 inch LCD touch screen and
240 × 320 pixels resolution. The electronic map uses TAB
B. Map Zooming
format data developed with MapInfo, and includes three
The plane coordinates (x, y) of the electronic map graphic layers, i.e. road layer, text layer and symbol layer.
obtained through map projection can be converted into The embedded GPS application uses MiniGUI-1.6.10 as
screen coordinates (X, Y) measured in the unit of pixel graphic user interface and use the C API of Mitab-1.7.0
according to the following formula: library to read and write TAB file. The final display result
X=(int)(x-Minx)/factor (3) was showed in Figure 6.
Y=(int)(Miny-y)/factor (4)
In (3) and (4), the variable factor is the distance
represented by each pixel and (Minx, Miny) is for the
bottom left corner of the map.
The paper map of city in China usually chooses the scale
of 1:2.5 million. Research on map has shown that, when
drawing the same region, the optimum scale for displaying
the electronic map is the scale of paper map multiplied by
0.8 [6-8]. Converting the optimum scale into the ratio of
distance and pixel, the value of factor can be set as 20.
C. Map Roaming
Electronic map roaming refers to selectively displaying
part of the map by changing the window origin (OriginX,
OriginY) taking the size restriction of the screen into
consideration. This procedure can be illustrated in Figure 5.

x Figure 6 Test Result

To perform testing, 20 locations are selected from the


electronic map and their plane coordinates are directly
obtained. On the other hand, the GPS positioning
coordinates of the selected locations are measured using
GPS device, and their plane coordinates are calculated using
Mercator projection formula. Comparing the calculated
x Figure 5 Roaming Map results with those directly obtained from the electronic map,
the offset of calculated results from the position in the map
OriginX=X-ScreenWidth/2 (5) plane is shown in Figure 7. From the figure, it is not difficult
OriginY=Y-ScreenHeight/2 (6) to see that, using GPS device to perform positioning on the
In (5) and (6), the variables ScreenWidth and electronic map, the offset of vertical coordinates and
ScreenHeight are the display screen’s width and height, horizontal coordinates is within 2 pixels substantially.
respectively, both in unit of pixel.


Authorized licensed use limited to: Addis Ababa University. Downloaded on March 05,2025 at 20:38:30 UTC from IEEE Xplore. Restrictions apply.
ACKNOWLEDGMENT

The author thank for the support by the Foundation of
 He'nan Educational Committee (NO. 2011A520043), Key
Technologies R & D Program of He'nan Science and
 Technology Committee (NO. 092102210307).
RIIVHW

[


\ REFERENCES
[1] Lu Liang-Xi, Xu Ping, Wang Wei. Simple Discussion on Electronic
 Map Coordinates Transformation in ITS for Small and Medium
Cities. Geomatics & Spatial Information Technology, vol. 27, pp.
40–42, Feb. 2004.

           [2] Cui Jin-Hong, Wang Xu. Research on Google Map Algorithm and
Implementation. Computer Science, vol. 34, pp. 193–195, Nov. 2007.
ORFDWLRQ
[3] Williams R T. Lambert and Mercator map projections in geology and
geophysics. Computers and Geosciences, vol. 21, pp. 353̾ 364,
x Figure 7 Positioning Offset March 1995.
[4] He Zhe, Zhu Zhen-Min, LUO Hai-yong, GU Xiao-guang. Design and
VII. CONCLUSION Implementation of Embedded GUI System. Microelectronics &
Computer, vol. 24, pp. 70̾72, June 2007.
An embedded GPS application system is proposed in this
[5] Wu Jian-fei, Cheng Ming-xiao. Implementation of Real-time Curve
paper based on embedded system, which mainly includes Plotting Under Embedded Linux Graphic System. Computer
electronic map, GUI interface and GPS module. The Engineering, vol. 33, pp. 259̾261, Oct. 2007.
electronic map is drawn according to WGS84 coordinate [6] Li Nai-liang. Application of Variable-scale Map Projection in the
system and Mercator projection. Through MiniGUI and "Shanghai Urban Traffic Map ". Cartography, pp. 20̾21, Feb. 2001.
Mitab library, various functions such as map viewing, map [7] Jiang Nan, Bai Xiao-shuang. Establishment and Application of
zooming and roaming are realized. Then, positioning tests Multi-scale Display Model in Basic Electronic Map. Geomatics and
are performed based on this electronic map in combination Information Science of Wuhan University, vol. 35, pp. 768̾772, July
2010.
with GPS devices. The test results show that positioning
[8] Mustafa N, Kerishman S, et al. Dynamic Simplification and
object has little offset relative to the position of Visualization of Large Maps. International Journal of Geographical
corresponding graphic object on the map. Therefore, the Information Sceience, vol. 20, pp. 273̾302, March 2006.
GPS application has good positioning function, and is thus
suitable for use in many embedded platforms such as various
palmtop devices, smart phones and so on.


Authorized licensed use limited to: Addis Ababa University. Downloaded on March 05,2025 at 20:38:30 UTC from IEEE Xplore. Restrictions apply.

You might also like