ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
esphome::gps::GPSData Struct Reference

Values from GGA and RMC sentences as scaled integers; a name ending in eN is the value times 10^N. More...

#include <nmea.h>

Public Member Functions

bool has (GPSField field) const
 
bool is_updated (GPSField field) const
 
float latitude () const
 
float longitude () const
 
float altitude () const
 
float speed_knots () const
 
float speed_kmh () const
 
float course () const
 
float hdop () const
 
float geoid_separation () const
 

Data Fields

int32_t latitude_e7 {0}
 degrees, north positive
 
int32_t longitude_e7 {0}
 degrees, east positive
 
int32_t altitude_e3 {0}
 meters above mean sea level
 
int32_t geoid_separation_e3 {0}
 meters from the WGS84 ellipsoid up to mean sea level
 
uint32_t speed_e3 {0}
 knots
 
uint16_t course_e2 {0}
 degrees from true north
 
uint16_t hdop_e2 {0}
 
uint16_t year {0}
 
uint16_t millisecond {0}
 of the time; 0 when the time has no fraction
 
uint8_t month {0}
 
uint8_t day {0}
 
uint8_t hour {0}
 UTC.
 
uint8_t minute {0}
 
uint8_t second {0}
 
uint8_t satellites {0}
 
uint16_t updated {0}
 GPSField bits set by the last sentence.
 
uint16_t valid {0}
 GPSField bits set by any sentence so far.
 

Detailed Description

Values from GGA and RMC sentences as scaled integers; a name ending in eN is the value times 10^N.

Definition at line 29 of file nmea.h.

Member Function Documentation

◆ altitude()

float esphome::gps::GPSData::altitude ( ) const
inline

Definition at line 58 of file nmea.h.

◆ course()

float esphome::gps::GPSData::course ( ) const
inline

Definition at line 61 of file nmea.h.

◆ geoid_separation()

float esphome::gps::GPSData::geoid_separation ( ) const
inline

Definition at line 64 of file nmea.h.

◆ has()

bool esphome::gps::GPSData::has ( GPSField field) const
inline

Definition at line 52 of file nmea.h.

◆ hdop()

float esphome::gps::GPSData::hdop ( ) const
inline

Definition at line 62 of file nmea.h.

◆ is_updated()

bool esphome::gps::GPSData::is_updated ( GPSField field) const
inline

Definition at line 53 of file nmea.h.

◆ latitude()

float esphome::gps::GPSData::latitude ( ) const
inline

Definition at line 56 of file nmea.h.

◆ longitude()

float esphome::gps::GPSData::longitude ( ) const
inline

Definition at line 57 of file nmea.h.

◆ speed_kmh()

float esphome::gps::GPSData::speed_kmh ( ) const
inline

Definition at line 60 of file nmea.h.

◆ speed_knots()

float esphome::gps::GPSData::speed_knots ( ) const
inline

Definition at line 59 of file nmea.h.

Field Documentation

◆ altitude_e3

int32_t esphome::gps::GPSData::altitude_e3 {0}

meters above mean sea level

Definition at line 32 of file nmea.h.

◆ course_e2

uint16_t esphome::gps::GPSData::course_e2 {0}

degrees from true north

Definition at line 37 of file nmea.h.

◆ day

uint8_t esphome::gps::GPSData::day {0}

Definition at line 44 of file nmea.h.

◆ geoid_separation_e3

int32_t esphome::gps::GPSData::geoid_separation_e3 {0}

meters from the WGS84 ellipsoid up to mean sea level

Definition at line 34 of file nmea.h.

◆ hdop_e2

uint16_t esphome::gps::GPSData::hdop_e2 {0}

Definition at line 38 of file nmea.h.

◆ hour

uint8_t esphome::gps::GPSData::hour {0}

UTC.

Definition at line 45 of file nmea.h.

◆ latitude_e7

int32_t esphome::gps::GPSData::latitude_e7 {0}

degrees, north positive

Definition at line 30 of file nmea.h.

◆ longitude_e7

int32_t esphome::gps::GPSData::longitude_e7 {0}

degrees, east positive

Definition at line 31 of file nmea.h.

◆ millisecond

uint16_t esphome::gps::GPSData::millisecond {0}

of the time; 0 when the time has no fraction

Definition at line 41 of file nmea.h.

◆ minute

uint8_t esphome::gps::GPSData::minute {0}

Definition at line 46 of file nmea.h.

◆ month

uint8_t esphome::gps::GPSData::month {0}

Definition at line 43 of file nmea.h.

◆ satellites

uint8_t esphome::gps::GPSData::satellites {0}

Definition at line 48 of file nmea.h.

◆ second

uint8_t esphome::gps::GPSData::second {0}

Definition at line 47 of file nmea.h.

◆ speed_e3

uint32_t esphome::gps::GPSData::speed_e3 {0}

knots

Definition at line 36 of file nmea.h.

◆ updated

uint16_t esphome::gps::GPSData::updated {0}

GPSField bits set by the last sentence.

Definition at line 49 of file nmea.h.

◆ valid

uint16_t esphome::gps::GPSData::valid {0}

GPSField bits set by any sentence so far.

Definition at line 50 of file nmea.h.

◆ year

uint16_t esphome::gps::GPSData::year {0}

Definition at line 39 of file nmea.h.


The documentation for this struct was generated from the following file: