40 bool set(
const String &data);
54 static double distanceBetween(
double lat1,
double long1,
double lat2,
double long2);
55 static double courseTo(
double lat1,
double long1,
double lat2,
double long2);
148 bool parse(
bool &b,
const String &data);
149 bool parse(
int &i,
const String &data);
150 bool parse(
double &d,
const String &data);
166 bool setHdop (
const String &data);
167 bool setPdop (
const String &data);
168 bool setVdop (
const String &data);
194 : predecimal(myDegrees.predecimal)
195 , billionths(myDegrees.billionths)
196 , negative(myDegrees.negative)
219 const char *term = data.c_str();
220 uint32_t multiplier = 1000000000UL;
221 uint32_t leftOfDecimal = (uint32_t) atol(term);
226 while (isdigit(*term)) {
231 while (isdigit(*++term)) {
255 double delta = radians(long1 - long2);
256 double sdlong = sin(delta);
257 double cdlong = cos(delta);
258 lat1 = radians(lat1);
259 lat2 = radians(lat2);
260 double slat1 = sin(lat1);
261 double clat1 = cos(lat1);
262 double slat2 = sin(lat2);
263 double clat2 = cos(lat2);
264 delta = (clat1 * slat2) - (slat1 * clat2 * cdlong);
266 delta += sq(clat2 * sdlong);
268 double denom = (slat1 * slat2) + (clat1 * clat2 * cdlong);
269 delta = atan2(delta, denom);
270 return delta * 6372795;
280 double dlon = radians(long2 - long1);
281 lat1 = radians(lat1);
282 lat2 = radians(lat2);
283 double a1 = sin(dlon) * cos(lat2);
284 double a2 = sin(lat1) * cos(lat2) * cos(dlon);
285 a2 = cos(lat1) * sin(lat2) - a2;
345 return (
date / 100) % 100;
357 return String(
day()) +
'-' + String(
month()) +
'-' + String(
year());
375 return (
time / 100) % 100;
402 , satellitesInView(0)
429 if (data == F(
"0")) {
432 }
else if (data == F(
"1")) {
442 i = atol(data.c_str());
449 d = atof(data.c_str());
560 return String(
speed, 0);
588 gps.toCharArray(gpsJson, (gps.length() + 1));
uint16_t predecimal
Value on the left side of the separator.
bool set(const String &data)
bool setLongitude(const String &data)
bool setAltitude(const String &data)
double vdop
Vertical dilution of precision.
bool parse(bool &b, const String &data)
bool setHdop(const String &data)
uint32_t billionths
Value of the right side after the separator.
MyDegrees latitude_
Latitude.
bool setCourse(const String &data)
bool negative
Is the value negative?
bool setVdop(const String &data)
static double distanceBetween(double lat1, double long1, double lat2, double long2)
double altitude
The current height.
int time
Time in the form of HoursMinutesSecons i.e. 120135.
bool setRunStatus(const String &data)
int date
Date in the form of YearMonthDay i.e. 20170115.
double pdop
Dilution of precision.
String satellitesString()
bool setSatellitesInView(const String &data)
int fixMode
Precission of the gps data.
bool setDateTime(const String &data)
bool setSatellitesUsed(const String &data)
double hdop
Horizontal dilution of precision.
int satellitesInView
Sattelites in the View.
bool getAsGpsJson(char *gpsJson)
double distanceTo(MyLocation &location)
MyLocation location
The gps position.
int satellitesUsed
Sattelites used for gps position.
MyDate date
The received gps utc date.
bool setFixMode(const String &data)
MyDegrees longitude_
Longitude.
bool setSpeed(const String &data)
bool setLatitude(const String &data)
double speed
The detected moving speed.
bool setPdop(const String &data)
MyTime time
The received gps utc time.
bool fixStatus
Are the gps is valid received?
static double courseTo(double lat1, double long1, double lat2, double long2)
bool setFixStatus(const String &data)
double course
The calculated course.
bool runStatus
Is the gps modul running?