Indoor Positioning System

40
A new revolutionary software for EETAC’s students and teachers. This App comes with localization, routing mechanisms, social network and much more! EETAC App

description

Indoor Positioning System for Android

Transcript of Indoor Positioning System

Page 1: Indoor Positioning System

A new revolutionary software for EETAC’s students and teachers.

This App comes with localization, routing mechanisms, social network and much more!

EETAC App

Page 2: Indoor Positioning System

Tabl

e of

Con

tent

s1. Concept2. How it works? Stories3. Workflow

4. Entity-Relashionship5. Technologies

6. Ericsson Maps7. Security8. Rest Client Pattern9. Cache mechanism

10. Traffic Analisys

11. Summary & Conclusions

Introduction to the application and user experience

Diagrams with different aspects of the architecture of the application.

Most important technical aspects, explained in detail.

2

Page 3: Indoor Positioning System

Explaining what offers our App1

3

Page 4: Indoor Positioning System

» Offers orientation service inside the campus, where the user can explore the buildings and find the best route to go to any room.

» Follows web 2.0 Users can enrich the App sending comments and P.O.I

» Userful tool designed for Eetac students and teachers but also for visitors which don’t know the campus.

» What is the difference with Foursquare and other similar apps? Indoor positioning and routing.

Concept 4

Page 5: Indoor Positioning System

Giving an example of how the App works2

5

Page 6: Indoor Positioning System

» This Monday was about to start badly for Bob. Just landing from London at 13:17 am, he could definitively not remember the explications about how to reach the conference room. Luckily, he downloaded EetacApp before leaving, following his colleague’s advice. Within a few moments, the application gave him the quickest way to the place.

» After the presentation of Urbanization in room V-212, the group was very pleased to see their friends have already taken pictures and upload them with the EETAC App, creating several threads about the main debated issues. Now, other students can see the gallery pictures and add some comments.

Story 6

Page 7: Indoor Positioning System

Explaining the Flow Diagram of the layouts of our App

37

Page 8: Indoor Positioning System

Flow Diagram for Authentication

Starting Point Login (general)Tw

itter login

Local registration

8

Page 9: Indoor Positioning System

Flow Diagram for general use

Starting Point

Map

Explore Sites Site Site P.O.interestProfile (everyw

here)

ActionBar

9

Page 10: Indoor Positioning System

Understanding the Entity-Relationship diagram4

10

Page 11: Indoor Positioning System

Entity-Relationship Diagram

6 entities

» Location: Where is the user (dynamic)?

Where is a Site (static)?

» User: User information.

» Site: Site information.

» Check-in: Relates a User with a Site (dynamic).

» Picture: P.O.I related with a Site and a User.

» Comment: Comment related with a Site and a User.

-id-username-password-surname-description-email-set<Checkin>-set<Comment>-set<Picture>

User

-id-author-route_image-user-date-set<Comment>

Picture

-id-name-description-num_checkins-num_comments-floor-building-checkin_id-route_image-set<Picture>-set<Checkin>

Site

-id-date-site-user

Check-in

-id-text-author-date-user-picture

Comment

Location

1 0..*

10..*

0..*

1 1

1

0..*

1

0..* 1

Table: user_checkin (user_id | checkin_id)

Table: site_checkin (site_id | checkin_id)

1

0..*

1

0..*

Table: site_picture (site_id | picture_id)

Table: user_picture (user_id | picture_id)

Table: picture_comment (picture_id | comment_id)

Table: user_comment (user_id | comment_id)

11

Page 12: Indoor Positioning System

Citing all the Technologies used for the project5

12

Page 13: Indoor Positioning System

Technologies Diagram

Indoor possitioningShow mapsRoute calc.

DatabaseW

eb S

erve

r

Mob

ile A

pp

HTTP/JSON

TCP/IP

HTT

P/JS

ON

OAU

TH

REST

HTTP/JSON

REST

13

Page 14: Indoor Positioning System

Explaining what the App do with Ericsson Maps API6

14

Page 15: Indoor Positioning System

» Create maps using bulging plan and XML tags.

Ericsson Maps API 15

» Indoor localization and navigation using predefined routes, Wi-Fi Aps localization and XML tags as elevators or stairs.

Page 16: Indoor Positioning System

» Add information using over lays

» Room labels

» Finish flag

» Google Maps to Ericsson Indoor Maps by Zoom

Ericsson Maps API 16

Page 17: Indoor Positioning System

Adding Security to the App7

Page 18: Indoor Positioning System

» Challenge Implemented (SHA)

» Unique token generation.

» Token expires in 30min.

» For registering purposes, HTTPS should be used

Security for Authentication

GET /dateEetac_challenge: 63fe6da0...

200 OKdate=”2020134…”

date=”yyyyMMddHHmmssSS”Eetac_challenge=63fe6da0...

Eetac_challenge=long ID

POST /user/loginEetac_challenge: 63fe6da0…

user

token=password=hash(date + hash(password))=42D11GP...

token=password=hash(date + hash(password))200 OK or 403 FORBIDDEN

user_id=2

Eetac_token=token

GET /siteEetac_token: 42D11GP...

If (server_token == client_token) return 200;else return 403;

18

Page 19: Indoor Positioning System

