0
Android	
  GPS	
  Deep	
  Dive!	
  
Na2ve	
  and	
  Browser	
  
Andy	
  Gup,	
  Esri	
  
www.andygup.net	
  
@agup	
  
I	
  
GPS	
  
Who	
  am	
  I?	
  
Andy	
  Gup	
  
Web,	
  Mobile	
  Developer	
  Evangelist	
  
	
  
www.andygup.net	
  
github.com/andy...
Is	
  smartphone	
  GPS	
  right	
  for	
  you?	
  
	
  
Understanding	
  use	
  cases	
  
	
  
Understanding	
  smartphon...
Two	
  open	
  source	
  tes2ng	
  tools	
  
Android	
  GPS	
  Test	
  Tool	
  
HTML5	
  Geoloca2on	
  Test	
  Tool	
  
Six	
  types	
  of	
  loca2on	
  data	
  
Real-­‐2me	
  	
  
	
  GPS	
  
	
  Network	
  
Cached	
  	
  
	
  GPS	
  
	
  Ne...
Two	
  types	
  of	
  loca2on	
  data	
  
	
  
Real-­‐2me	
  	
  
	
  
Cached	
  	
  
	
  
Android	
  SDK	
  
Java	
  based	
  
	
  Loca2onManager	
  
	
  Loca2on	
  APIs	
  
	
  
Significantly	
  more	
  control	
...
HTML5	
  Geoloca2on	
  API	
  
JavaScript-­‐based	
  
	
  
Significantly	
  less	
  control	
  over	
  
	
  which	
  provid...
Horizontal	
  and	
  ver2cal	
  
	
  
Grades:	
  
	
  
Recrea2onal	
  
	
  
Map	
  
	
  
Survey	
  
	
  
High-­‐end	
  Sur...
Horizontal	
  and	
  ver2cal	
  
	
  
Grades:	
  
	
  
Recrea2onal	
  >	
  3	
  m/10	
  `*	
  (Android,	
  iOS,	
  iPad,	
...
Horizontal	
  and	
  ver2cal	
  
	
  
Grades:	
  
	
  
Recrea2onal	
  -­‐	
  $	
  	
  (Android,	
  iOS,	
  iPad,	
  Garmin...
 
	
  
Accuracy	
  fluctuates…moves	
  around…!!	
  
	
  
	
  
	
  
Recrea2onal-­‐grade	
  accuracy??	
  
Horizontal	
  and	
  ver2cal	
  
	
  
<	
  1	
  cm	
  =	
  boundary/survey	
  marker,	
  gas	
  line	
  
<	
  1	
  m	
  =	...
Example	
  of	
  accuracy	
  2ers:	
  
	
  
3	
  –	
  10	
  meters	
  =	
  GOOD	
  
10	
  –	
  100	
  meters	
  =	
  MAYBE...
10	
  –	
  100	
  meters	
  
100	
  –	
  1000	
  meters	
  
>	
  1000	
  meters	
  
	
  
	
  
	
  
Smartphone	
  Accuracy	...
Accuracy	
  
Depends	
  on	
  many	
  things:	
  
	
  Device	
  type	
  
	
  Which	
  loca2on	
  providers	
  enabled	
  
...
Accuracy	
  
GPS	
  Test	
  by	
  ChartCross	
  
Accuracy	
  
Depends	
  on	
  many	
  things:	
  
	
  Rural	
  (open	
  sky)	
  
	
  Near	
  a	
  building	
  
	
  Inside	...
Denver	
  Pepsi	
  Center	
  
~33	
  feet/10	
  meters	
  (radius)	
  
3422	
  sq	
  </314.28	
  sq.	
  m	
  
Image	
  courtesy	
  Google	
  Streetview	
  
~99	
  feet/30	
  meters	
  
328	
  feet/100	
  meters	
  
~3280	
  feet/1000	
  meters	
  
GPS:	
  Cold	
  vs.	
  Warm	
  
versus	
  
Cold	
  start	
  
Phone	
  rebooted	
  
Updated	
  phone	
  OS	
  
Poten2al	
  for	
  no	
  cached	
  values	
  
Poten2al	...
Cold	
  start	
  
Cold	
  Start:	
  Snapshot	
  
One-­‐2me	
  loca2on	
  
>=	
  minimum	
  accuracy	
  
	
  
Example:	
  
Standing	
  indoor...
Cold	
  Start:	
  Snapshot	
  
One-­‐2me	
  loca2on	
  
>=	
  minimum	
  accuracy	
  
	
  
Example:	
  
Standing	
  indoor...
Cold	
  Start:	
  No	
  GPS	
  or	
  Wifi	
  
Warm	
  start	
  
Cached	
  loca2ons	
  available	
  
GPS	
  has	
  been	
  run	
  recently	
  
 
	
  
Example:	
  
~4	
  seconds	
  
Accuracy	
  11	
  meters	
  	
  
Warm	
  start	
  
Warm	
  Start:	
  GPS	
  +	
  Wifi	
  (downtown)	
  
Warm:	
  Accuracy	
  can	
  s2ll	
  fluctuate	
  
Warm:	
  Accuracy	
  can	
  s2ll	
  fluctuate	
  
Warm	
  or	
  cold…who	
  cares??	
  
	
  
BaVery	
  life	
  
User	
  expecta2ons	
  
	
  
Leave	
  GPS	
  on?	
  
Cycle	
...
BaVery	
  life	
  
How	
  to	
  get	
  beVer	
  baVery	
  life??	
  
External	
  baVery	
  solu2on	
  examples:	
  
	
  
	
  Anker	
  Astro	
...
How	
  to	
  get	
  beVer	
  baVery	
  life??	
  
How	
  to	
  get	
  beVer	
  accuracy??	
  
External	
  GPS	
  receiver	
  (Wifi,	
  bluetooth,	
  plug-­‐in)	
  
	
  
Cons...
How	
  to	
  get	
  beVer	
  accuracy??	
  
How	
  to	
  get	
  beVer	
  accuracy??	
  
HTML5	
  Geoloca2on	
  Overview	
  
Limited	
  control	
  over	
  GPS	
  and	
  baVery	
  
Cannot	
  be	
  minimized	
  
C...
Na2ve	
  GPS	
  Overview	
  
Fine	
  grained	
  control	
  over	
  GPS	
  and	
  baVery	
  
Works	
  when	
  minimized	
  ...
Collector	
  for	
  ArcGIS	
  
hVp://resources.arcgis.com/en/collector/	
  	
  
References	
  
www.gps.gov	
  
	
  
hVp://www.andygup.net/android-­‐gps/	
  	
  
	
  
Mastering	
  HTML5	
  Geoloca2on:	
 ...
References	
  
Recrea2onal	
  vs.	
  Professional	
  GPS:	
  
	
  hVp://www.esri.com/news/arcuser/0104/rec-­‐gps.html	
  	...
Ques2ons?	
  
Andy	
  Gup	
  	
  
Developer	
  Evangelist	
  
	
  
www.andygup.net	
  
github.com/andygup	
  	
  	
  	
  
...
Upcoming SlideShare
Loading in...5
×

2013 URISA Track, Android GPS Deep Dive by Andy Gup

605

Published on

This is a must attend session for developers either planning to use or already using Android GPS in your native applications. Android offers one of the most flexible GPS systems that are available in smartphones today. We'll look at key aspects of the Location Manager Class, and provide real-world use cases on how to best implement them. You'll walk away with insight that typically takes days or even weeks to figure out.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
605
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "2013 URISA Track, Android GPS Deep Dive by Andy Gup"

  1. 1. Android  GPS  Deep  Dive!   Na2ve  and  Browser   Andy  Gup,  Esri   www.andygup.net   @agup  
  2. 2. I   GPS  
  3. 3. Who  am  I?   Andy  Gup   Web,  Mobile  Developer  Evangelist     www.andygup.net   github.com/andygup         agup@esri.com   @agup    
  4. 4. Is  smartphone  GPS  right  for  you?     Understanding  use  cases     Understanding  smartphone  GPS!     Deciding  accuracy  thresholds  
  5. 5. Two  open  source  tes2ng  tools  
  6. 6. Android  GPS  Test  Tool  
  7. 7. HTML5  Geoloca2on  Test  Tool  
  8. 8. Six  types  of  loca2on  data   Real-­‐2me      GPS    Network   Cached      GPS    Network   Passive   NMEA    
  9. 9. Two  types  of  loca2on  data     Real-­‐2me       Cached      
  10. 10. Android  SDK   Java  based    Loca2onManager    Loca2on  APIs     Significantly  more  control  over    data  providers    baVery  life    offline  usage    when  app  is  minimized  
  11. 11. HTML5  Geoloca2on  API   JavaScript-­‐based     Significantly  less  control  over    which  providers  are  used    baVery  life     Can’t  be  used  when    minimized      
  12. 12. Horizontal  and  ver2cal     Grades:     Recrea2onal     Map     Survey     High-­‐end  Survey     Accuracy  Requirements  
  13. 13. Horizontal  and  ver2cal     Grades:     Recrea2onal  >  3  m/10  `*  (Android,  iOS,  iPad,  Garmin,  etc)         Map  1  –  3  meters/3.2  –  9.8  `*     Survey    <  1  m/3.2  `*     High-­‐end  Survey  <  50  cm/1.6  `*   Accuracy  Requirements     *  Approxima2ons  
  14. 14. Horizontal  and  ver2cal     Grades:     Recrea2onal  -­‐  $    (Android,  iOS,  iPad,  Garmin,  etc)     Map  -­‐  $$     Survey    -­‐  $$$     High-­‐end  Survey  -­‐  $$$$   Costs  
  15. 15.     Accuracy  fluctuates…moves  around…!!         Recrea2onal-­‐grade  accuracy??  
  16. 16. Horizontal  and  ver2cal     <  1  cm  =  boundary/survey  marker,  gas  line   <  1  m  =    manhole  cover,     1  –  3  meters  =  tree,  trail  head,  junc2on  box,  pothole   3  –  10  meters  =  roo`op,  fire  hydrant   10  –  100  meters  =  parking  lot,  pond   100  –  1000  meters  =  park,  neighborhood   >  1000  meters  =  zip  code  area,  drainage  area     Recrea2onal-­‐grade  accuracy??  
  17. 17. Example  of  accuracy  2ers:     3  –  10  meters  =  GOOD   10  –  100  meters  =  MAYBE     100  –  1000  meters  =  REJECT   >  1000  meters  =  REJECT         Recrea2onal-­‐grade  accuracy??  
  18. 18. 10  –  100  meters   100  –  1000  meters   >  1000  meters         Smartphone  Accuracy  
  19. 19. Accuracy   Depends  on  many  things:    Device  type    Which  loca2on  providers  enabled    Wifi  turned  on/off    Cellular  provider    Country            
  20. 20. Accuracy   GPS  Test  by  ChartCross  
  21. 21. Accuracy   Depends  on  many  things:    Rural  (open  sky)    Near  a  building    Inside  a  car    Downtown    Indoors           Higher  accuracy   Lower  accuracy  
  22. 22. Denver  Pepsi  Center  
  23. 23. ~33  feet/10  meters  (radius)   3422  sq  </314.28  sq.  m  
  24. 24. Image  courtesy  Google  Streetview  
  25. 25. ~99  feet/30  meters  
  26. 26. 328  feet/100  meters  
  27. 27. ~3280  feet/1000  meters  
  28. 28. GPS:  Cold  vs.  Warm   versus  
  29. 29. Cold  start   Phone  rebooted   Updated  phone  OS   Poten2al  for  no  cached  values   Poten2al  for  large  inaccuracy   Has  to  ‘acquire’  the  satellites  
  30. 30. Cold  start  
  31. 31. Cold  Start:  Snapshot   One-­‐2me  loca2on   >=  minimum  accuracy     Example:   Standing  indoors   ~2  mins   Accuracy  20  meters  
  32. 32. Cold  Start:  Snapshot   One-­‐2me  loca2on   >=  minimum  accuracy     Example:   Standing  indoors   ~3  mins   Accuracy  3  meters  
  33. 33. Cold  Start:  No  GPS  or  Wifi  
  34. 34. Warm  start   Cached  loca2ons  available   GPS  has  been  run  recently  
  35. 35.     Example:   ~4  seconds   Accuracy  11  meters     Warm  start  
  36. 36. Warm  Start:  GPS  +  Wifi  (downtown)  
  37. 37. Warm:  Accuracy  can  s2ll  fluctuate  
  38. 38. Warm:  Accuracy  can  s2ll  fluctuate  
  39. 39. Warm  or  cold…who  cares??     BaVery  life   User  expecta2ons     Leave  GPS  on?   Cycle  GPS  intermiVently?        
  40. 40. BaVery  life  
  41. 41. How  to  get  beVer  baVery  life??   External  baVery  solu2on  examples:      Anker  Astro  Series  (up  to  20,000  mAh)    Energizer  XP  Series  (up  to  18,000  mAh)    Mophie  Juice  (up  to  6,000  mAh)    
  42. 42. How  to  get  beVer  baVery  life??  
  43. 43. How  to  get  beVer  accuracy??   External  GPS  receiver  (Wifi,  bluetooth,  plug-­‐in)     Consumer  examples:    Garmin  GLOTM    Bad  Elf  GPS    XGPS150A        
  44. 44. How  to  get  beVer  accuracy??  
  45. 45. How  to  get  beVer  accuracy??  
  46. 46. HTML5  Geoloca2on  Overview   Limited  control  over  GPS  and  baVery   Cannot  be  minimized   Can  approximate  loca2on  w/o  GPS   Gets  loca2on  faster  when  used  w/  Wifi   Requires  JavaScript  development  experience          
  47. 47. Na2ve  GPS  Overview   Fine  grained  control  over  GPS  and  baVery   Works  when  minimized   Requires  Java  development  experience          
  48. 48. Collector  for  ArcGIS   hVp://resources.arcgis.com/en/collector/    
  49. 49. References   www.gps.gov     hVp://www.andygup.net/android-­‐gps/       Mastering  HTML5  Geoloca2on:   hVps://www.dropbox.com/s/p6940ejtncoedyq/HTML5Geoloca2on%202.pptx       Mastering  Android  GPS:   hVps://www.dropbox.com/s/0fak3oziqyaj7i6/ OSCON_MasterAndroidGeoloca2on.pptx       Android  GPS  Test  tool:     hVps://github.com/Esri/android-­‐gps-­‐test-­‐tool       HTML5  Geoloca2on  Test  tool:   hVps://github.com/Esri/html5-­‐geoloca2on-­‐tool-­‐js    
  50. 50. References   Recrea2onal  vs.  Professional  GPS:    hVp://www.esri.com/news/arcuser/0104/rec-­‐gps.html       Smartphones,  Tables  and  GPS  Accuracy:   hVp://blogs.esri.com/esri/arcgis/2013/07/15/smartphones-­‐tablets-­‐and-­‐gps-­‐accuracy/    
  51. 51. Ques2ons?   Andy  Gup     Developer  Evangelist     www.andygup.net   github.com/andygup         agup@esri.com   @agup    
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×