Adafruit GPS Library
Classes | Macros | Typedefs | Enumerations
NMEA_data.h File Reference
#include "Arduino.h"

Go to the source code of this file.

Classes

struct  nmea_history_t
 
struct  nmea_datavalue_t
 

Macros

#define NMEA_MAX_WP_ID   20
 maximum length of a waypoint ID name, including terminating 0
 
#define NMEA_MAX_SENTENCE_ID   20
 maximum length of a sentence ID name, including terminating 0
 
#define NMEA_MAX_SOURCE_ID   3
 maximum length of a source ID name, including terminating 0
 
#define NMEA_FLOAT_T   float
 let float be overidden on command line
 

Typedefs

typedef NMEA_FLOAT_T nmea_float_t
 the type of variables to use for floating point
 

Enumerations

enum  nmea_value_type_t {
  NMEA_SIMPLE_FLOAT = 0, NMEA_COMPASS_ANGLE = 1, NMEA_BOAT_ANGLE = 2, NMEA_COMPASS_ANGLE_SIN,
  NMEA_BOAT_ANGLE_SIN, NMEA_DDMM = 20, NMEA_HHMMSS
}
 
enum  nmea_index_t {
  NMEA_HDOP = 0, NMEA_LAT, NMEA_LON, NMEA_LATWP,
  NMEA_LONWP, NMEA_SOG, NMEA_COG, NMEA_COG_SIN,
  NMEA_COG_COS, NMEA_COGWP, NMEA_XTE, NMEA_DISTWP,
  NMEA_AWA, NMEA_AWA_SIN, NMEA_AWA_COS, NMEA_AWS,
  NMEA_TWA, NMEA_TWA_SIN, NMEA_TWA_COS, NMEA_TWD,
  NMEA_TWD_SIN, NMEA_TWD_COS, NMEA_TWS, NMEA_VMG,
  NMEA_VMGWP, NMEA_HEEL, NMEA_PITCH, NMEA_HDG,
  NMEA_HDG_SIN, NMEA_HDG_COS, NMEA_HDT, NMEA_HDT_SIN,
  NMEA_HDT_COS, NMEA_VTW, NMEA_LOG, NMEA_LOGR,
  NMEA_DEPTH, NMEA_RPM_M1, NMEA_TEMPERATURE_M1, NMEA_PRESSURE_M1,
  NMEA_VOLTAGE_M1, NMEA_CURRENT_M1, NMEA_RPM_M2, NMEA_TEMPERATURE_M2,
  NMEA_PRESSURE_M2, NMEA_VOLTAGE_M2, NMEA_CURRENT_M2, NMEA_TEMPERATURE_AIR,
  NMEA_TEMPERATURE_WATER, NMEA_HUMIDITY, NMEA_BAROMETER, NMEA_USR_00,
  NMEA_USR_01, NMEA_USR_02, NMEA_USR_03, NMEA_USR_04,
  NMEA_USR_05, NMEA_USR_06, NMEA_USR_07, NMEA_USR_08,
  NMEA_USR_09, NMEA_USR_10, NMEA_USR_11, NMEA_USR_12,
  NMEA_MAX_INDEX
}
 

Enumeration Type Documentation

◆ nmea_value_type_t

Type to characterize the type of value stored in a data value struct. The sine and cosine components of some angles allow for smoothing of those angles by averaging of sine and cosine values that are continuous, rather than angles that are discontinuous at -180/180 or 359/0 transitions. Types 10-19 must have three contiguous data value entries set up in the matrix to accommodate the extra sin and cos values.

Enumerator
NMEA_SIMPLE_FLOAT 

A simple floating point number.

NMEA_COMPASS_ANGLE 

A compass style angle from 0 to 360 degrees.

NMEA_BOAT_ANGLE 

An angle relative to the boat orientation from -180 (port) to 180 degrees

NMEA_COMPASS_ANGLE_SIN 

A compass style angle from 0 to 360 degrees, with sin and cos elements stored for averaging, etc.

NMEA_BOAT_ANGLE_SIN 

An angle relative to the boat orientation from -180 (port) to 180 degrees, with sin and cos elements stored for averaging, etc.

NMEA_DDMM 

A latitude or longitude angle stored in DDMM.mmmm format like it comes in from the GPS

NMEA_HHMMSS 

A time stored in HHMMSS format like it comes in from the GPS.

◆ nmea_index_t

