AssetTrackerRK
All Data Structures Functions Variables Enumerations Enumerator Pages
Public Member Functions | Friends
TinyGPSLocation Struct Reference

Class to hold a location value. More...

#include <TinyGPS++.h>

Public Member Functions

bool isValid () const
 Returns true if the data is valid. More...
 
bool isUpdated () const
 Returns true if the value has been updated since last read. More...
 
uint32_t age () const
 Returns the age of the value in milliseconds. More...
 
const RawDegreesrawLat ()
 Returns the raw latitude. More...
 
const RawDegreesrawLng ()
 Returns the raw longitude. More...
 
double lat ()
 Returns the latitude in degrees as a signed double floating point value. More...
 
double lng ()
 Returns the longitude in degrees as a signed double floating point value. More...
 
void invalidate ()
 Sets the valid flag to false (marks data as invalid) More...
 
 TinyGPSLocation ()
 Constructor.
 

Friends

class TinyGPSPlus
 

Detailed Description

Class to hold a location value.

Member Function Documentation

◆ age()

uint32_t TinyGPSLocation::age ( ) const
inline

Returns the age of the value in milliseconds.

If the value is not valid, then ULONG_MAX is returned.

You might check to see if age is < 10000 to make sure the value has been retrieved in the last 10 seconds, for example.

◆ invalidate()

void TinyGPSLocation::invalidate ( )
inline

Sets the valid flag to false (marks data as invalid)

This is used internally when we get a valid GPS sentence that does not have a fix. It can be checked by using the isValid() method.

◆ isUpdated()

bool TinyGPSLocation::isUpdated ( ) const
inline

Returns true if the value has been updated since last read.

The updated flag is set to false after reading data (lag, lng, rawLat, rawLng) and is set to true when a valid location is received from the GPS.

◆ isValid()

bool TinyGPSLocation::isValid ( ) const
inline

Returns true if the data is valid.

The valid flag will be false if the GPS loses its fix, but will not be invalidated if the GPS stops returning data. If that is a possibility, you should also check the age.

◆ lat()

double TinyGPSLocation::lat ( )

Returns the latitude in degrees as a signed double floating point value.

Positive values are for north latitude. Negative values are for south latitude. Valid values are 0 <= lat() < 360.0

This method is not const because it clears the updated flag.

◆ lng()

double TinyGPSLocation::lng ( )

Returns the longitude in degrees as a signed double floating point value.

Positive values are for west longitude. Negative values are for east longitude. Valid values are 0 <= lng() < 360.0

This method is not const because it clears the updated flag.

◆ rawLat()

const RawDegrees& TinyGPSLocation::rawLat ( )
inline

Returns the raw latitude.

The raw latitude separates out the whole part (in degrees), billionths of a degree, and sign, instead of using a double floating point number.

This method is not const because it clears the updated flag.

◆ rawLng()

const RawDegrees& TinyGPSLocation::rawLng ( )
inline

Returns the raw longitude.

The raw latitude separates out the whole part (in degrees), billionths of a degree, and sign, instead of using a double floating point number.

This method is not const because it clears the updated flag.


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