h3 2011 모바일에서의 location api 완전정복
DESCRIPTION
TRANSCRIPT
플랫폼개발실 로컬플랫폼팀 I 최 숭
모바일, Location API 완전정복
index
Location Overview 01
Location API 활용 02
Location API Tip!!! 03
API Log Message Analyze 04
Location Overview 01 Location은? 좌표 좌표계 측위방식
김대리, 회사 근처에 회식 할만한데 없을까? 2
Location 이해하기
Location 이 모야? 1. (불가산) 위치 선정; (어떤 장소에) 둠; 정주(定住)
2. 위치, 소재; (특정의) 장소; 주거지, 주소
a fine location for a house 집을 짓기에 알맞은 장소
3. (토지의) 구획, 측량; (도로의) 측량 설계
4. (UC) [영화] (보통 on ~) 야외 촬영(지), 로케이션(을 가는 장소)
be on location in Rome 로마에서 촬영 중이다
5. (불가산) [법] (토지·가옥 등의) 임대
6. [컴퓨터] (데이터의) 기억 장소[위치]
< Daum 영어사전 >
1 서형사, 이번 사건 박XX 용의자 위치 좀 따봐 ~~
3 TO SIRI : 내 여친은 어디에 있지?
FROM SIRI : 님 여친은 어제 밤부터 지금까지 홍대에 …
좌표 (X, Y)
Location 이해하기
Location API 가 하는 일은?
부가정보 ( Heading, Speed )
3D 부가정보 ( Altitude )
부부가정보 ( Accuracy? )
Cell / WiFi
Location 이해하기
좌표 구하기 (측위)
GPS
A-GPS
RFID, NFC, USN, Infrared, etc
수신 신호세기
Location 이해하기
Cell / WiFi
기지국/AP 위치
Cell & WiFi,
W Only, C Only
위치 오차가 큼!!
Location 이해하기
출처 : < QUALCOMM 2007 >
GPS Only
Location 이해하기
GPS만 쓰면 좋은건가?
많은 배터리 소모
첫 측위까지의 느린 속도
다른 대안은 없는가?
Location 이해하기
Assisted - GPS
Carrier SLP
F/W
Internet
Google SLP
MS SLP
Apple SLP
HLR
WCDMA
MSC GGSN
또 다른 문제점?
Location 이해하기
Assisted - GPS
Location 이해하기
Network / GPS 측위
얼마나 차이가 나는데?
그냥 쓸만한거 아닌가?
Location 이해하기
Network/GPS
Location API with Mobile 02 HTML5 Apple iOS Google Android
Location : Beginning
Location API로 나는 XX를…
SSF ( Single Shot Fix )
Proximity of the Region
GPS Analyzer / GPS Benchmark App.
Navigation
Location : Beginning
Location API 다나와바!!
Request Callback
Parameters
Main Class
Location : HTML
HTML5 Location : Navi
navigator.geolocation.
watchPostion
clearWatch
Position Options
enableHighAccuracy : true
Location : HTML
HTML5 Location : SSF
navigator.geolocation.
getCurrentPostion
Location : HTML
HTML5 Location : Tip?
Location : HTML
HTML5 Location : Proximity
HTML5 Location : GPS
Location : HTML
HTML5 Location : callback
Position callback (req.)
Position Error Callback (opt.)
Position Options (opt.)
enableHighAccuracy , timeout , maximumAge
Location : HTML
HTML5 Location : API spec V2
Position callback (req.)
Position Error Callback (opt.)
Position Options (opt.)
enableHighAccuracy , timeout , maximumAge
requireCoords, requestAddress : API Spec.V2 Only
Location : HTML
HTML5 Location : Results
Latitude
accuracy
speed
Altitude
heading
Altitude Accuracy
Longitude
Address : spec V2
Location : HTML
HTML5 Location : Error
Permission Denied
Time out
Position Unavailable
Not Supported : navigator.geolocation.
Location : HTML
HTML5 Location : Codes
Sample Codes
Tip
SSF (Single Shot Fix) Only
http://html5demos.com/geo
Apple iOS
iOS Location :
SSF ( Single Shot Fix )
Proximity of the Region
GPS Analyzer / GPS Benchmark App.
Navigation
Apple iOS
CLLocationManager : Navi
desiredAccuracy : BestForNavigation
distanceFilter : 1 meter
startUpdatingLocation
Apple iOS
CLLocationManager : SSF
desired Accuracy : Best,10m,100m
distance Filter : 50 meter
start Updating Location
start Monitoring SLC (OS4.x over)
(Significant Location Change: 현저한 위치 변화)
Apple iOS
CLLocationManager : Region
Init Circular Region with Center
start Monitoring For Region
Desired Accuracy : 100m
did Enter Region / did Exit Region
Apple iOS
CLLocationManager : 진행방향
start Updating Heading
stop Updating Heading
- heading Filter
did Update Heading
Apple iOS
CLLocationManager
Sample Code
Tip : iOS 5.x 이상
Region Monitor Delay 추가
Geocode Event 추가
Location : Android
Android Location :
SSF ( Single Shot Fix )
Proximity of the Region
GPS Analyzer / GPS Benchmark App.
Navigation
Location : Android
Android Location : Providers
Network Provider
Passive Provider
Test Provider
GPS Provider
Location : Android
LocationManager : Navi
GPS PROVIDER
Request Location Update
minTime : 1000 , minDistance : 1
Location : Android
LocationManager : SSF
(GPS) / Network / Passive PROVIDER
Request Single Update ( Gingerbread Only )
minTime : 1000 , minDistance : 1
Last Known Location
Location : Android
LocationManager : Proximity
Add Proximity Alter
중심점 , 반경 지정
Entering , Exit – 좌표정보 없음
4minute
Location : Android
Location Provider:
AVALABLE
Out of SVC
Temporally
Unavailable
Location : Android
LocationManager : GPS 분석
GPS Provider
Request Location Update
minTime : 1000 , minDistance : 1
GpsStatus , GpsSattellite
Location : Android
LocationManager : GPS 분석
Location : Android
GpsStatus
get Max Satellites : always 255
get Satellites
get TTFF (Time To First Fix)
GpsSatellites.getUsed InFix()
Location : Android
GpsSatellites
get Used In Fix()
PRN : 위성 번호 Azimuth
Ephemeris
Almanac
Elevation SNR : 위성 신호 세기
GPS Satellites 정보 활용
Accuracy ?
Network 측위는 ?
Location : Android
Criteria
Accuracy ( Fine/Coarse )
( High, Medium, Low )
Power ( High, Medium, Low )
Bearing , Speed , V/H Accuracy
Location : Android
getBestProvider()
Criteria 기준 적합한 Provider 응답
Intelligent?
Location : Android
Provider Defaults
Provider Accuracy Power 고도,방향,
속도
GPS FINE High O
Network COARSE Low X
Provider Req.
Cell?
Req.
Network?
Req.
Satellite?
Monetary
Cost
GPS X O O X
Network O O X O
Location : Android
API Difference
Android Version Location
Update
Single
Update
Passive
Provider
Additional
Criteria
Android 2.1
(É clair – AL7) ▲ X X X
Android 2.2
(Proyo – AL8) ▲ X O X
Android 2.3
(Gingerbread – AL9) O O O
speed,
bearing,
Vertical,
Horizontal
Location 마무리 P-1
내 사용 용도에 맞춘 조합을 사용할 수 있었으면…
임시 위치를 보여 줄때도 계속 새로운 위치를 찾아 주었으면…
배터리는 알아서 잘 아껴써야 한다구우~~~
Best Location API는?
쉽게 사용할 수 있는 API 였으면...
마무리 03
우리의 희망은?
getBestLocation () for SSF
1. LastKnownLocation() : 모든 LP 검색후 최신 데이터 제공
2. Network / Passive Provider 정보 활용
3. 사용자 지정 주기별 위치 업데이트
5. GPS 기동시 속도에 따른 주기 변경
파란 개발자 블로그 : http://dev.paran.com
4. Provider Enable / Disabled Event 로 On/Off 적용
1
정확히 구현하여 차별화되고 안정적인 Location Service를 사용하자
맺음말
2
배터리 먹는 하마가 아닌 유용한 정보로 활용되는 Location Based 서비스로 거듭납시다 ~~
맺음말
참조 사이트
참조사이트
http://developer.apple.com/
http://developer.android.com/
Location Awareness Programming Guide CLLocationManager Class Reference
Class Reference
참조 사이트
참조사이트
http://dev.w3.org/geo/api/spec-source
http://www.qualcomm.com/
Geolocation API Specification
LBS: Beyond a Simple Lat/Lon
참조 사이트
참조사이트
http://dev.paran.com ‘위치기반’ 앱 제대로 만들기 안드로이드 개발자 대외홍보팀 reto Meier
http://grepcode.com 안드로이드 소스코드 2.3.5_r1 Eclipse, Hadoop, 등
참조 사이트
참조사이트
http://market.android.com/ com.chartcross.gpstestplus : \2,636 com.chartcross.gpstest : free