gps: more cleanup, some more info in 'gps status'

This commit is contained in:
Anton Babushkin 2013-09-21 10:13:50 +02:00
parent 8d6a47546a
commit 42f930908f
1 changed files with 7 additions and 6 deletions

View File

@ -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);