도내 지하철에서 GPS는 실제로 어떤가. GeoLocationAPI로 위치 정보 측정해 보았다.
소개
안녕 LIG 의 엔지니어 노비스케 입니다.
Xmas를 향해 캠페인 사이트를 구축 중입니다.
htp://sbぃg. ch stma s /

#산타에서 트윗하세요 :)
당일은 위치 정보를 취급하는 장치를 만들고 있습니다.
그 관계로, GPS의 정밀도에 대해서 검증을 실시한 메모를 남깁니다.
실험
단말 ① iPhone5s ios 8.1.1
오차 10m 옥외라면 꽤 정밀도 좋습니다.


오차 2000m 실내에서도 전파 상황에 따라서는 상당한 오차가 나옵니다.

오차 2000m 지하에 들어가면 오이타 오차가 나옵니다 땀

오차 7000m 더욱 지하일까 이 정도가 되면 GPS로서는 사용할 수 없을지도 모르겠네요.

단말② iPhone5 ios 8.1.2
오차 10m 옥외라면 역시 정밀도는 높다

오차 30m 실내에서도 장소에 따라서는 정밀도 높습니다.

오차 10m 전철에서도 지하철이 아닌 한은 꽤 정밀도 높게 취할 수 있는 것 같네요.
이동 속도는 유석 w

소스 코드
실제로 사용한 소스 코드입니다. 여기에 milkcocoa 로 정보를 보내거나 하는 코드를 추기해 사용했습니다.
GPS를 계속 계속할 때는 watchPosition()을 사용하는 것이 좋은 것 같습니다.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>位置情報</title>
<script>
document.addEventListener("DOMContentLoaded", function() {
// オプション・パラメータをセッ
var position_options = {
enableHighAccuracy: true,
timeout: 60000,
maximumAge: 0
};
window.navigator.geolocation.watchPosition(monitor, null, position_options);
}, false);
// 位置情報取得完了時の処理
function monitor(event) {
// 緯度
var latitude = event.coords.latitude;
document.querySelector('#latitude').textContent = latitude;
// 経度
var longitude = event.coords.longitude;
document.querySelector('#longitude').textContent = longitude;
// 緯度・経度の精度
var accuracy = event.coords.accuracy;
document.querySelector('#accuracy').textContent = accuracy;
// GPS 高度
var altitude = event.coords.altitude;
document.querySelector('#altitude').textContent = altitude;
// GPS 高度の精度
var altitudeAccuracy = event.coords.altitudeAccuracy;
document.querySelector('#altitudeAccuracy').textContent = altitudeAccuracy;
// 移動方向
var heading = event.coords.heading;
document.querySelector('#heading').textContent = heading;
// 移動速度
var speed = event.coords.speed;
document.querySelector('#speed').textContent = speed;
// タイムスタンプ
var date = event.timestamp;
if( typeof(date) == "number" ){
date = new Date(date);
}
document.querySelector('#timestamp').textContent = date.toString();
}
</script>
</head>
<body>
<dl>
<h1>のだGPS</h1>
<dt>緯度</dt>
<dd id="latitude">-</dd>
<dt>経度</dt>
<dd id="longitude">-</dd>
<dt>緯度・経度の精度</dt>
<dd id="accuracy">-</dd>
<dt>GPS 高度</dt>
<dd id="altitude">-</dd>
<dt>GPS 高度の精度</dt>
<dd id="altitudeAccuracy">-</dd>
<dt>移動方向</dt>
<dd id="heading">-</dd>
<dt>移動速度</dt>
<dd id="speed">-</dd>
<dt>タイムスタンプ</dt>
<dd id="timestamp">-</dd>
</dl>
</body>
</html>
요약
전체적으로 보면 옥외의 정밀도는 높네요.
지하에 들어가면 단번에 정밀도가 떨어지므로 실제로 사용할 때는주의가 필요할 것 같습니다.
참고 링크
Reference
이 문제에 관하여(도내 지하철에서 GPS는 실제로 어떤가. GeoLocationAPI로 위치 정보 측정해 보았다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/n0bisuke/items/3617b1ccd84217303a9e텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)