ark::gps

Classes

  • ark::gps::GprmcPublisherStage
    This stage consumes GpsFix objects and produces GPRMC strings which are published as UDP packets. Useful for communicating with some devices (such as Chrony or the Velodynes).

  • ark::gps::GpsPlugin
    A simple plugin that can display GPS fixes and statistics.

  • ark::gps::NmeaInterfaceStage
    This is a simple pipeline stages that spins up a thread in the background and then processing NMEA strings coming in from a serial device. It publishes these out to the rest of the network.

  • ark::gps::NmeaParser
    This class consumes incoming NMEA strings, parses them, and then can emit some number of state information for downstream classes to process.

    This parser maintains some state some information is scattered over multiple messages (particularlly time). Time information cannot be obtained until the parser has received a GPRMC message.

  • ark::gps::TimePair
    Maintains a pairing between time (hours/minutes/seconds) and date, often coming from a GPRMC message. Time is stored in UTC.

Functions

Declared in “ark/gps/gps_fix_helpers.hh”:

  • bool is_gps_fix_reasonable(const GpsFix & fix)
    Returns true if the given GPS fix appears to be valid (ie, is populated with data that seems legitimate).

Declared in “ark/gps/nmea_parser.hh”:

  • uint8_t compute_nmea_checksum(const std::string_view & nmea_sentence)
    Compute a NMEA checksum for the given NMEA string. Assumes the string begins with a $ and does not end with an asterick.

  • std::string to_gprmc_sentence(const GpsFix & fix)
    Takes the given GpsFix object and converts it into a GPRMC message.

Declared in “ark/gps/time.hh”:

  • uint64_t gps_week_to_gps_time(uint16_t gps_week, uint64_t time_of_week_us)
    Returns GPS time, in microseconds, based on the given time-of-week and GPS week.

  • std::chrono::system_clock::time_point convert_gps_timestamp_to_utc(uint64_t gps_time_us)
    Converts the given time (in GPS frame, in microseconds), to a UTC timestamp capable of being represented with chrono.

Declared in “ark/gps/utm.hh”:

  • std::string get_utm_frame_id(uint16_t zone_number, UtmHemisphere hemisphere)
    Get the standard transform network string name for the utm zone.

  • UtmPoint lat_long_to_utm(double latitude, double longitude)
    Converts from the lat/long pair into a UTM point. This uses the Karney 2011 method, which should provide nanometer-level accuracy.