0% found this document useful (0 votes)
34 views6 pages

Locating GPS Coordinates On PDA

Uploaded by

arnavmate480
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)
34 views6 pages

Locating GPS Coordinates On PDA

Uploaded by

arnavmate480
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/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/262346457

Locating GPS coordinates on PDA

Conference Paper · August 2008

CITATIONS READS

2 349

3 authors, including:

Nicolae-Iulian Enescu Dan Mancas


University of Craiova University of Craiova
18 PUBLICATIONS 13 CITATIONS 19 PUBLICATIONS 19 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Nicolae-Iulian Enescu on 21 April 2015.

The user has requested enhancement of the downloaded file.


8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC’08)
Rhodes, Greece, August 20-22, 2008

Locating GPS Coordinates on PDA


NICOLAE-IULIAN ENESCU
DAN MANCAS
ECATERINA - IRINA MANOLE
Computer and Communication Engineering Department
Faculty of Automation, Computers and Electronics
Bvd. Decebal, Nr. 107, 200440, Craiova, Dolj
ROMANIA

Abstract: - The purpose of our research is to find algorithms for loading large maps on PDA and place on them the
geographical location given by latitude and longitude. C++ and C# programming languages have been used for
implementation. It was elaborated a software which runs on PDA with Windows Mobile 2003 OS and implements
algorithms for finding the coordinate on a map represented like a TIF image. The application must localize the
coordinates known by longitude and latitude over a given image in TIF format which can represent a map with scale
1:200000 or 1:25000. The map headers contain information that refer to map limit. An algorithm that permits map
synchronization when the value of current map is out of limit it was necessary.

Key-Words: - GPS, map, TIF, coordinates, PDA, Windows Mobile 2003

1 Informatics solution map. Each unit has a correspondent 1:200000 map


As a result of many PDA have Windows Mobile OS, the image.
informatics solution for implement the requests was to The mesh code for the 1st area is 4 digits long. The value
use .NET CF C# with Microsoft Visual Studio .NET is composed from 2 parts of 2 digits each.
2003. Due to .NET CF has some limitations regarding First 2 digits are obtained by multiplying the south edge
loading a TIF image, a dynamic library for the module latitude degrees with 1.5, figure 2.
which load and save a TIF image it was build in C++ The next 2 digits are obtained by subtracting the west
with Microsoft eMbedded Visual C++ 4. edge longitude degrees with 100, figure 2.
Because the program needed additional functions that
are not in .NET CF it was used an application framework
named “Smart Device Framework 1.2” which enriches
and extends the .NET Compact Framework. There are
many new class libraries and controls along with all the
existing class libraries and controls available free on
www.opwnnetcf.org.

2 Algorithms
200000 and 25000 maps structure is mesh type. It is
called “Standard Area Mesh”. This is the standard way
to divide the area by constant interval of longitude and
latitude. “Standard Area Mesh” has 3 levels.

The 1st Area Block (Primary Area Division or the First


Mesh)
Figure 1 – Primary Area Division
The Primary Area Division is made by dividing the
country map into rectangles with the width of 1-degree
Mesh code for A is:
longitude and height of 2/3-degree latitude (1º X 40’),
2º x 1/3 = 40’
figure 1.
The 1st Area Block has a correspondent area of
6,400km2, which is the area of 1 unit from 1:200000

ISSN: 1790-5109 470 ISBN: 978-960-6766-94-7


8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC’08)
Rhodes, Greece, August 20-22, 2008

Figure 2 – Mesh code for Primary Area Division

The 2nd Area Block (Secondary Area Division or the


Second Mesh)
Dividing the 1st area division vertically – horizontally
by 8 makes the 2nd area. Each unit is 7’ 30” x 5’ and
correspond to 1 unit of the 1:25000 map, which has an Figure 4 – Third Area Division
area of 100 km2.
The mesh code for the 2nd area division is a 2-digit code. The major concern is that there are irregular maps and
First digit is numbered from 0 for south edge to 7 for the maps have a trapezoidal shape instead of a
north along longitude line. Second digit is numbered rectangular one as we might expect. The first step toward
from 0 to west edge to 7 for east edge along latitude line, a good map joining quality is to adjust the maps shape.
figure 3. The program must cut images exactly on the edges of the
map. The problem was that the images are not
rectangles, and the information about the corners is not
accurate. In order to solve those problems the application
must find the real map corners and must transform the
maps in rectangles using affine transformation, figure 5.

Figure 3 – Secondary Area Division

The 3rd Area Block (Third Area Division or the Base


Mesh)
Dividing the 2nd area division vertically – horizontally by
10 makes the 3rd area. Each unit is 45” x 30” and is
corresponding to an area of 1 km2.
The mesh code for the 3rd area division is a 2 digits code.
First digit is numbered from 0 for south edge to 9 for
north edge along longitude line. Second digit is
numbered from 0 for west edge to 9 for east edge along
latitude line.
The 3rd Area Division is called “Base Mesh”, figure 4.

Figure 5 - Transform maps in rectangles

ISSN: 1790-5109 471 ISBN: 978-960-6766-94-7


8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC’08)
Rhodes, Greece, August 20-22, 2008

application is to provide the user a tool to interact with


In theory, every map image should have a 2-pixel width map images. The images are TIF files. There are two
boundary, gray colored. Unfortunately this is not true all kinds of maps the application can work with. The
the time. There are many cases when the boundary line classification is based on the map scale specification and
is missing, or is only 1-pixel width or the color is not these are 1:200000 and 1:25000.
gray. The information in the TIF file can have 2 types of
The program searches the real corner by checking the organization:
color of pixels, figure 6. - by strips (see figure 7)
- by tiles (see figure 8)
Both types are supported.
Because the PDA memory is limited, not the entire TIF
file is loaded in the main memory. Only an image of
900x900 pixels is kept in the main memory. This image
is named “Working data”.
When the user drags the map outside of the “Working
data” image then this image is updated with a new sub-
zone of the TIF map.
When this happens, the hour glass cursor appear on the
screen for a short time.
For each TIF file organization (strips or tiles) there is an
algorithm to extract a “Working data” sub-zone.

Figure 6. Searching the real corner of a map

The two arrows show the direction of searching. Every


pixel, starting from the file boundary, it is checked to see
if it has a color different than Black (text color), Brown
(heights), White (none).
There are 2 directions: one for finding the “X”
coordinate and the other for finding the “Y” coordinate.
The same procedure it is used for the all-4 corners.
There are couples of conditions to be met in order to
decide if a pixel contributes to the real corner:
• the search is done separate on the line and on the
column;
• if a pixel has the Gray color we assume that it is
on the map border;
• if a pixel has a different color than Gray, Black
and White we assume that the border is missing
and that pixel is where the map starts. The next
10 (10 is a number experimentally issued) pixels
color is checked to be sure they are image
pixels.
if the distance between the default value and the founded
Figure 7. TIF Strip Organization
value is bigger than 15 pixels, than the default value is
kept.
In the above picture a “Cij” element is referred as the
color element (pixel) at the row i and column j in a
certain strip. Li is referred as the line(row) i in a strip.
3 Implementation A strip contains one or more lines of pixels. When a
The application is built around the Simple Document “Working data” covers a strip, the entire strip is loaded
Interface (SDI) specification. The purpose of this

ISSN: 1790-5109 472 ISBN: 978-960-6766-94-7


8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC’08)
Rhodes, Greece, August 20-22, 2008

from the file and then only the necessary zone is


extracted from the strip. A “Working data” zone can
cover one or more strips – all of them are read from the
file. This leads to slow performance if the TIF file has a
big width. Due to this reason, the TIF tile organization is
preferred because is much faster.

Figure 9. Screen used for set GPS characteristics

Figure 8. TIF Tile Organization

The tile number increase from left to right and from top
to bottom.
Each tile has a fixed number of rows and columns. These
parameters are established when the map is exported.
The “Cij” elements are referred as color elements
(pixels) in a tile.
A working data can cover one or more tiles. Only the
covered tiles are loaded from the file and after that only
the area of interest is kept in the main memory. The tile
organization is faster than the strip organization because
less information has to be loaded from the file at each Figure 10. Screen used for display GPS information
“Working data” update.
The next three figures represent the main screens from
application and are used for set GPS characteristics,
display GPS information and locating GPS coordinates
on TIF map.

ISSN: 1790-5109 473 ISBN: 978-960-6766-94-7


8th WSEAS International Conference on APPLIED INFORMATICS AND COMMUNICATIONS (AIC’08)
Rhodes, Greece, August 20-22, 2008

Figure 11. Locating GPS coordinates on map

4 Conclusion
In order to find the corect coordonates for a point given
by its latitude and longitude on a TIF map there where
identified three types of problems that might arrise:
- sometimes, the maps have a trapezium and have
to be brought to a rectangular form
- not always the limits of the maps is defined by
two gray pixels and this limit has to be found in
order to correctly localize the points
- as the maps are very large, having over 10 MB
ussualy and because the PDA has limited
memory, two algorithms that use the maps width
were chosen to be implemented so that if the
width won’t exceed 1024 pixels the strip
organization is choosen, else the tile
organization is used.

References:
[1] HowStuffWorks. How GPS Receivers Work.
[2] Rizos, Chris. University of New South Wales. GPS
Satellite Signals. 1999.
[3] Physics Today. Relativity and GPS. May 2002.
[4] Phrack. Issue 0x3c (60), article 13. December 28,
2002.
[5] Simplified explanation of GPS at howstuffworks.com
[6] GPS SPS Signal Specification, 2nd Edition — The
official (civilian) signal specification.
[7] University of New Brunswick, In Simple Terms,
How Does GPS Work?

ISSN: 1790-5109 474 ISBN: 978-960-6766-94-7

View publication stats

You might also like