LoginSignup
3
3

More than 3 years have passed since last update.

gpsd_json を読んだメモ

Last updated at Posted at 2019-08-16
  • gpspipe(1)で流れてくるJSONのそれぞれの値がなにを意味しているのか全然わからなかったので調べてみた
  • とりあえずTPVオブジェクトから
  • 知りたかったのは緯度経度の推定誤差だったのだけど、epxepyを見ればいいことがわかった
  • 原文: http://manpages.ubuntu.com/manpages/bionic/man5/gpsd_json.5.html

TPV

A TPV object is a time-position-velocity report. The "class" and "mode" fields will reliably be present.
The "mode" field will be emitted before optional fields that may be absent when there is no fix.
Error estimates will be emitted after the fix components they're associated with.
Others may be reported or not depending on the fix quality.

TPVオブジェクトは、time-position-velocity(時間-位置-速度)レポートです。"class" および "mode" フィールドは確実に存在します。
"mode" フィールドは、GPSの捕捉がない場合に存在しない可能性があるオプションフィールドの前に出力されます。
エラーの推定値は、関連する捕捉コンポーネントの後に出力されます。
その他は、捕捉品質に応じて報告される場合とされない場合があります。

Table 1. TPV object

Name Always? Type Description
class Yes string Fixed: "TPV"
device No string Name of originating device.
status No numeric GPS status: %d, 2=DGPS fix, otherwise not present.
mode Yes numeric NMEA mode: %d, 0=no mode value yet seen, 1=no fix, 2=2D, 3=3D.
time No string Time/date stamp in ISO8601 format, UTC. May have a fractional part of up to .001sec precision. May be absent if mode is not 2 or 3.
ept No numeric Estimated timestamp error (%f, seconds, 95% confidence). Present if time is present.
lat No numeric Latitude in degrees: +/- signifies North/South. Present when mode is 2 or 3.
lon No numeric Longitude in degrees: +/- signifies East/West. Present when mode is 2 or 3.
alt No numeric Altitude in meters. Present if mode is 3.
epx No numeric Longitude error estimate in meters, 95% confidence. Present if mode is 2 or 3 and DOPs can be calculated from the satellite view.
epy No numeric Latitude error estimate in meters, 95% confidence. Present if mode is 2 or 3 and DOPs can be calculated from the satellite view.
epv No numeric Estimated vertical error in meters, 95% confidence. Present if mode is 3 and DOPs can be calculated from the satellite view.
track No numeric Course over ground, degrees from true north.
speed No numeric Speed over ground, meters per second.
climb No numeric Climb (positive) or sink (negative) rate, meters per second.
epd No numeric Direction error estimate in degrees, 95% confidence.
eps No numeric Speed error estinmate in meters/sec, 95% confidence.
epc No numeric Climb/sink error estimate in meters/sec, 95% confidence.
名称 常に存在する 種類 説明
class はい 文字列 "TPV" で固定
device いいえ 数値 発信元デバイスの名前
status いいえ 数値 GPSの状態: %d, 2=DGPS捕捉, それ以外の場合は非表示
mode はい 数値 NMEAモード: %d,
0=モードを示す値がまだ現れていない,
1=未捕捉, 2=2D fix, 3=3D fix.
time いいえ 文字列 ISO8601形式のUTCタイムスタンプ.
最大0.001秒の精度の小数部分がある場合があります.
modeが2または3でない場合は, 存在しない場合があります
ept いいえ 数値 推定タイムスタンプエラー (%f, 秒, 95%信頼度).
time がある場合は存在します
lat いいえ 数値 緯度の度数. +/- はそれぞれ 北/南 を表します.
modeが2または3のときは存在します
lon いいえ 数値 経度の度数. +/- はそれぞれ 東/西 を表します.
modeが2または3のときは存在します
alt いいえ 数値 メートルで表された高度. modeが3のときは存在します
epx いいえ 数値 メートルで表された経度の推定誤差(信頼度95%).
モードが2または3で, DOPが衛星ビューから計算できる場合に存在します
epy いいえ 数値 メートルで表された緯度の推定誤差(信頼度95%).
モードが2または3で, DOPが衛星ビューから計算できる場合に存在します
epv いいえ 数値 メートルで表された推定垂直誤差(信頼度95%).
モードが3で, DOPが衛星ビューから計算できる場合に存在します
track いいえ 数値 地上の進路(真北からの角度)
speed いいえ 数値 地上を移動する速度(メートル毎秒)
climb いいえ 数値 上昇(正の値)及び降下(負の値)率. メートル毎秒
epd いいえ 数値 度数で表された推定方位誤差(信頼度95%)
eps いいえ 数値 推定速度誤差(メートル毎秒, 信頼度95%)
epc いいえ 数値 推定上昇/降下率誤差(メートル毎秒, 信頼度95%)

When the C client library parses a response of this kind, it will assert validity bits in the top-level set member for each field actually received; see gps.h for bitmask names and values.

クライアントCライブラリがこの種類のレスポンスを解析すると、実際に受信した各フィールドのトップレベルセットメンバに有効性ビットがアサートされます。
ビットマスクの名前と値については gps.h を参照してください。

Here's an example:

例を示します:

{
  "class": "TPV",
  "device": "/dev/pts/1",
  "time": "2005-06-08T10:34:48.283Z",
  "ept": 0.005,
  "lat": 46.498293369,
  "lon": 7.567411672,
  "alt": 1343.127,
  "eph": 36,
  "epv": 32.321,
  "track": 10.3788,
  "speed": 0.091,
  "climb": -0.085,
  "mode": 3
}
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3