Design and Implementation of an iPad Web Application for Indoor-Outdoor Navigation and Tracking Locations

crickettachyphagiaΚινητά – Ασύρματες Τεχνολογίες

10 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

93 εμφανίσεις













Design and Implementation of an iPad Web Application for Indoor
-
Outdoor


Navigation and Tracking Locations











Master’s Thesis, Department of Surveying

and Planning
,






School of Engineering, Aalto University







Espoo, 13 February

2012







Muhammad Usman


Bachelor of Science in Technology Computer Systems Engineering







Supervisor: Professor Kirsi
-
Kanerva

Virrantaus






Instructor: Lic.Sc. (Tech) Jussi Nikander





ii






AALTO UNIVERSITY

SCHOOL OF ENGINEERING

PO Box 11000,
FI
-
00076 AALTO

http://www.aalto.fi

ABSTRACT OF THE MASTER’S THESIS

Author: Muhammad Usman

Title: Design and Implementation of an iPad Web Application for In
door
-
Outdoor
Navigation and
Tracking Locations

School: School of Engineering

Department:
Department of Surveying

and Planning

Professorship: Cartography and Geoinformatics

Code: Maa
-
123

Supervisor: Professor Kirsi Virrantaus


Instructor(s): Lic.Sc. (Tech
.
) Jussi Nikander

The purpose of this thesis is to develop an iPad application as part of Otaniemi Open
Project. The application helps new visitors in positioning and navigating both indoor and
outdoor in Otaniemi campus of Aalto University. In addition to the main feature
s
(positioning and navigation), the application also assists users manipulating calendar’s
scheduled events spatially.

A variety of related technologies and methods have been studied to select the best suitable
ones for developing the application. The t
echnologies studied basically provide information
about comparing different positioning techniques and that how they can be

used while
considering different factors

like accuracy, precision and finances

available
.

The application’s user interface is devel
oped using the open web standards like JavaScript,
Hyper Text Markup Language (HTML) and Cascading Style Sheets (CSS). The web
frameworks used are PhoneGap, OpenLayers and Sencha Touch. The background maps
used are Bing Maps and Open Street Map, the user c
an switch between the two maps.

The indoor routing maps of the buildings are overlaid upon the respective buildings in Bing
Maps and Open Street Map. The path generated from one place to another is shown
graphically in the foreground of the application
. Th
e process of generating the indoor maps
involves much manual work but the future goal is to automate the
whole
process.


Date:
13.02.2012

Language: English

Number of pages:
53

Keywords:

Navigation, Positioning, Location Based Services, Routing, Tracking



iii














In
memory of my father Amir Muhammad

(1955
-
2009)













iv

Acknowledgements


I am very thankful to Professor Kirsi Virrantaus, whom did not only supervise my thesis
but also

supported the finances of my thesis

and provided me a work environment
.
Moreover, she guided me to a right direction in research related situations and broadened
my knowledge in the area. It has been an amazing experience for me working in a group of
peop
le (Geomatics Research Group) where diverse knowledge has always been shared,
thus I learned a lot here.


I am very grateful to Lic.Sc. (Tech.) Jussi Nikander who instructed my thesis very well
both practically and theoretically. He never refused my help e
ven when he was busy
writing his own PhD thesis and had a limited time to complete it.


I would like to thank Juha Järvi

for his invaluable support and patience throughout this
thesis. I learned a lot from his school of thoughts and his experiences in diverse topics.


I am thankful to all my colleagues
e
specially
Xabier Era
ñ
a

for being a pleasant company
throughout
and prov
iding me moral support in times I needed it.


Last but not least, I am thankful to my family for understanding me in different situations
and never stopped praying for my success.











Espoo, February 2011









Muhammad Usman




v

Table of Contents

List of Figures

................................
................................
................................
....................

vii

List of Tables

................................
................................
................................
....................

viii

Table of abbreviations and acronyms

................................
................................
...............

ix

Terminologies

................................
................................
................................
.......................

x

Chapter 1

................................
................................
................................
..............................

1

Introduction

................................
................................
................................
..........................

1

1.1

Motivation and goals

................................
................................
................................
.................

1

1.2

Thesis Contents

................................
................................
................................
...........................

5

1.3

Scope and Objectives

................................
................................
................................
.................

5

1.4

Research Questions

................................
................................
................................
...................

6

1.5

Design Overview

................................
................................
................................
.........................

7

Chapter 2

................................
................................
................................
..............................

9

Background Information

................................
................................
................................
....

9

2.1

Existing Positioning Systems

................................
................................
................................
..

9

2.2

Outdoors Location Based Services

................................
................................
.......................

9

2.2.1

GPS, A
-
GPS, GLONASS, Galileo

................................
................................
................................
......

9

2.3

Indoors Location Based Services

................................
................................
.......................

11

2.3.1

WLAN based positioning

................................
................................
................................
..............

11

2.3.2

The Cricket Location Support and Active Bat systems

................................
....................

13

2.3.3

Quick Response (QR) codes based positioning

................................
................................
...

13

2.3.4

Radio Frequency

Identification (RFID) based positioning

................................
............

14

2.4

Positioning Techniques

................................
................................
................................
.........

16

2.4.1

Triangulation

................................
................................
................................
................................
....

17

2.4.2

Time of Arrival

................................
................................
................................
................................
.

17

2.5

Tracking Spatial Location

................................
................................
................................
.....

19

2.6

Handheld devices for LBS

................................
................................
................................
.....

20

2.6.1

Apple iOS
................................
................................
................................
................................
.............

21

2.6.2

Android

................................
................................
................................
................................
................

22

2.6.3

Blackberry

................................
................................
................................
................................
..........

22

2.7

Chapter Summary

................................
................................
................................
....................

23

Chapter 3

................................
................................
................................
............................

24

Processing Spatial Information

................................
................................
........................

24

3.1

Requirements

................................
................................
................................
...........................

24

3.2

Map Generat
ion and Representation

................................
................................
...............

25

3.2.1 Map Generation Process

................................
................................
................................
...................

26

3.2.3

Datab
ase

................................
................................
................................
................................
..............

30

3.2.4

Labeling

................................
................................
................................
................................
..............

30

3.2.5

Data Presentation
................................
................................
................................
............................

30

3.2.6

Floor Plan Overlay on top of Background Map

................................
................................
...

32

3.3

Chapter Summary

................................
................................
................................
....................

34

Chapter 4

................................
................................
................................
............................

35

CombinedIndoorOutdoorNavigator

................................
................................
................

35

4.1

Design

................................
................................
................................
................................
..........

35

4.2

User Interface

................................
................................
................................
...........................

37

4.2.1

Map Screen

................................
................................
................................
................................
.........

37

4.2.2

Track my Friends

................................
................................
................................
............................

39

4.2.3

Calendar Screen

................................
................................
................................
...............................

39

Use Case 1: Locate yourself

................................
................................
................................
........................

41

Use Case 2: Find directions

................................
................................
................................
........................

41



vi

Use Case 3: Track friends

................................
................................
................................
............................

41

Use Case 4: View calendar appointments by location

................................
................................
.....

42

4.4

Algorithm

................................
................................
................................
................................
...

44

4.4.1

Route Planning

