*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
ao_gps_lexchar();
i = ao_gps_decimal(0xff);
- if (i <= 50) {
- i = (uint8_t) 5 * i;
+ if (i <= 25) {
+ i = (uint8_t) 10 * i;
if (ao_gps_char == '.')
- i = (i + ((uint8_t) ao_gps_decimal(1) >> 1));
+ i = (i + ((uint8_t) ao_gps_decimal(1)));
} else
i = 255;
ao_gps_next.hdop = i;
ao_gps_skip_field();
- ao_gps_next.altitude = ao_gps_decimal(0xff);
+ AO_TELEMETRY_LOCATION_SET_ALTITUDE(&ao_gps_next, ao_gps_decimal(0xff));
+
ao_gps_skip_field(); /* skip any fractional portion */
ao_nmea_finish();