*
* 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
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altoslib_5;
+package org.altusmetrum.altoslib_11;
import java.text.*;
final static String AO_TELEM_SAT_SVID = "s_v";
final static String AO_TELEM_SAT_C_N_0 = "s_c";
+ public int tick;
+ public int serial;
+ public int rssi;
+ public int status;
+
+ public int tick() { return tick; }
+ public int serial() { return serial; }
+
+ public int rssi() { return rssi; }
+ public int status() { return status; }
+
public int version;
public String callsign;
public int flight;
flight = map.get_int(AO_TELEM_FLIGHT, AltosLib.MISSING);
rssi = map.get_int(AO_TELEM_RSSI, AltosLib.MISSING);
state = AltosLib.state(map.get_string(AO_TELEM_STATE, "invalid"));
- tick = map.get_int(AO_TELEM_TICK, 0);
/* raw sensor values */
accel = map.get_int(AO_TELEM_RAW_ACCEL, AltosLib.MISSING);
* Given a hex dump of a legacy telemetry line, construct an AltosRecordTM from that
*/
- int[] bytes;
int adjust;
/*
static final int AO_GPS_DATE_VALID = (1 << 6);
static final int AO_GPS_COURSE_VALID = (1 << 7);
- public AltosTelemetryLegacy(int[] in_bytes) {
- bytes = in_bytes;
+ public AltosTelemetryLegacy(int[] in_bytes) throws AltosCRCException {
+ super(in_bytes);
+
version = 4;
adjust = 0;
} else
serial = uint16(0);
+ rssi = super.rssi();
callsign = string(62, 8);
flight = uint16(2);
state = uint8(4);