Type to provide an index into the array of data values for different NMEA quantities. The sine and cosine components of some angles allow for smoothing of those angles by averaging of sine and cosine values that are continuous, rather than angles that are discontinuous at -180/180 or 359/0 transitions. Note that the enumerations are arranged so that NMEA_XXX_SIN = NMEA_XXX + 1, and NMEA_XXX_COS = NMEA_XXX + 2.

Enumerator
NMEA_HDOP 

Horizontal Dilution of Position.

NMEA_LAT 

Latitude in signed decimal degrees -90 to 90.

NMEA_LON 

Longitude in signed decimal degrees -180 to 180.

NMEA_LATWP 

Waypoint Latitude in signed decimal degrees -90 to 90.

NMEA_LONWP 

Waypoint Longitude in signed decimal degrees -180 to 180.

NMEA_SOG 

Speed over Ground in knots.

NMEA_COG 

Course over ground, 0 to 360 degrees true.

NMEA_COG_SIN 

sine of Course over ground

NMEA_COG_COS 

cosine of Course over ground

NMEA_COGWP 

Course over ground to the waypoint, 0 to 360 degrees true.

NMEA_XTE 

Cross track error for the current segment to the waypoint, Nautical Miles -ve to the left

NMEA_DISTWP 

Distance to the waypoint in nautical miles.

NMEA_AWA 

apparent wind angle relative to the boat -180 to 180 degrees

NMEA_AWA_SIN 

sine of apparent wind angle relative to the boat

NMEA_AWA_COS 

cosine of apparent wind angle relative to the boat

NMEA_AWS 

apparent wind speed, will be coerced to knots

NMEA_TWA 

true wind angle relative to the boat -180 to 180 degrees

NMEA_TWA_SIN 

sine of true wind angle relative to the boat

NMEA_TWA_COS 

cosine of true wind angle relative to the boat

NMEA_TWD 

true wind compass direction, magnetic 0 to 360 degrees magnetic

NMEA_TWD_SIN 

sine of true wind compass direction, magnetic

NMEA_TWD_COS 

cosine of true wind compass direction, magnetic

NMEA_TWS 

true wind speed in knots TWS

NMEA_VMG 

velocity made good relative to the wind -ve means downwind, knots

NMEA_VMGWP 

velocity made good relative to the waypoint, knots

NMEA_HEEL 

boat heel angle, -180 to 180 degrees to starboard

NMEA_PITCH 

boat pitch angle, -180 to 180 degrees bow up

NMEA_HDG 

magnetic heading, 0 to 360 degrees magnetic

NMEA_HDG_SIN 

sine of magnetic heading

NMEA_HDG_COS 

cosine of magnetic heading

NMEA_HDT 

true heading, 0 to 360 degrees true

NMEA_HDT_SIN 

sine of true heading

NMEA_HDT_COS 

cosine of true heading

NMEA_VTW 

Boat speed through the water in knots.

NMEA_LOG 

Distance logged through the water in nautical miles.

NMEA_LOGR 

Distance logged through the water in nautical miles since reset

NMEA_DEPTH 

depth of water below the surface in metres

NMEA_RPM_M1 

rpm of motor 1

NMEA_TEMPERATURE_M1 

temperature of motor 1 in C

NMEA_PRESSURE_M1 

pressure of motor 1 in kPa

NMEA_VOLTAGE_M1 

voltage of motor 1 in Volts

NMEA_CURRENT_M1 

current of motor 1 in Amps

NMEA_RPM_M2 

rpm of motor 2

NMEA_TEMPERATURE_M2 

temperature of motor 2 in C

NMEA_PRESSURE_M2 

pressure of motor 2 in kPa

NMEA_VOLTAGE_M2 

voltage of motor 2 in Volts

NMEA_CURRENT_M2 

current of motor 2 in Amps

NMEA_TEMPERATURE_AIR 

outside temperature in C

NMEA_TEMPERATURE_WATER 

sea water temperature in C

NMEA_HUMIDITY 

outside relative humidity in %

NMEA_BAROMETER 

barometric pressure in Pa absolute – not altitude corrected

NMEA_USR_00 

spaces for a user sketch to inject its own data

NMEA_USR_01 

spaces for a user sketch to inject its own data

NMEA_USR_02 

spaces for a user sketch to inject its own data

NMEA_MAX_INDEX 

the largest number in the enum type – not for data, but does define size of data value array required.