10void GPS::dump_config() {
11 ESP_LOGCONFIG(TAG,
"GPS:");
12 LOG_SENSOR(
" ",
"Latitude", this->latitude_sensor_);
13 LOG_SENSOR(
" ",
"Longitude", this->longitude_sensor_);
14 LOG_SENSOR(
" ",
"Speed", this->speed_sensor_);
15 LOG_SENSOR(
" ",
"Course", this->course_sensor_);
16 LOG_SENSOR(
" ",
"Altitude", this->altitude_sensor_);
17 LOG_SENSOR(
" ",
"Satellites", this->satellites_sensor_);
18 LOG_SENSOR(
" ",
"HDOP", this->hdop_sensor_);
22 PUBLISH_STATE(this->latitude_sensor_, this->
latitude_);
24 PUBLISH_STATE(this->longitude_sensor_, this->
longitude_);
26 PUBLISH_STATE(this->speed_sensor_, this->
speed_);
28 PUBLISH_STATE(this->course_sensor_, this->
course_);
30 PUBLISH_STATE(this->altitude_sensor_, this->
altitude_);
32 PUBLISH_STATE(this->satellites_sensor_, this->
satellites_);
34 PUBLISH_STATE(this->hdop_sensor_, this->
hdop_);
39 if (!this->
tiny_gps_.encode(this->read())) {
42 if (this->
tiny_gps_.location.isUpdated()) {
50 ESP_LOGV(TAG,
"Speed: %.3f km/h", this->
speed_);
55 ESP_LOGV(TAG,
"Course: %.2f°", this->
course_);
58 if (this->
tiny_gps_.altitude.isUpdated()) {
60 ESP_LOGV(TAG,
"Altitude: %.2f m", this->
altitude_);
63 if (this->
tiny_gps_.satellites.isUpdated()) {
70 ESP_LOGV(TAG,
"HDOP: %.3f", this->
hdop_);
73#ifdef GPS_LISTENER_COUNT