LoginSignup
0
0

More than 5 years have passed since last update.

GPSの研究 その43

Posted at

概要

gpsを理解したかった。
jsdoでnmeaをジェネレートしてみた。

ライブラリー

サンプルコード

var s;
s = NMEA.encode("GPGGA", {
    date: new Date(Date.UTC(98, 08, 13, 12, 35, 19.0)),
    lat: 48.1173,
    lon: 11.522066,
    fix: 1,
    satellites: 8,
    hdop: 0.9,
    altitude: 545.4,
    aboveGeoid: 46.9
});
alert(s);

var s;
s = NMEA.encode("GPRMC", {
    date: new Date(Date.UTC(98,8,13,8,18,36)),
    status: 'A',
    lat: -37.86083,
    lon: 145.12266,
    speed: 0,
    course: 360.0,
    variation: -11.3,
    mode: 'E'
});
alert(s);

成果物

http://jsdo.it/ohisama1/WQVQ
http://jsdo.it/ohisama1/mEe4

以上。

0
0
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
0
0