................................
................................
................................
................................
.

44

4.5

Chapter Summary

................................
................................
................................
....................

47

Chapter 5

................................
................................
................................
............................

48

Conclusions and Future Work

................................
................................
..........................

48

Bibliography

................................
................................
................................
.......................

49







vii

List of Figures


Figure 1 Accuracy vs. Precision
(Stook, 2011)

................................
................................
.

xi

Figure 2 Home Screen of the Application

................................
................................
.............

4

Figure 4
WLAN based positioning

................................
................................
......................

12

Figure 5 A user is taking a snapshot of a mounted QR code to locate his/her current
location

................................
................................
................................
.........................

14

Figure 6 Passive RFID based positioning (Ting, Kwok, Tsang and Ho, 2011)

..................

16

Figure 7 Positioning using Time o
f Arrival technique (Le, Sargas, and Webb, 2009)

.......

18

Figure 8 Route Map generation process

................................
................................
..............

27

Figure 9 Floor plan after processing with Adobe Illustrator

................................
................

28

Figure 10 Navigation Graph

................................
................................
................................

29

Figure 11 Routing map shown in JOSM

................................
................................
.............

31

Figure 12 Routing map after overlay
ing on Bing map

................................
........................

33

Figure 13 iPad 2 Home screen

................................
................................
.............................

36

Figure 14 Map Scr
een of the application

................................
................................
.............

38

Figure 15 Application's calendar screen

................................
................................
..............

40

Figure 16 A calendar event shown on the map

................................
................................
....

43

Figure 17 Path generated by the application for ind
oor navigation

................................
.....

46








viii

List of Tables


Table 1 Abbreviations and acronyms

................................
................................
...................

ix

Table 2 An overview of some common positioning technologies

................................
.......

19






ix

Table of abbreviations and
acronyms

Table
1

Abbreviations and acronyms

A
GPS

Ass
isted
Global Positioning System

AOA

Angle Of Arrival

API

Application Programming Interface

BS
T

Base Station Transmitter

CAD

Computer Aided Design

GIS

Geographical Information
System

GLONASS

Global Navigation Satellite System

GPS

Global Positioning Systems

JS

JavaScript

JOSM

Java Open Street Map

JSON

JavaScript Object Notation

LBS

Location Based Service

LOS

Line Of Sight

OS

Operating System

OSM

Open Street Map

MS

Mobile Station

QR

Quick Response

RF

Radio Frequency

RFID

Radio Frequency Identifier

RSS

Received Signal Strength

SQL

Structured Query Language

TOA

Time Of Arrival

Wi
-
Fi

Wireless Fidelity

WLAN

Wireless Local Area Network

XML

Extensible Markup
Language




x

Terminologies


Positioning vs. Localization


In (Lecture on Sensor Networks, 2011) Heanselmann has differentiated the two
terminologies the following way:


-

Positioning

means to determine global or absolute coordinates of an object.


-

Localization

means to determine relative or local coordinates of an object.


The terms defined above have been used interchangeably throughout in this thesis.



Precision vs. Accuracy


In the work of
(
Streiner and

Norman, 2005) the two terms are defined as follows:


-

“Precision

is the degree of obtaining a score on first turn repeats on a second
term”. It means how close a number of certain inputs are to one another under the
same conditions.


-

“Accuracy

is the degre
e of obtaining a score close to the actual score.”



The two terms are also differentiated explicitly in Figure 1, where the big red point shows
the actual location of an object and the small brown points show the
Global Navigation
Satellite System (
GPS)
values. The four scenarios in this case represent very well the
relation between accuracy and precision
.



xi


Figure
1

Accuracy vs. Precision (Stook, 2011)



1


Chapter 1



Introduction


1.1

Motivation and goals


Technology and research based on
Location Based Services (
LBSs
) (Wang, Min and Yo,
2008)

have

been in full swing

for the l
ast few years. Smart
phones
,

nowadays
,

are capable of
providing location
-
based information on the fly by using a variety of sensor techniques like
GPS, Wi
-
Fi, and Bluetooth

(Xiang, Song, Chen and Wang, 2004,

Weyn, Maarten, Sxhrooyen
and Frederick, 2008, Ahamed, 2008). In addit
ion
, they also have their own
built
-
in
embedded
sensors

such

as accelerometer and compass, which can be used

for navigation purposes.
Built
-
in cell phone

cameras on the other hand can be used for positioning

using different
techniques, for example, taking
photos of mounted bar codes (Ruppel and Gschwandtner,
2009)
.



Presently, services like Google maps for smart phones are playing a vital role in LBS.

O
ther
LBSs services like Google Latitude are also quite widespread for tracking friends
’ spatial
location

remotely.

Services like
Google ma
ps and Google Latitude
are developed to help
users in outdoor LBSs using GPS.


During the past few years more advancements have been
achieved

in outdoor LBS than in
indoor. Indoor LBSs are now becoming as popular as outdoor LBSs because people often
loose directions inside unfamiliar and large buildings. Indoor
spatial
location information can
be used

to cope with

emergency situations like eart
hquakes
,

fire fighting and certain othe
r
rescue operations. This is the reason, that

indoor location information should be more
accurate

and up to date. Besides this, a highly

sophisticated

and error
-
free

infrastructure is
needed

to establish indoor LBS
.


GPS does not work inside buildings

directly

because GPS signals do not penetrate through
roofs and walls. Even in dense areas GPS provides its services with low accuracy due to
interference and
Line Of Sight (
LOS
) problems (Stook, 2011)
.
Indoor LBSs are
not
dependent on GPS and these services are provided through a variety of techniques. The
infrastructure for indoor LBSs varies
from
building to

building. On the basis of
factors like
accuracy, implementation cost and reliability, an infrastructure for
indo
or LBSs is established
depending upon the user requirements (Miu, 2002, Xiang, Song, Chen and Wang, 2004, Le,
Sargas and Webb, 2009, Weyn, Maarten, Sxhrooyen and Frederick, 2008). Based on these



2

factors
,

one of the
or even a combination of the
existin
g sensor technologies is used for
indoor LBSs.


T
o be out of curiosity, people

often

want to locate their friends remotely and track their
movement from place to place.
Mobile phones nowadays include

these kind
s

of features
that

allow them

to

see their fr
iends’ geographical location

remotely
. Such

application
s can be
useful for

schools, military

purposes,
tourism

and rescue operations
.


People schedule appointments

in th
eir daily routines and save those

in their personal calendar
for a reminder.
A

schedul
ed event
often
contains
information about the

day
, venue

and time.
The venue
or location information is of m
ore interest in here
. The location information
entered in to the calend
ar can be seen as spatial graphics

in the application
. This feature helps
use
r because just by looking at the map, the user gets to know about the upcoming
appointments he/she has. The user can see the exact place where an appointment is
scheduled, and thus the user does not have to search for a place in a separate map.


The motiv
ation of this thesis is 1) to study the existing sensor techniques
for positioning and
to choose

one for this prototype, which is more accurate and less
-
expensive, 2) the precise
indoor navigation and 3) to see how visually better the spatial data is prese
nted temporally on
a mobile map.


The goal of this thesis is to design and implement a prototype smart phone application that is
capable of indoor and outdoor LBSs called CombinedIndoorOutdoorNavigator for Otaniemi
Campus of Aalto University as part of Ota
niemi Open project.
The prototype is developed
using the combined effort of three web developers in total. The introduction and referral to
each work is as follows:


1)

Muhammad Usman

Master degree student Aalto University

The role was to study and compare th
e background technologies and to choose the
best suitable technologies for this project. The other role was to develop the user
interface for the application

and implement a few features like searching a building by
its name and positioning
.


2)

Juha Järvi

M
aster degree student Aalto University

The role in the project was to produce the indoor

navigation

map for
navigation and
overlay it on the background map used
.


3)

Mingfing yu

Master degree student Aalto University

The role in the project was to develop the
calendar and synchronize it with the
background
map of the application.





3

The developed application is considered to be useful for peopl
e who are unaware of the
geography

of Otaniemi. The new Aalto University which was found in January 2011
,

is a
merge of three different other universities. This will bring an increasing amount of new
visitors and more students to Otaniemi Campus of Aalto University.


The architecture and the master plans of Otaniemi are complicated to navigate for new
comers. Moreover, the street addresses of different buildings do not help in guiding new
visitors.
The application contains features like, indoor positioning and navigat
ion, tracking
friends’ location in real time and observing the application’s calendar data spatially on top of
the background map used
. The OSM

(OpenStreetMap community, 2011) and Bing Map

are
used as

base map
s

in the application because
both the services
provide

more
detailed
information about the test

area of the application

and has also primitive support for indoor
LBSs (Indoor Mapping, 2011)
.


The development platform used for

this prototype is iOS but can

also be extended to Android
and Blackberry

in
future
.

Figure 2 shows the main screen of the application, wh
ich has Bing
Maps

as the base map with certain other layers on top of it and has initial view of Otanie
mi
that is the test area of the

thesis.



T
he initial focus of the prototype

is to include
only the most common buildings in Otaniemi
campus

of Aalto University
. Later on, the aim

is to expand it further to cover the whole
Otaniemi campus.





4


Figure
2

Home Screen of the Application








5

1.2

Thesis Contents


The chapter
-
wise structure of the rest of the thesis is described here.
Chapter 2

discusses the
related technologies to this prototype
.
Chapter 3 explains the

techniques and methods used
for making the routing maps and the overlay

process of these

routing

maps on top of the
background map
. Ch
apter 4
contains

information about

the uses cases
, the user
-
interface

and
the implementation of the application. Chapter 5 concludes this thesis and also discusses the
limitations and the problems faced in this applicat
ion. This chapter also explains briefly the
future goals of this project.



1.3

Scope and

Objectives


The research done here describes the potential technologies in the field of location
-
based
services. One of the main objectives of this

research is
to
select and apply the appropriate
technologies for CombinedIndoorOutdoorNavigator. The selected technologies are evaluated
in terms of deployment cost, accuracy, performance and usability. The area of outdoor LBSs
has already been

much

researched and

is

sti
ll under re
search (Salimin and Hosio, 2006,
Ahamed, 2008)
. GPS has revolutionized the world with its amazing services for outdoor
positioning and navigation. During the recent past, people also tend to get interested in
applications for indoor navigation a
nd positioning. One reason is the size and complexity of
the buildings.


T
here is an enormous difference between the indoor navigation
-
positioning systems and
outdoor n
avigation
-
positioning system (Miu, 2002)
. For example, positioning in indoor
environme
nts can be d
one using several technologies (Xiang, Song, Chen and Wang, 2004
,

Weyn, Maarten, Sxhrooyen and Frederick, 2008)
, which are different from the positioning
technologies used in GPS or other outdoor positioning systems

(Salminen and Hosio, 2006)
.
Not only the positioning techniques cause the difference between indoor and outdoor LBSs
but navigation

techniques

as well. For instance, there is always a predefined infrastructure of
roads where vehicles can navigate and they have to use only those lines
, but in indoor
environments people can move freely which means that completely different techniques
could be used for routing in the two environments

(Miu, 2002)
. The other difference is the
availability of data for the two environments. Data for roads ne
twork of a certain region
could be accessed using different online or offline sources but get
ting the architectural plans
of particular buildings (private and public) have its own conditions of availability and are

not
available publically. The

level of

a
ccuracy and precision

for outdoor positioning is different
than the indoor positioning
.

Positioning objects indoors should be more accurate than the
objects located outside.

The positioning accuracy
within
5
-
8 meters

range

is

usually

all right
for user in
open environments

but
is insufficient for those who are indoors.




6

This prototype is developed on the basis of three main objectives.
The first objective of this
thesis is to study different indoor positioning techniques and compare them, in order to find
t
he mos
t suitable one for this prototype
. The criterion of suitability is evaluated in terms of
accuracy and the cost for installing the infrastructure. The second objective is to synchronize
the application’s calendar data with the application’s map. The t
hird objective is to program a
routing algorithm that guides users from their origin/current location to a destination they are
interested in. The last objective of this prototype is the capability of tracking people locations
in real time. This feature is

implemented by k
eeping the privacy issue in notice
. Both the
parties, the trackers and the people to be tracked, should agree beforehand on certain privacy
terms.



The scope of this prototype is limited to the QR codes positioning technology, showing
cal
endar’s data spatially and its services for

indoor navigation
. Anything beyond these will
not be di
scussed here such as the
deployment

and distribution plans
,

privacy issues and
commercialization of the application.




1.4

Research Questions


On the basis

o
f the contents described
in the previous sections of this chapter
,

three research
questions have been derived to answer in this thesis.


The first research question is
to see the possibility of developi
ng an application for an iPad
,
which uses only QR co
des technology for positioning users inside buildings
. Furthermore the
primary research question above is subdivided secondary parts, they look like this:


-

Why is it chosen

-

How does a QR code work for indoor positioning

-

How feasible they are from users’ pe
rspective

-

What are the limitations


The second research question is
how to represent calendar data/e
vents spatially

on top of a

background

map.

In
Geographical Information System

(
GIS
)

perspective
, it me
ans to
represent calendar’s events

on the their respective geographical locations

in

a map
. In our
system we had represented the calendar events on OSM keeping the user interface in mind.
This thesis argues on how to represent the temporal data spatially in terms of selecting
markers, colo
rs and how do the users interact with them.


The third research question is
to evaluate different methodologies for tracking people
s’
locations feature in a mobile phone based on a certain privacy agreement between the

trackers and the person who is
to be tracked.



7

1.5

Design Overview


CombinedIndoorO
utdoorNavigator is an

application

that runs on an iPad

and is capable of
being used for navigation and positioning purposes in indoor as well as outdoor environments

of Otaniemi, Finland
. The secondary
features are tracking friends’ locations in real time and
showing the locations of the calendar events on the map as markers inside the application.
For indoor n
avigation and positioning
,

the architectural plans of the buildings

in Otaniemi

provided by

the

Aalto University administration have been used as the negation maps. The
machine
-
readable routing maps are generated from these architectural plans and are overlaid
in their respective locations on top of the background map. The routing maps generated ar
e
used to render

the route
information that is provided to the application by a user
. The
generated route for a user is shown as graphical lines on the top of the
routing
map. The
application uses OSM

and Bing maps as
base map
s
.


The floor plans are overl
aid with high care so that to perfectly align the buildings

without any
errors

on the background map.
The reason is to keep high precision and accuracy both for
indoor and outdoor navigation and posit
ioning. The plans obtained
were preprocessed in
several
steps so that the
y can

be efficiently and p
recisely used for navigation
, rendering and
presentation.
The first step was to convert those into a better machine
-
readable format from

the original
Computer Aided Design

(CAD)

format
, the second step was to prod
uce

a
two
-
dimensional
graph

from each floor
plan

for routing algorithm implementation.
The
third

step
was to make a data structure for the extracted spatial information from the plans

and store it
in a database
. Figure
3

shows the different building blocks of the prototype and how a
re they
connected to each other.


This thesis contributed to provide a working L
BSs application for an iPad that can be used
in
Otaniemi Campus of Aalto University. This application behaves eq
ually and accordingly to
the quality of spat
ial information provided by the user
.








8




Floor Plan
s

Routing Graph

Routing Algorithm



CombinedIndoorOutdoorNavigator


Aalto University


Positioning
Technologies

GPS and
Positioning
Sensors


Calendar Application


Background maps

Figure
3

The block diagram describes the development process of the application in the
form of different blocks and also shows their interconnectivity




9


Chapter 2



Background Information


2.1

Existing Positioning Systems


Several location
-
based systems have been introduced in the last two decades

(Miu, 2002,
Xiang, Song, Chen and Wang, 2004, Maps Everywhere, 2011, Salminen and Hosio, 2006,
Weyn, Maarten S
chrooyen and Frederick, 2008, Lau, Patil, Ni and Liu, 2004)
. The existing
positioning systems are sub
-
divided into two categories: 1) Outdoor LBSs 2) Indoor LBSs.
As stated earlier, GPS signals cannot be received indoors, thus a different positioning syste
m
is required for indoor LBS.


The technologies used in outdoor LBSs and indoor LBSs are discussed respectively in the
upcoming sections.



2.2

Outdoors Location Based Services


2.2.1

GPS, A
-
GPS, GLONASS, Galileo


GPS

(How Does GP
S Work, 2011, Assisted
GPS, A
-
GPS, 2011)

is the prime revolution in
LBS. It was created by the US Department of Defense (DoD). GPS is the largest service for
navigation and pos
itioning in the world.
GPS is comprised of 27 earth
-
orbiting satellites in its
constellation (24 in ope
ration and 3 for backing up in failure cases), placed in four orbital
planes around earth

(How GPS Receivers Work, 2011)
. GPS has been under development
since 70’s and became fully operational in 1994. GPS receivers are commonly deployed in a
variety of handheld devices including smart phones. The GPS satellites located in the earth
orbit continuously transmit coded radio b
eacons. The GPS receivers receive these signals and
use a time
-
based approach to locate themselves. A single GPS receiver is capable of
receiving signals from multiple GPS transmitters. The more the transmitters there are the
more accurate the resultant po
sitioning is. For successful positioning, signals from at least
three satellites are required. GPS succeeds in an accurate positioning from 6
-
7 meters, when


1
0

the GPS signals do not face any interference during transmission. GPS can’t be used for
indoor LBSs

because the roof and walls of the building block the GPS signals. Some methods
have been introduced to overcome the interference problems by using an extra infrastructure
like
pseudo lite

technology

(Wang, 2002, Ning, Kao, Chang and Meng, 2004)
.
An exampl
e
of positioning done using GPS signals is shown in Figure 4
.


Assisted
-
GPS (
A
-
GPS
) (A
-
GPS explained in historical context, 2011,

How Does GP
S Work,
2011,

Assisted GPS, A
-
GPS, 2011,Assisted GPS and location
-
based services, 2011)

is an
enhanced GPS system w
ith more precise navigation and accurate positioning capabili
ties.
Nowadays most of the GPS

enabled smart phones employ the A
-
GPS technology. A remote
GPS location server performs most of the positioning tasks before hands for a full GPS client,
thus

savi
ng some extra time
.
This remote server computes the position of the AGPS enabled
device with minimal time. With A
-
GPS enabled
,

the cell
-
phone does not have to search for

the visible satellites

during positioning unlike normal GPS enabled phones

(Zandbergen
,
2009)
.

In fact, they find the GPS satellites spontaneously using the existing cellular
networks, for example GSM (Djuknic and Richton, 2001). Many newly introduced smart
phones/devices such as iPad 2 (the third generation model) supports A
-
GPS, which al
lows
locating its current position using GPS or relative nearby base stations transmitters.


Normally the remote servers are installed at high altitudes, for example rooftops that hel
p
getting
a direct LOS with no or very less interference. This base
station also helps in indoor
navigation in the building where it is installed because of the strong

Received Signal Strength

(
RSS
)
. A signal amplifier would be needed which boosts the signal into the building for
positioning. This technique can work better

in the immediate floor to the rooftop then the
floors in the bottom of the building. It is also useful in urban areas, when the user has to be
located under heavy tree covers, or even in indoor environments

(A
-
GPS, 2011).


The Russian Federation
Global N
avigation Satellite System
(
GLONASS
)

was introduced in
the late 1970s for military purposes only. Later on, in 2007 the restriction of using
GLONASS by civilians was taken away and people started using it for navigation and
positioning. The idea to build G
LONASS was also to counter GPS. GLONASS is run and
maintained by Russia’s Ministry of Defense. GLONASS contains 24 satellites placed in 3
orbital planes. GLONASS has always been facing financial crisis until mid 2000s. But since
2007 GLONASS was added in
the list of top prioritized projects by the Russian government.
More funds were provided to the project and hence more satellites were launched in 2010
(Russia Places 3 More Satellites in Orbit, 2011)

and thus started fully functioning earlier in
2011 cove
ring the whole world.


Galileo is a counterpart to US GPS and Russian GLONASS positioning system for Europe. It
was initiated by European Union in coordination with European Space Agency (ESA) in the
mid 2000s. This system is still in development stages an
d is not yet operational. According
to the plan, it should start partially operating by 2014. Galileo positioning system consists of
27 operational satellites and 3 test bed satellites placed in three circul
ar Medium Earth Orbit
(MEO) (What is Galileo, 20
11)
. The first two operational Galileo satellites were recently


11

launched and the next t
wo will be launched in 2012 (They Are Up! EU Launches Galileo
IOV Satellites, 2011)
. Galileo will provide highly accurate (1
-
3meters) global positioning and
navigation s
ervices compared to GPS and GLONASS. Compatibility and interoperability
with other positioning systems will maximize availability, usability and accuracy for the
users even in less
-
favorable satellite signal areas.



2.3

Indoors Location Based Services


M
any research and innovations have been done in LBSs since the last decade. Yet there is a
gap between outdoors navigation services based on satellites and indoors navigation systems
based on
Wireless Local Area Network (
WLAN
)
, UWB or cell
-
phones networks

(
Weyn,
Maarten, Schrooyen and Frederick, 2008)
. The problem is as discussed in previous
subsection that satellite signals do not penetrate through a hard medium like a wall or a roof
and hence cannot be used for indoor LBS. It is obligatory to establish a d
edicated
infrastructure in a building that is to be used for navigation and positioning.



