package nmea

  1. Overview
  2. Docs

Module Nmea.SentenceSource

Sourceexception Invalid_sentence
Sourcetype mag_var = float * Coord.ew
Sourcetype mag_dev = float * Coord.ew
Sourcetype gga = {
  1. time : float;
  2. coord : Coord.t;
  3. quality : int;
  4. sat_n : int;
  5. hdop : float;
  6. alt : float;
  7. geoid_height : float;
  8. station_id : string;
}
Sourcetype gll = {
  1. time : float;
  2. coord : Coord.t;
  3. status : bool;
}
Sourcetype rmc = {
  1. time : float;
  2. coord : Coord.t;
  3. sog : float;
  4. cmg : float;
  5. mag_var : mag_var;
  6. status : bool;
}
Sourcetype sat = {
  1. prn : int;
  2. elev_dgr : int;
  3. azimuth : int;
  4. snr_db : int;
}
Sourcetype gsv = {
  1. msg_n : int;
  2. msg_i : int;
  3. sv_n : int;
  4. sats : sat list;
}
Sourcetype gsa = {
  1. auto : bool;
  2. fix : int;
  3. prns : int list;
  4. pdop : float;
  5. hdop : float;
  6. vdop : float;
}
Sourcetype hdg = {
  1. hdg : float;
  2. mag_dev : mag_dev;
  3. mag_var : mag_var;
}
Sourcetype zda = {
  1. time : float;
  2. tz : int;
}
Sourcetype t =
  1. | GLL of gll
  2. | GGA of gga
  3. | RMC of rmc
  4. | GSV of gsv
  5. | GSA of gsa
  6. | HDT of float
  7. | HDM of float
  8. | HDG of hdg
  9. | ZDA of zda
    (*

    sentence type

    *)
Sourceval to_string : t -> string

to_string s returns an human readable string for the given sentence

Sourceval time_to_unix : int -> float

time_to_unix t transforms nmea time format to unixtime

Sourceval datetime_to_unix : int -> int -> float

datetime_to_unix d t transforms nmea datetime format to unixtime

Sourceval datetime_to_unix2 : int -> int -> int -> int -> float

datetime_to_unix2 day month year t transforms nmea datetime format to unixtime

OCaml

Innovation. Community. Security.