Communicating with the server through a REST Client Pattern8

19

Page 20: Indoor Positioning System

The operating system may shut down the process.

» The processor could be destroyed in the middle of an operation.

The UI is frozen by the Processor (not interactive).

No memory or Database storage == bandwidth waste.

Wrong REST Client Pattern 20

Page 21: Indoor Positioning System

Good REST Client Pattern 21

Page 22: Indoor Positioning System

Adding Cache mechanism to the App9

22

Page 23: Indoor Positioning System

» Only image caching mechanism implemented

1. Download the image (write the outputstream of HTTP GET).

2. Save in the SSDcard (cache).

3. Save in memory (SoftReference HashMap)

» Before retrieving all data, retrieve a hashCode of it (no changes = no hashcode changes = no retrieving all data)

» Save each request in the Content Provider

» Good performance under 1MB of data on the Cursor

Persistence == Requests == Battery consumtion

Cache 23

Page 24: Indoor Positioning System

Dimensioning our App, through a Traffic Analisys1

0 24

Page 25: Indoor Positioning System

Traffic Analisys 25

OFF state

Get ALL Sites

User’s activity

Get Site Z

User’s activity on site Z

𝜇0

𝜇1 𝜇2

𝜇3

𝜇4

𝛿4𝛿2

𝛼1

𝛼2 𝛼3𝛽1

𝛽3

Γ

γ

Page 26: Indoor Positioning System

» Several equations can be gotten from this Markov chain.

6 equations, 19 unknown.

Get experimental values to

solve the problem.

Discrete time analysis of a Markov Chain.

Traffic Analisys 26

Page 27: Indoor Positioning System

Traffic Analisys 27

Page 28: Indoor Positioning System

Traffic Analisys 28

What we know:• Get All Size is a packet of

length: 3988 + 86 = 4074 bytes.

• Minimum packet size for Get Site Z: 158 + 86 = 244 bytes.

• Estimated velocity at server output: 1Mbyte/s getALL Transmission time

≈ 4ms <35ms get Z Transmission time

≈0,25ms << 35ms• Ping between mobile device

at the Eetac and the server:

70ms Latency for downlink ≈35ms.

• Unitary discrete time = 10ms.

Page 29: Indoor Positioning System

Traffic Analisys 29

Absolute and Relative time Session ID Request at the log instant

Size

Page 30: Indoor Positioning System

Traffic Analisys 30

Page 31: Indoor Positioning System

Traffic Analisys 31

1 12 23 34 45 56 67 78 89 100 111 122 133 144 155 166 177 188 1990

50010001500200025003000350040004500

JSON Packet size

Series1

Page 32: Indoor Positioning System

Traffic Analisys 32

State getALL User's activity getZ User's Activity site Z

Time (ms) 39 18 116 35 23 291 + Time slot = 10ms

Probability to stay in one state and to leave it

Exhaustive Analysis of the logs: Get the probability to go toward each state.

Page 33: Indoor Positioning System

Traffic Analisys 33

With this, we get all the transition probabilities, except γ and From 19 to 7 unknowns: more hypothesis are needed

Hypothesis: A session (ON) happens every 24 hours. • 24 hours <-> 8,64.10^7 ms

Average Session Time = AST

• Using , and

State getALL User's activity getZ User's Activity site Z OFF

Probability 8,790000E-08 4,000000E-05 5,130000E-08 1,050000E-04 9,975860E-01

Probability 0,00000879% 0,00400000% 0,00000513% 0,01050000% 99,75860000%

Page 34: Indoor Positioning System

Traffic Analisys 34

40 80 120 160 200 240 280 320 360 400 440 480 520 560 6000

0.5

1

1.5

2

2.5

3

3.5

PDF Session

PDF Session

𝑃𝑂𝐹𝐹=0,997586

002414

Page 35: Indoor Positioning System

Traffic Analisys 35

then Number of user:

because : support peaks.

Page 36: Indoor Positioning System

Explain the tasks done; the tasks to be performed and the conclusions

11 36

Page 37: Indoor Positioning System

Tasks Performed

» Show EETAC Map (Ericsson)

» Indoor Positioning (Ericsson)

» Route to a Site (Ericsson)

» Twitter Integration (OAuth)

» Server persistence (Postgree + Hibernate)

» REST client and Server communication (Spring and Jersey)

» GET/PUT images from/to the server

» GET/PUT/DELETE comments from/to the server

» PUT/DELETE checkin from/to the server

Tasks performed summary 37

Page 38: Indoor Positioning System

Tasks to be performed summary

Tasks to be Performed

» Interaction between users

» View users profile and comments

» Integration with Facebook

» Add dynamically a Site

» Improve the “Go to” guide

» Use more the Local Cache (Content Provider)

» Integration with Google Maps

38

Page 39: Indoor Positioning System

Conclusions

Indoor positioning & routing

» Bad precission because of the Aps power. Some brands offer better precission with their own hard&soft.

Android (Client)

» Since the life cycle of an Activity is managed by Android; the programmer should be careful.

» Limitted memory space also should be taken into account.

» Battery consumption should be taken into account.

Rest Client Server

» Difficulty to integrate Hibernate (learning curve).

39

Page 40: Indoor Positioning System

? Questions?

40