2.3.1

WLAN based positioning


WLAN is one option that can be used for indoor positioning. WLAN needs no new
infrastructure, as these networks are available in
almost all the public buildings nowadays.
Similarly, Wi
-
Fi is als
o available in every smart device now
,

which means there is no need to
install any

extra hardw
are at the receiver side as
. Positioning based on WLAN uses the RSS
from the Wi
-
Fi access point f
or locating an object in the vicinity. The signals received from
the Wi
-
Fi access point by a cell phone are stored in a database in the form of a vector series.
The positioning system estimates the position of a receiver based on the signal strength of the

vector. The higher the signal strength the more accurate the position estimate is. Wi
-
Fi can
also be used in combination with other sensing technologies to produce more accurate
and
continuous
positioning results
(Real
-
Time Location System (RTLS, 2011)
.




12


Figure
4

WLAN based positioning



Certain factors like multipath propagation and interference affect identifying accurate
location of an object when using WLAN based positioning system. The problem is the high
variance in the distribution of data that happens when the receive moves and als
o the
temperature of
the environment (Pan, Zheng, Yang and Hu, 2008)
.



13

2.3.2

The Cricket Location Support and Active Bat systems



The Cricket Location Support System uses a combined form of ultrasonic and RF for
locating mobile users inside the building

(
Priyantha, Chakraborty and Balakrishnan, 2000)
.
The Cricket system is based on trilateration to locate users remotely, which measures
distances between the receiver and the transmitter for calculating the user’s location. This
system promises high accuracy
, robustness for both static and mobile users. The beacons
transmitters should be mounted on walls and ceilings with proper alignment to reduce
interference with other radio beacons

(Priyantha, Chakraborty, Balakrishnan and 2000)
.


A system known as Activ
e Bat S
ystem (The Bat Ultrasonic Location System, 2011)

also uses
ultrasonic signals for locating objects inside buildings. The Active Bat system works in a
similar fashion as the Cricket system. A transmitter is attached to a user (a Bat) to be
positioned
, which transmits short ultrasonic pulses periodically to a number of receivers
mounted in different parts of the building. The travel time of the signal received is calculated,
which is then multiplied with the speed of sound to calculate the distance bet
ween the Bat
and each receiver in a closed space. The distances calculated are then used to position the
Bat using the principle of
trilateration
.


The advantage of using the Bat system for localization is that it can cover very large
buildings having man
y remote objects to localize
(The Bat Ultrasonic Location System,
2011).

The other advantage is the high accuracy; this system is capable of locating Bats down
to 9cm of their true position for 95
percent of the measurements (Lau, Patil, Ni and Liu,
2004)
.


The disadvantage of this system is the high cost and complexity. The maintenance of the
system is also an issue because a small fault in the system can bring the whole system down.
It can also affect the positioning accuracy of a certain Bat. There is a
lso a probability of
losing the tags (transmitters) and the lost tags can be misused and the results may

lead to
wrong assumptions (Want, Hooper, Falcao and Gibbons, 1992)
.



2.3.3

Quick Response (QR) codes based positioning


There should be something off
the shelf component that the users do not have to carry all the
time unlikely tags. For example, a mobile phone camera is a component already embedded in
smart phones. The mobile phone camera can be used for localization by taking photos of
mounted bar cod
es in a

building, such as QR codes (About QRCode, 2011)
. With the help of
the information retrieved from a QR code, a LBS application can locate a user. The QR
codes can easily be mounted in different parts of a building. The QR codes deployment cost
is
quite low, hence a large area can be covered with them. The replacement of damaged QR


14

codes is also quite convenient and inexpensive
(Top 10 QR Code Tech Support Questions,
2011)
.


As described

in (Mulloni, Wagner and Schmalstieg, 2009)
, using QR codes is

a good choice
for LBS in indoors due to its fast readability. The user takes a picture of a mounted QR code
whenever he or she wants to locate his/her current position

in the building (Ruppel and
Gschwandtner, 2009) as can be seen in figure 5
. Unlikely WL
AN, Cricket or Active Bat
system, the surrounding environment does not affect the positioning accuracy using QR
codes. The QR codes can also be used in parallel with other technologies to continuously
locate a user, for example, smart phones’ sensors. QR c
odes are also compatible with many
open source application development libraries, which is an advantage to the application
developers

(iphone
-
qrcode, 2011)
.



Figure
5

A user is taking a snapshot of a mounted QR code to locate his/her current location

The downside of using this system for localization is its low usability. The user has to hold
the camera quite close to the QR code for a better LOS

(Ting, Kwok, Tsang, Ho

and 2011)
.
Similarly, the user has to take pictures until the software has identified the bar code.



2.3.4

Radio Frequency Identification (RFID) based positioning


RFID based location
-
information service includes proprietary RFID scanners mounted
throughout the building. These scanners scan the RFID
tags when in range and an exchange


15

of information occur

between the sending and receiving tags. This technology has app
lica
tion
in diverse fields and

can also be used for LBSs. An RFID scanner uses radio signals for
locating a person wearing an RFID tag from a certain distance. The main advantage of using
RFID for LBS is that it requires neither a direct contact nor a dire
ct line of sight with the
positioning objects (Ting, Kwok, Tsang, Ho and 2011)
. Another advantage is low installation
cost when covering small areas. For larger areas, the deployment cost rises up or when
replacing the equipment. In addition, RFID are mor
e efficient compared to bar codes, the
tests have proven that the RFID tags can even be read in less than 100 milliseconds
(Lau,
Patil, Ni and Liu, 2004)
.


For localization, RFID system works in a similar fashion as Cricket and Bat systems,
meaning that th
e objects to be positioned should always carry RFID tags and a scanner is
needed to scan the tag. Unlike, Bat and Cricket Systems this technology uses radio signals for
communication. A server that receives the scanned signals from the scanner uses positio
ning
techniques like trilateration; location fingerprinting or triangulation to positio
n the RFID
tagged objects (Ting, Kwok, Tsang and Ho, 2011)
, as shown in figure 6
.
These techniques
are discussed in more detail in the upcoming sections of the chapter.


There are two types of RFID tags: Active and Passive RFID tags. The active RFID tags have
their own battery and are used for running the circuitry and

transmission,
passive tags do no
have their own battery but they use the power drawn from

the reader whe
n being scanned

(What’s the difference between passive and active tags, 2011)
. Active RFID has a longer
transmission range, is bigger in size and more expensive than passive RFID. Before using
any kind of tag for positioning, it should be tested for, its t
ransmission range capability and
its attenuation properties in different environments.





16


Figure
6

Passive RFID based positioning (Ting, Kwok, Tsang and Ho, 2011)



2.4

Positioning Techniques


In indoor LBSs, locating objects
accurately is very important; the more accurate is the
positioning the more precise will be the routing directions. In this section multiple
positioning techniques are described. The factors that should be considered when deciding
the techniques used for p
ositioning are accuracy, inter
-
operability and efficiency. The status
of the users in general is also important that either the users are dynamic or static.
Techniques suitable for static users differ when used for moving users. The positioning can
eithe
r be done continuously or discretely. Continuous positioning is done when the
transmitter and the receiver communicates continuously just like GPS.

Continuous
positioning is done mostly in outdoor LBSs but rarely
in indoor environments. Discrete
positioni
ng is done when the user’s device determines its location either by transmitting
signals or using some other positioning techniques

(Le, Sargas and Webb, 2009)
.





17

2.4.1

Triangulation


Triangulation has a long history and scientists have been using it for s
everal centuries in
surveying as well as in hydrography. The concept of triangulation is to find the unknown
location of a point with the help of certain known points. For example, let’s take a case of
three points where two points are known and the third
is not. The distance between the
known points is also known, and the angles made from each known point to unknown points
are measured. Putting all those known values into a mathematical equation results the
location of the third unknown point.


On the other hand trilateration (principle of triangulation) uses the distances among
transmitters and receivers for localization rather than angles as in triangulation. Most satellite
based location services, such as GPS, use trilateration for positioning
. For example, the
transceiver held by a person communicates with the satellites. The radio signals received by
the device are recorded along with the time it was sent from the satellite. The distance
between satellites and device is calculated by the form
ula: d=V*t. When the distance of a
transceiver is determined from all the three satellites then the GPS software can easily locate
the transceiver’s latitude and longitude using trilateration principle.



2.4.2

Time of Arrival


Time of Arrival (
TOA
)

is the travel time calculated between a transmitter and a receiver. It
can be used to find out the distance between the transmitter and the receiver. The speed of
radio waves is already known as they travel at the speed of light so it is easy to calculate

the
distance. This technique is mostly used for estimating the location of an object in outdoor
environments. There should be at least three Base Station Transmitters to localize a particular
Mobile Station as shown in figure
7
below.




18






Figure
7

Positioning using Time of Arrival technique (Le, Sargas, and Webb, 2009)



When all the distances from all the
Base Station Transmitters (
BSTs
)

to the
Mobile Station
(
MS
)

are known then the position of the MS can be found by using the trilateration technique,
and to execute trilateration for positioning, the distances of all the three BST
s should be
determined first (
Le, Sargas and Webb, 2009
)
.


The summary of available po
tential technologies along
-
with their respective technique is
given in table 2.









19

Table
2

An overview of some common positioning technologies

Technology

Range

Accuracy

Comments

Technique

WLAN

Approx. 35m

1
-
6m

+Low cost

+Cover

large
areas

-
Multipath fading

-
Less secure

-
Less accurate


Trilateration

Signal
Strength

Cricket

And

Active Bat

Environment
dependent

4cm
-
1m

+High accuracy

-
High deployment
cost

-
Multipath and
sensitive to
objects

-
LOS


Trilateration

QR codes

Distance
proportional to
the size of QR
code

4cm
-
2.5feet

+Easy and cheap

+No need to
carry tags with
object

-
Much manual
work

Direct

RFID

Active:

more or
less 10m

Passive:

2
-
4m

Active:

5
-
7m

Passive:

10
-
30cm

+High speed

+Large areas

-
Carrying extra
tags with
objects

-
LOS

Trilateration

Signal
Strength





2.5

Tracking Spatial Location


Location
-
determination applications are one of the most widely used applications for
handheld devices and smart phones. These applications assist users in services based on
spatial location of people, point of interests and certain other things l
ike vehicles, devices,
and many other
resources
(Cell Phone tracking is Easy (and Legal) with AT & T FamilyMap,
2011, How Do I Find a Friend on an AT & T Cell Phone, 2011, Memory
-
Map
Remote
Tracking, 2011). Most of the latest smart phones are now equipped natively with tracking


20

possibilities. The primary purpose of this feature is to track the lost or stolen devices, for
example iOS based devices (How to locate your iPad if it’s lost o
r stolen, 2011).


Tracking can be done both in indoor and outdoor environments. Tracking inside buildings is
comparatively harder than the outdoor environments and the problems are the same as
discussed in the previous section, for example low or no
-
signa
ls reception inside buildings.
Hence to establish an indoor tracking system either a complete new infrastructure should be
installed or an addition to the existing infrastructure should be done. Technologies and
techniques used for positioning purposes are

more or less the same for also tracking. In
(Zaruba, Huber, Kamangar and Chlamtac, 2006), RSS Indication from the Wi
-
Fi access
points inside the building has been used for tracking Wi
-
Fi enabled mobile users in the
vicinity. The non
-
Wi
-
Fi based devices c
an also be tracked indoors through an integrated
system of active RFID tags and Wi
-
Fi access points (Location Tracking using Wi
-
Fi based
RFID Tags, 2011, Asset Tracking Mobile Solution (active RFID tags with wireless reader),
2011).


RFID based track
ing
system has also been used

(Ali, Aloul, Aji, Zarouni and Fakhro, 2008)
for tracking people in open/outdoor environments. The target users in
the research done by
Ali, Aloul
, Aji, Zarouni and Fakhro (2008)

are the parents ke
eping track of their kids at a
cer
tain

park in Dubai. The kids have to wear the RFID tags (transmitters) during their stay at
the park. These tags are always in communication with the wireless RFID readers (receivers)
installed throughout the park. These RFID readers retrieve location info
rmation periodically
from the transmitters tags and report it to the master station.


In this prototype the focus is on tracking pedestrians locations remotely from the mobile
device. The test area for tracking locations is outdoor Otaniemi, tracking indo
ors is beyond
the scope of this thesis. The implementation is done using GPS signals and hence its must for
both the parties to have GPS enabled devices. Presently a number of GPS tracking devices
are available commercially that can be fixed to anything fo
r tracking (GPS Tracking Devices,
2011).



2.6

Handheld devices for LBS



Different platforms like iOS,

Android and Blackberry were studied and evaluated to select
the best suitable development platform of this prototype. The platform was selected on the
basis of certain factors, for example, diversity, security, interoperability, easy in learning etc.






21

2.6.1

Apple iOS


Apple iOS is Apple’s operating system for its

smart handheld devices;
iPhone, iPad and iPod
touch

(Applie iOS, 2011)
. Apple does not provide rights to install its operating system on
a
third
-
party hardware. The sophisticated applications
provided by the Apple incorporation for
iOS have made it one of the most

successful companies

in the world.

The user interface in
iOS is operated using touchscreens. The advantage of using Apple iOS is that an application
developed for any Apple handheld d
evice such as iPhone
is also interoperable

on the other
two

devices

(iPad and iPad Touch).


For this prototype iPad 2 was selected as the development platform. It provides good services

for LBS
, as it contains multiple sensors, which are capable of LBSs us
ing a variety of options
like Wi
-
Fi, cellular network, GPS or accelerometer. iPad also facilitate users with better
readability, quality graphics, high and fast computational power. The native support for multi
touch when interacting with maps
,

makes it a
good choice for users to be used for LBSs.


The other reason was the wide variety of open source libraries for development, for example
PhoneGap

(PhoneGap, 2011)
, which brought a change

in
applications

development

for iOS

and it is not compulsory anymore t
o use the Objective
-
C for the native development
.
PhoneGap is not just a library of JavaScript

Application Programming Interface (API)

but
provides a bridge between the applications developed and then uploading it to App store. The
PhoneGap a
lso provides t
he interoperability of

an application developed on one platform

such as iOS with other platforms such as Android or Blackberry. Hence
, making it easier for
a developer to publish the application on different platforms.



A comparison has been done in betwe
en developing web applications and native applications
for iPad in (Designing Web Apps for the iPad, 2011) and is summarized here.


Native iPad Apps



Native Apps are faster:
uses more of the i
Pad’s resources and functionalities
.



No need to search the web:

one
-
stop shopping on the App Store.



Users feel more comfortable:

They know the app was made specifically for their
device, not adapted using HTML5/CSS3.



Easier to turn on and off:

Apps are made to turn on/off without interruption or loss
of data.



More
difficult to develop:

requires knowledge of Objective
-
C and use of

Apple
SDK.



Closed Platform:

difficult to adapt for other devices like the Android platform.



22

iPad Web Apps



Emerging coding standards:

HTML5, CSS3, JavaScript are bringing incredible
client
-
s
ide functionality to the web; especially with local/offline storage.



Tailor the site for any browser:

switch between style sheets or redirect pages
depending on which device or browser your user is operating. It is possible to make
your app universal.



Easy

to develop:

Use HTML, CSS and JavaScript to create iPad web apps instead of
learning new languages. These are skills you already have.



Apple Inc. cannot censor web app:

The web is an open platform


meaning that
you

are in control. No waiting to get appro
ved by the App Store.



Small market, not enough support:

web apps need strength in numbers, which
means not only attracting users but developers as well.


2.6.2

Android


Android

(What is Android, 2012)

is an operating system developed by Google for smart
phones and is currently the most popular operating system in in the world. Most applications
developed for Android are free, unlike most iOS applications. A large number of developers
develop applicatio
ns for Android because the source model for Android is free and open
(Android, 2011)
. The applications for Android are coded in Java using Android Software
Development Kit.
Based on the standardized Java programming language, Android is also
portable with
different other platforms.
There are also other development environments

for
developing Android applications

like, Native Development Kit and Google App Inventor.


The Android mobile platform is Linux based and the advantage of using this operating
system

is that it can used on different other platforms.




2.6.3

Blackberry


Blackberry is an operating system for smartphones and has so far a very limited amount of
users compared to iOS and Android. Canadian telecommunication and wireless device
company know
n as Research in Motion has developed it. As the Blackberry OS is well
known for its native support for corporate emails but its wide touch screen and the friendly
user interface would also prove it a good choice for navigation and positioning purposes.






23

2
.7

Chapter Summary


This prototype uses QR codes for localization purposes because they are cost effective, easy
to implement and
relatively more
accurate. The QR codes are mounted at every door of the
building and when the user wants to locate him/herse
lf, take a picture of the code. The
application processes the information from the scanned photo and renders it on the map.


A number of tests have been done to evaluate the QR codes based positioning technique. The
results from the test showed that QR co
des based positioning produces position estimates that
are accurate to within 50
cm

and100% of the time.





24

Chapter 3



Processing Spatial Information


Spatial information is primarily needed for developing any
location
-
based web

application.
The more accurate the information provided, the more accurate the results produced by the
application will be. The spatial information is used in the process of generating map for
indoor navigation and positioning.


To develop

this prototype,

the designated personnel provided the spatial information of all
the buildings of Aalto University in the form of architectural plans. The plans received were
originally in CAD f
ormat but were changed into a better machine
-
readable format
. The plans
conta
in all the necessary information about walkways, rooms, stairways, elevators doors and
their textual labels.


To navigate users inside a building, the application uses the spatial information of the
building. The information is rendered on the map showing

the current position and computed
path for the user in graphical style. The spatial information is also used when the user wants
to the see the scheduled appointments location
-
wise.



3
.1

Requirements


The main challenge in building a smart p
hone applic
ation for indoor LBS

is the process of
generating spatial information and finding a suitable data structure to represent this
information.

Generating spatial information means to have an accurate and updated map of a
building where a user wants to navigate

in. Passing through a chain of different processes
produces such
spatial

information in the form of a
map, which

in this case is called a routing
map

as shown in figure 12
.



The process requires both manual and automated efforts. The manual work ta
kes
time and
increases the budget

cost of the application for example adding points and lines for

generating 2
-
D graph that is needed when applying the routing algorithm as shown in figure
10
. The automatic work can be done b
y programming small scripts

for doi
ng certain tasks,
for

example labeling the
point features in the inside each room
. Instead, there should be

an


25

automated approach that
convert
s

the original CAD drawings of architectural floor plans
composed of segments, vertices and text

labels into a rou
ting

map that annotate the structural
features such as walkways, walls, el
evators and stairways. This
kind of automated process is
beyond the scope of this thesis

and thus is not discussed
here.


A
routing

map for navigation and other location
-
aware appli
cations should be capable of
providing information to enable the following operations:


1.

Locate the user and compute the shortest path between the origin and destination
point.

2.

Render users scheduled appointments location
-
wise

(see figure 16 in chapter 4
)
.


To fulfill the first requirement in the process is to represent the network of accessible paths in
the form of two
-
dimensional graph. The graph is composed of nodes connected

through
edges. The nodes in the graph represent waypoints while edge represents
a path segment
between two waypoints. Each waypoint in the application is annotated with a coordinate.


The spatial information map produced out of the graph should be capable of computing and
showing graphically a shortest path for the user from origin
to destination

(see figure 17 in
chapter 4)
. The algorithm used for computing the shortest path is discussed in Chapter 4.


To indicate the users current position, the application uses the information extracted from the
QR code of which the user took a pi
cture. The information is composed of spatial and textual
information. This information is rendered on the map of the application show
ing the current
spatial location

of the user. On the other hand, if the user tries to locate another person’s
current pos
ition then the application uses GPS signals for positioning. The condition in this
case is that the person who is to be located must be in outdoor environment where GPS
signals are accessible.


The second operation is executed based on the coordinates of
the places. The coordinates of
all the possible places are stored in the application’s database. The coordinate system of the
places must be similar to OSM so that the application renders the exact place for the user.



3.2

Map Generation and
Representation


As mentioned in the previous section that the
routing
maps

generation process for indoor
navigation in this prototype involves both manual and
automated work. When the routing
map is ready,

it is overlaid in its exact locatio
n with a proper

alignment on the background
map

for
final
representation.




26

The
routing
map generation process and representation are both discussed respectively in the
upcoming sections of the chapter.



3.2.
1 Map Generation Process


The floor plans obtained in CAD
format were passed through a number of stages during the
process o
f generating map for indoor navigation

as shown in figure

8
. The process starts by
opening the CAD floor plans in Adobe Illustrator with a 100% scale of 1000 units/millimeter
in a landscape
. Adobe Illustrator is a

convenient application for manipulating graphical
elements both visually and programmatically. The layers for different features in the floor
plans were

originally titled randomly and hence were given reasonable names by
implement
ing a small JavaScript

program in
Adobe Illustrator. The areas inside the building
that were inaccessible in any way (the
white closed areas in figure 9
) were identified in the
software. The rooms and the walkways were assigned different colors for better
re
adability as
shown in figure 9
.




27


Figure
8

Route
Map generation process






28


Figure
9

Floor plan after processing with Adobe Illustrator



The file was saved in PDF format and was imported in OmniGraffle

to generate a graph
containing a network of accessible paths for indoor navigation as shown in figu
re 10
. The
graph is composed of nodes and edges. Every room in the floor plan was assigned a node and
all the nodes were connected t
o one another through ed
ges. An

edge represents the walkway
in the graph while
a
node represents an intermediate point on the walkway known as a
waypoint

as shown in figure 10
.


The floor plans when became ready were saved in p
-
list (property
-
list) format and were
imported to a
JavaScript (
JS) program. The files were first converted to a Java Script readable
format known as JavaScript Object Notation (JSON) and were then processed in the JS
program.






29


Figure
10

Navigation Graph



3.2
.2

Path Extraction


The original floor plans obtained were containing many features but those features, which are
needed for a customized optimal path metric, were extracted. For example, walkways and
doors are the most important features to be extracted for
indoor
routing.

The path extraction
was done very carefully because the paths are meant to direct a user to a desired destination,
any false information can lead to certain damage. The path extraction was done in a manual
fashion, when a certain path was recognized visua
lly, then two nodes on either side were
connected using the same path (edge) as sho
wn in figure 10
.



3.2
.3

Features Recognition


Different classes of features such as rooms and their labels were determined automatically by
using a JS program. This can al
so be done manually in the form of a regular pattern when
there is no sufficient embedded semantics information (Miu, 2002).


All the potential walkways in the floor plans were recognized automatically in the form of a
routing graph. The walkways are eval
uated more critically because the walkways having
obstacles in their way or under construction should not be considered for navigation purpose.
Also the walkways, which lead to certain restricted areas, should be processed specially to


30

combat any problem t
hat can

happen in future. The program also recognized the rooms along
with their respective labels found inside their polygons.


The program converted the Bezier curves to polylines using DeCasteljau's algorithm. This is
done because when the data is expo
rted to the geographic

database then the database should
be able to determine th
em, otherwise the database will

not recognize the original curves. The
original projection that was in meters was converted to degrees using manually entered
projection settings in the program.


After recognizing all the important features from the floor plans the data is exported to
a
geographic database by outputting Structured Query Language (SQL) commands for
SpatialLite.


The Bezier
-
curves were converted to polylines to make them able to be recognized in the
SpatialLite database. This was done us
ing DeCasteljau's algorithm (Shorte
st Path Problem:
Dijkstra’s

Algorithm, 2007)
. The data from the JavaScript program was then exported to the
geographic database using SQL (Structured Query Language) commands for SpatialLite.



