Functions | |
def | convert_deg_to_rads (degs) |
def | convert_knots_to_mps (knots) |
def | convert_latitude (field) |
def | convert_longitude (field) |
def | convert_status_flag (status_flag) |
def | convert_time (nmea_utc) |
def | convert_time_rmc (date_str, time_str) |
def | parse_nmea_sentence (nmea_sentence) |
def | safe_float (field) |
def | safe_int (field) |
Variables | |
logger = logging.getLogger('rosout') | |
dictionary | parse_maps |
def libnmea_navsat_driver.parser.convert_deg_to_rads | ( | degs | ) |
def libnmea_navsat_driver.parser.convert_knots_to_mps | ( | knots | ) |
def libnmea_navsat_driver.parser.convert_latitude | ( | field | ) |
def libnmea_navsat_driver.parser.convert_longitude | ( | field | ) |
Convert a longitude string to floating point decimal degrees. Args: field (str): Longitude string, expected to be formatted as DDDMM.MMM, where DDD is the longitude degrees, and MM.MMM are the minutes longitude. Returns: Floating point latitude in decimal degrees.
def libnmea_navsat_driver.parser.convert_status_flag | ( | status_flag | ) |
def libnmea_navsat_driver.parser.convert_time | ( | nmea_utc | ) |
Extract time info from a NMEA UTC time string and use it to generate a UNIX epoch time. Time information (hours, minutes, seconds) is extracted from the given string and augmented with the date, which is taken from the current system time on the host computer (i.e. UTC now). The date ambiguity is resolved by adding a day to the current date if the host time is more than 12 hours behind the NMEA time and subtracting a day from the current date if the host time is more than 12 hours ahead of the NMEA time. Args: nmea_utc (str): NMEA UTC time string to convert. The expected format is HHMMSS.SS where HH is the number of hours [0,24), MM is the number of minutes [0,60), and SS.SS is the number of seconds [0,60) of the time in UTC. Returns: tuple(int, int): 2-tuple of (unix seconds, nanoseconds) if the sentence contains valid time. tuple(float, float): 2-tuple of (NaN, NaN) if the sentence does not contain valid time.
def libnmea_navsat_driver.parser.convert_time_rmc | ( | date_str, | |
time_str | |||
) |
Convert a NMEA RMC date string and time string to UNIX epoch time. Args: date_str (str): NMEA UTC date string to convert, formatted as DDMMYY. nmea_utc (str): NMEA UTC time string to convert. The expected format is HHMMSS.SS where HH is the number of hours [0,24), MM is the number of minutes [0,60), and SS.SS is the number of seconds [0,60) of the time in UTC. Returns: tuple(int, int): 2-tuple of (unix seconds, nanoseconds) if the sentence contains valid time. tuple(float, float): 2-tuple of (NaN, NaN) if the sentence does not contain valid time.
def libnmea_navsat_driver.parser.parse_nmea_sentence | ( | nmea_sentence | ) |
Parse a NMEA sentence string into a dictionary. Args: nmea_sentence (str): A single NMEA sentence of one of the types in parse_maps. Returns: A dict mapping string field names to values for each field in the NMEA sentence or False if the sentence could not be parsed.
def libnmea_navsat_driver.parser.safe_float | ( | field | ) |
def libnmea_navsat_driver.parser.safe_int | ( | field | ) |
libnmea_navsat_driver.parser.logger = logging.getLogger('rosout') |