#include <Gps.h>
Public Member Functions | |
MyGps () | |
void | clear () |
bool | setRunStatus (const String &data) |
bool | setFixStatus (const String &data) |
bool | setDateTime (const String &data) |
bool | setLatitude (const String &data) |
bool | setLongitude (const String &data) |
bool | setAltitude (const String &data) |
bool | setSpeed (const String &data) |
bool | setCourse (const String &data) |
bool | setFixMode (const String &data) |
bool | setHdop (const String &data) |
bool | setPdop (const String &data) |
bool | setVdop (const String &data) |
bool | setSatellitesInView (const String &data) |
bool | setSatellitesUsed (const String &data) |
String | longitudeString () |
String | latitudeString () |
String | altitudeString () |
String | kmphString () |
String | satellitesString () |
String | courseString () |
bool | getAsGpsJson (char *gpsJson) |
Data Fields | |
bool | runStatus |
Is the gps modul running? | |
bool | fixStatus |
Are the gps is valid received? | |
MyDate | date |
The received gps utc date. | |
MyTime | time |
The received gps utc time. | |
MyLocation | location |
The gps position. | |
double | altitude |
The current height. | |
double | speed |
The detected moving speed. | |
double | course |
The calculated course. | |
int | fixMode |
Precission of the gps data. | |
double | pdop |
Dilution of precision. | |
double | hdop |
Horizontal dilution of precision. | |
double | vdop |
Vertical dilution of precision. | |
int | satellitesInView |
Sattelites in the View. | |
int | satellitesUsed |
Sattelites used for gps position. | |
Protected Member Functions | |
bool | parse (bool &b, const String &data) |
bool | parse (int &i, const String &data) |
bool | parse (double &d, const String &data) |
GPS data class with all the data items from the GPS message from the SIM808 module
String MyGps::altitudeString | ( | ) |
Returns the altitude as a string
Definition at line 552 of file Gps.h.
References altitude.
Referenced by MySmsCmd::cmdStatus(), getAsGpsJson(), MyGsmGps::getGps(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
void MyGps::clear | ( | ) |
Reset the values.
Definition at line 408 of file Gps.h.
References altitude, MyLocation::clear(), MyDate::clear(), MyTime::clear(), course, date, fixMode, fixStatus, hdop, location, pdop, runStatus, satellitesInView, satellitesUsed, speed, time, and vdop.
Referenced by MyGsmSim808::getGps(), and MyGsmSim808::getGsmGps().
String MyGps::courseString | ( | ) |
Returns the course as a string
Definition at line 570 of file Gps.h.
References course.
Referenced by MyGsmGps::getGps(), and MyWebServer::handleLoadInfoInfo().
bool MyGps::getAsGpsJson | ( | char * | gpsJson | ) |
Returns the core gps data as json array
Definition at line 576 of file Gps.h.
References altitudeString(), fixStatus, kmphString(), latitudeString(), and longitudeString().
Referenced by MyMqtt::handleClient().
String MyGps::kmphString | ( | ) |
Returns the kmph as a string
Definition at line 558 of file Gps.h.
References speed.
Referenced by MySmsCmd::cmdStatus(), getAsGpsJson(), MyGsmGps::getGps(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
String MyGps::latitudeString | ( | ) |
Returns the latitude as a string
Definition at line 546 of file Gps.h.
References MyLocation::latitudeString(), and location.
Referenced by getAsGpsJson(), MySmsCmd::getGoogleMapGpsUrl(), MyGsmGps::getGps(), MyGsmGps::getGpsFromGsm(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
String MyGps::longitudeString | ( | ) |
Returns the longitude as a string
Definition at line 540 of file Gps.h.
References location, and MyLocation::longitudeString().
Referenced by getAsGpsJson(), MySmsCmd::getGoogleMapGpsUrl(), MyGsmGps::getGps(), MyGsmGps::getGpsFromGsm(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
|
protected |
Parse a bool value from a string '0' or '1'
Definition at line 427 of file Gps.h.
Referenced by setAltitude(), setCourse(), setDateTime(), setFixMode(), setFixStatus(), setHdop(), setPdop(), setRunStatus(), setSatellitesInView(), setSatellitesUsed(), setSpeed(), and setVdop().
|
protected |
|
protected |
String MyGps::satellitesString | ( | ) |
Returns the satellites as a string
Definition at line 564 of file Gps.h.
References satellitesUsed.
Referenced by MySmsCmd::cmdStatus(), MyGsmGps::getGps(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().
bool MyGps::setAltitude | ( | const String & | data | ) |
Sets the altitude from the data string
Definition at line 486 of file Gps.h.
References altitude, and parse().
Referenced by MyGsmSim808::getGps().
bool MyGps::setCourse | ( | const String & | data | ) |
Sets the course value from the data string
Definition at line 498 of file Gps.h.
References course, and parse().
Referenced by MyGsmSim808::getGps().
bool MyGps::setDateTime | ( | const String & | data | ) |
Sets the date and time from the data string
Definition at line 466 of file Gps.h.
References MyDate::date, date, parse(), MyTime::time, and time.
Referenced by MyGsmSim808::getGps(), and MyGsmSim808::getGsmGps().
bool MyGps::setFixMode | ( | const String & | data | ) |
Sets the fix mode from the data string
Definition at line 504 of file Gps.h.
References fixMode, and parse().
Referenced by MyGsmSim808::getGps().
bool MyGps::setFixStatus | ( | const String & | data | ) |
Sets the fix status from the data string
Definition at line 460 of file Gps.h.
References fixStatus, and parse().
Referenced by MyGsmSim808::getGps().
bool MyGps::setHdop | ( | const String & | data | ) |
Sets the hdop mode from the data string
Definition at line 516 of file Gps.h.
Referenced by MyGsmSim808::getGps().
bool MyGps::setLatitude | ( | const String & | data | ) |
Set the latitude from the data string
Definition at line 474 of file Gps.h.
References MyLocation::latitude_, location, and MyDegrees::set().
Referenced by MyGsmSim808::getGps(), and MyGsmSim808::getGsmGps().
bool MyGps::setLongitude | ( | const String & | data | ) |
Sets the longitude from the data string
Definition at line 480 of file Gps.h.
References location, MyLocation::longitude_, and MyDegrees::set().
Referenced by MyGsmSim808::getGps(), and MyGsmSim808::getGsmGps().
bool MyGps::setPdop | ( | const String & | data | ) |
Sets the pdop mode from the data string
Definition at line 510 of file Gps.h.
Referenced by MyGsmSim808::getGps().
bool MyGps::setRunStatus | ( | const String & | data | ) |
Sets the run status from the data string
Definition at line 454 of file Gps.h.
References parse(), and runStatus.
Referenced by MyGsmSim808::getGps().
bool MyGps::setSatellitesInView | ( | const String & | data | ) |
Sets the satellites in view value from the data string
Definition at line 528 of file Gps.h.
References parse(), and satellitesInView.
Referenced by MyGsmSim808::getGps().
bool MyGps::setSatellitesUsed | ( | const String & | data | ) |
Sets the satellites used value from the data string
Definition at line 534 of file Gps.h.
References parse(), and satellitesUsed.
Referenced by MyGsmSim808::getGps().
bool MyGps::setSpeed | ( | const String & | data | ) |
Sets the speed value from the data string
Definition at line 492 of file Gps.h.
References parse(), and speed.
Referenced by MyGsmSim808::getGps().
bool MyGps::setVdop | ( | const String & | data | ) |
Sets the vdop mode from the data string
Definition at line 522 of file Gps.h.
Referenced by MyGsmSim808::getGps().