3.2
.3

Database


The topological information like paths, doors

and rooms extracted from the floor plan are
stored as tabular data structure.

The database stores all the required information that is needed
in the application. It s
t
ores the data about the recognized rooms, labels and their coordinates
extracted from th
e floor plan. Information about the nodes and the edges in the navigation
map
is also stored

in the database.



3.2
.4

Labeling


The OmniGraffle does not have an expression to represent textual information, the floor
-
plan
feature labels are not propagated
to OmniGraffle. Thus, a separate JS program was created to
label the rooms based on the recognized text labels inside their polygons. The textual labels
were obtained from the database. The program also labeled the nodes in the routing graph
based on the r
ooms they were located in and were stored in the database.



3.2
.5

Data Presentation


After labeling the different features and storing in the database, the data is then fetched into a
JS program from the database. The program
converts the data files into
XML

format.

This is
done because the data/floor plans with their actual latitude/longitude values are now ready to


31

be visualized on top of OSM in Java Open Street Map (JOSM)

as shown in figure 11
. In
JOSM the floor plans are vi
sualized on top of their respective buildings in OSM.

The figure
11

shows the main building of Aalto University. The rotation angle and the coordinates offset
of the floor plan are compared
visually
with the original data in the OSM.



Figure
11

Routing map shown in JOSM


But if there is a difference between the two angles then the difference is calculated manually
and added back to the floor plan’s rotation angle. And the process repeats from features
recognition point and proceeds with further with the same stages discuss
ed in the previous
sub
-
sections.





32

3.2.6

Floor Pl
an Overlay on top of Background M
ap




When the rotation angle of the floor plan an
d the original building is same

then the floor plan
is perfectly aligned and does not need to make
any
changes to the angles. And therefore, the
data is combined with all other OSM files representing the nth floor in the other buildings
and is imported in Mapnik. The Mapnik renders the file with 256*256 resolution using
spherical Mercator projection.


The A
erial Bing map has also been used as a background map. The alignment of the overlaid
floor plans are perfectly fitted also on Bing
map as shown in figure 12
.




33


Figure
12

Routing map after overlaying on Bing map









34

3.3

Chapter
Summary


The routing map is designed and presented on top of background map

in order
to p
rovide

spatial information that is used for locating and guiding user spatially.

The application
renders the routing map
as well as the background map

to show the user
’s current location
and the computed path from origin to destination. The spatial information of a building is
provided in the form of floor plans

in CAD format
, which contains information about the
accessible paths, textual labels and the coordinate syste
m of the floors.


The process executed for creat
ing the routing

maps

from original maps

consists of fours
steps. The first step is to open the CAD drawings in Adobe Illus
trator and
change the scale
into an appropriate level, identify the no
-
entrance zones

