Commit 6b93658d authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

Log ground speed instead of air speed

parent a18ad6d3
......@@ -146,14 +146,11 @@ int mavsdk_start(const char * url, const char * log_file, int timeout) {
log("Subscribing to raw GPS...");
telemetry->subscribe_raw_gps([](Telemetry::RawGps gps) {
std::ostringstream oss;
Telemetry::FixedwingMetrics metrics = telemetry->fixedwing_metrics();
Telemetry::Position position = telemetry->position();
oss << (gps.timestamp_us - init_timestamp) / 1000 << ";"
<< gps.latitude_deg << ";" << gps.longitude_deg << ";"
<< gps.absolute_altitude_m << ";" << position.relative_altitude_m << ";"
<< gps.absolute_altitude_m << ";" << telemetry->position().relative_altitude_m << ";"
<< telemetry->attitude_euler().yaw_deg << ";"
<< metrics.airspeed_m_s << ";" << metrics.climb_rate_m_s;
<< gps.velocity_m_s << ";" << telemetry->fixedwing_metrics().climb_rate_m_s;
log(oss.str());
});
}
......@@ -182,7 +179,7 @@ int mavsdk_start(const char * url, const char * log_file, int timeout) {
log("MAVSDK started...");
mavsdk_started = 1;
log("timestamp;latitude;longitude;AMSL (m);rel altitude (m);yaw(°);air speed (m/s);climb rate(m/s)");
log("timestamp (ms);latitude (°);longitude (°);AMSL (m);rel altitude (m);yaw (°);ground speed (m/s);climb rate (m/s)");
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment