gpsdクライアントから取得できるデータ

GPSからは定期的に以下のようなデータが送られてきます。(NMEA-0183というプロトコルです)

$GPGGA,031653,3404.456,N,13531.788,E,1,08,1.0,1037.7,M,34.3,M,,*79
$GPGSA,A,3,01,03,06,,,17,,22,25,28,29,,1.9,1.0,1.6*38
$GPGSV,3,1,11,01,28,308,32,03,39,208,46,06,18,042,47,13,06,324,31*72
$GPGSV,3,2,11,15,13,139,00,17,17,093,41,20,00,265,00,22,62,317,37*7C
$GPGSV,3,3,11,25,68,101,41,28,34,276,42,29,09,169,30,,,,*42
$PGRME,3.7,M,5.8,M,6.9,M*28

これをGPSDが解析してくれるわけですが、GPSDがクライアントに定期的に送信するデータは下記の5種類になります。(GPSDのPythonクライアントから取得できるデータになります)

  • VERSION
    GPSDのバージョン情報です。GPSD起動時に1回だけ送られてきます。
    (サンプル)

    {"class":"VERSION","release":"2.93","rev":"2010-03-30T12:18:17","proto_major":3,"proto_minor":2}
  • DEVICE
    GPSのデバイス情報です。GPSD起動時に1回だけ送られてきます。
    (サンプル)

    {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyUSB0","activated":1269959537.20,"native":0,"bps":4800,"parity":"N","stopbits":1,"cycle":1.00}]}
  • WATCH
    GPSDの監視設定情報です。GPSD起動時に1回だけ送られてきます。
    (サンプル)

    {{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false}
  • TPV(Time Position Velocity)
    位置情報です。これが一番使う情報で、定期的に受信し続けます。衛星の取得数に応じて情報量が変わります。
    (サンプル)

    {"class":"TPV","tag":"MID2","time":"2010-04-30T11:48:20.10Z","ept":0.005,
                   "lat":46.498204497,"lon":7.568061439,"alt":1327.689,
                    "epx":15.319,"epy":17.054,"epv":124.484,"track":10.3797,
                    "speed":0.091,"climb":-0.085,"eps":34.11,"mode":3}
  • SKY
    取得している衛星の情報です。定期的に受信し続けます。
    (サンプル)

    {"class":"SKY","tag":"MID7","device":"/dev/ttyUSB0","time":"2012-04-05T15:00:00.000Z","xdop":0.61,"ydop":1.19,"vdop":1.48,"tdop":1.14,"hdop":1.40,"gdop":2.30,"pdop":1.99,"satellites":[{"PRN":26,"el":15,"az":49,"ss":29,"used":true},{"PRN":18,"el":62,"az":315,"ss":31,"used":true},{"PRN":15,"el":60,"az":43,"ss":44,"used":true},{"PRN":21,"el":71,"az":237,"ss":0,"used":false},{"PRN":27,"el":52,"az":94,"ss":40,"used":true},{"PRN":9,"el":48,"az":136,"ss":33,"used":true},{"PRN":22,"el":21,"az":291,"ss":36,"used":true},{"PRN":3,"el":8,"az":303,"ss":25,"used":true}

細かい項目とかはこのサイトが参考になります。

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s