in the
map

and change the data
format

into a wider machine
-
readable format
. The second step is to create a two
-
dimensional
graph from the original floor plans using
OmniGraffle
, which is needed for shortest path
finding algorithm
. The third step is to iden
tify and extract features through a JS program and
annotate objects like doors, stairways and walkways for navigation. The fourth step is to store
the important features in a database and label th
e features, for example rooms.

The final step
is to present
the

spatial maps
in JOSM and test the alignment with the background map,
and
the
n

render the data using Mapnik.










35

Chapter 4



CombinedIndoorOutdoorNavigator


CombinedIndoorOutdoorNavigator is an iPad web application developed for LBSs. The
application

guides user in d
etermining spatial locations
, path planning and scheduling
appointments based on locations. The specific use cases of the application are discussed in
detail in the later section of the chapter.


The application is designed in such a way t
hat it presents the native look of an iPad
application. The design is simple which leads to a simple user interface. The design of the
application is discussed in details in the next section of the chapter.


This chapter also discusses the implementation o
f the route
-
planning algorithm in its last
section.



4.1

Design



Designing an application is more important than programming the application. Sometimes, it
is impossible to understand how an application is implemented due to its bad design, which
leads
to a complicated architecture. On the other hand, there are also some applications
having a great design but lacking the usefulness of its features. A developer should always
keep a balance between the two factors (the design and the features) while develo
ping the
application.


Similarly, an application developed for a smart phone should be designed in a way that it
looks like native and fits to its screen well. Generally designing an application for a smart
phone is challenging because of its smaller scre
en size as compared to desktop computers or
tablet computers.



The design requirements of an application developed for the iPad are rather different than the
iPhone because of the differen
ce in screen sizes. The home

screen of
iPad 2 can be seen in
figur
e 13
.




36

The structure of the user interface is one of the important considerations when developing
applications for the iPad. Detailed information about the user interface conventions and
considerations that are applicable when developing application for the iPad
platform can be
found here (iPad Application Design, 2011).


Our prototype is originally developed for iPad so the screen size and the native look of the