forked from Archive/PX4-Autopilot
gps: more cleanup, some more info in 'gps status'
This commit is contained in:
parent
8d6a47546a
commit
42f930908f
|
@ -321,15 +321,15 @@ GPS::task_main()
|
|||
|
||||
switch (_mode) {
|
||||
case GPS_DRIVER_MODE_UBX:
|
||||
mode_str = "ubx";
|
||||
mode_str = "UBX";
|
||||
break;
|
||||
|
||||
case GPS_DRIVER_MODE_MTK:
|
||||
mode_str = "mtk";
|
||||
mode_str = "MTK";
|
||||
break;
|
||||
|
||||
case GPS_DRIVER_MODE_NMEA:
|
||||
mode_str = "nmea";
|
||||
mode_str = "NMEA";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -371,7 +371,7 @@ GPS::task_main()
|
|||
|
||||
}
|
||||
|
||||
debug("exiting");
|
||||
warnx("exiting");
|
||||
|
||||
::close(_serial_fd);
|
||||
|
||||
|
@ -411,9 +411,10 @@ GPS::print_info()
|
|||
warnx("port: %s, baudrate: %d, status: %s", _port, _baudrate, (_healthy) ? "OK" : "NOT OK");
|
||||
|
||||
if (_report.timestamp_position != 0) {
|
||||
warnx("position lock: %dD, last update %4.2f seconds ago", (int)_report.fix_type,
|
||||
(double)((float)(hrt_absolute_time() - _report.timestamp_position) / 1000000.0f));
|
||||
warnx("position lock: %dD, satellites: %d, last update: %fms ago", (int)_report.fix_type,
|
||||
_report.satellites_visible, (hrt_absolute_time() - _report.timestamp_position) / 1000.0f);
|
||||
warnx("lat: %d, lon: %d, alt: %d", _report.lat, _report.lon, _report.alt);
|
||||
warnx("eph: %.2fm, epv: %.2fm", _report.eph_m, _report.epv_m);
|
||||
warnx("rate position: \t%6.2f Hz", (double)_Helper->get_position_update_rate());
|
||||
warnx("rate velocity: \t%6.2f Hz", (double)_Helper->get_velocity_update_rate());
|
||||
warnx("rate publication:\t%6.2f Hz", (double)_rate);
|
||||
|
|
Loading…
Reference in New Issue