9static const char *
const TAG =
"gps";
14 ESP_LOGCONFIG(TAG,
"GPS:");
49 if (this->
tiny_gps_.encode(this->read())) {
50 if (this->
tiny_gps_.location.isUpdated()) {
54 ESP_LOGD(TAG,
"Location:");
55 ESP_LOGD(TAG,
" Lat: %.6f °", this->
latitude_);
56 ESP_LOGD(TAG,
" Lon: %.6f °", this->
longitude_);
61 ESP_LOGD(TAG,
"Speed: %.3f km/h", this->
speed_);
66 ESP_LOGD(TAG,
"Course: %.2f °", this->
course_);
69 if (this->
tiny_gps_.altitude.isUpdated()) {
71 ESP_LOGD(TAG,
"Altitude: %.2f m", this->
altitude_);
74 if (this->
tiny_gps_.satellites.isUpdated()) {
81 ESP_LOGD(TAG,
"HDOP: %.3f", this->
hdop_);
sensor::Sensor * altitude_sensor_
sensor::Sensor * hdop_sensor_
sensor::Sensor * course_sensor_
std::vector< GPSListener * > listeners_
void dump_config() override
sensor::Sensor * speed_sensor_
sensor::Sensor * latitude_sensor_
sensor::Sensor * satellites_sensor_
sensor::Sensor * longitude_sensor_
TinyGPSPlus & get_tiny_gps()
TinyGPSPlus & get_tiny_gps()
void publish_state(float state)
Publish a new state to the front-end.
Providing packet encoding functions for exchanging data with a remote host.