doc/telemetrum.html
doc/telemetrum.pdf
altosui/altos-windows.log
+pdclib-root
public void update_ui(AltosState state, AltosGreatCircle from_receiver, Location receiver) {
if (state != null) {
mBatteryVoltageView.setText(AltosDroid.number("%4.2f V", state.battery_voltage));
- mBatteryLights.set(state.battery_voltage > 3.7, state.battery_voltage == AltosLib.MISSING);
+ mBatteryLights.set(state.battery_voltage >= AltosLib.ao_battery_good, state.battery_voltage == AltosLib.MISSING);
mApogeeVoltageView.setText(AltosDroid.number("%4.2f V", state.apogee_voltage));
- mApogeeLights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING);
+ mApogeeLights.set(state.apogee_voltage >= AltosLib.ao_igniter_good, state.apogee_voltage == AltosLib.MISSING);
mMainVoltageView.setText(AltosDroid.number("%4.2f V", state.main_voltage));
- mMainLights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING);
+ mMainLights.set(state.main_voltage >= AltosLib.ao_igniter_good, state.main_voltage == AltosLib.MISSING);
if (state.flight != 0) {
if (state.state <= AltosLib.ao_flight_pad)
public void start() {
eeprom_thread = new Thread(this);
+ monitor.set_thread(eeprom_thread);
eeprom_thread.start();
}
monitor.set_states(AltosLib.ao_flight_boost, AltosLib.ao_flight_landed);
- monitor.set_thread(eeprom_thread);
monitor.start();
}
}
}
public void abort() throws InterruptedException {
- System.out.printf("Attempting to abort monitor thread\n");
while (isAlive()) {
- System.out.printf("Interrupting\n");
interrupt();
link.abort_reply();
Thread.sleep(100);
}
- System.out.printf("Appears to be dead now\n");
join();
}
/* Bluetooth "identifier" (bluetooth sucks) */
public final static String bt_product_telebt = "TeleBT";
+ /* "good" voltages */
+
+ public final static double ao_battery_good = 3.8;
+ public final static double ao_igniter_good = 3.5;
+
/* Telemetry modes */
public static final int ao_telemetry_off = 0;
public static final int ao_telemetry_min = 1;
}
public boolean parse_line(String line) {
- System.out.printf ("parse %s\n", line);
String[] items = line.split("\\s+");
if (line.startsWith("Pressure:")) {
if (items.length >= 2) {
raw_pres = Integer.parseInt(items[1]);
- System.out.printf ("raw_pres %d\n", raw_pres);
}
} else if (line.startsWith("Temperature:")) {
if (items.length >= 2)
if (items.length >= 3)
reserved = Integer.parseInt(items[2]);
} else if (line.startsWith("ms5607 sens:")) {
- System.out.printf ("found sens length %d\n", items.length);
if (items.length >= 3) {
sens = Integer.parseInt(items[2]);
- System.out.printf ("sens %d\n", sens);
}
} else if (line.startsWith("ms5607 off:")) {
if (items.length >= 3)
throw new TimeoutException();
}
if (!parse_line(line)) {
- System.out.printf ("stop parsing at %s\n", line);
break;
}
}
- System.out.printf ("sens %d off %d tcs %d tco %d tref %d tempsens %d crc %d pres %d temp %d\n",
- sens, off, tcs, tco, tref, tempsens, crc, raw_pres, raw_temp);
convert();
- System.out.printf ("pa %d cc %d\n", pa, cc);
}
}
public AltosTelemetryReader (AltosLink in_link)
throws IOException, InterruptedException, TimeoutException {
link = in_link;
+ boolean success = false;
try {
log = new AltosLog(link);
name = link.name;
telemetry = AltosPreferences.telemetry(link.serial);
set_telemetry(telemetry);
link.add_monitor(telem);
+ success = true;
} finally {
- close(true);
+ if (!success)
+ close(true);
}
}
}
class Apogee extends AscentStatus {
void show (AltosState state, AltosListenerState listener_state) {
show("%4.2f V", state.apogee_voltage);
- lights.set(state.apogee_voltage > 3.7);
+ lights.set(state.apogee_voltage >= AltosLib.ao_igniter_good);
}
public Apogee (GridBagLayout layout, int y) {
super(layout, y, "Apogee Igniter Voltage");
class Main extends AscentStatus {
void show (AltosState state, AltosListenerState listener_state) {
show("%4.2f V", state.main_voltage);
- lights.set(state.main_voltage > 3.7);
+ lights.set(state.main_voltage >= AltosLib.ao_igniter_good);
}
public Main (GridBagLayout layout, int y) {
super(layout, y, "Main Igniter Voltage");
class Apogee extends DescentStatus {
void show (AltosState state, AltosListenerState listener_state) {
show("%4.2f V", state.apogee_voltage);
- lights.set(state.apogee_voltage > 3.7);
+ lights.set(state.apogee_voltage >= AltosLib.ao_igniter_good);
}
public Apogee (GridBagLayout layout, int y) {
super(layout, y, "Apogee Igniter Voltage");
class Main extends DescentStatus {
void show (AltosState state, AltosListenerState listener_state) {
show("%4.2f V", state.main_voltage);
- lights.set(state.main_voltage > 3.7);
+ lights.set(state.main_voltage >= AltosLib.ao_igniter_good);
}
public Main (GridBagLayout layout, int y) {
super(layout, y, "Main Igniter Voltage");
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
- System.out.printf("Closing idle monitor window\n");
try {
disconnect();
} catch (Exception ex) {
System.out.println(Arrays.toString(ex.getStackTrace()));
}
- System.out.printf("hiding\n");
setVisible(false);
dispose();
AltosUIPreferences.unregister_font_listener(AltosIdleMonitorUI.this);
hide();
else {
show("%4.2f V", state.battery_voltage);
- lights.set(state.battery_voltage > 3.7);
+ lights.set(state.battery_voltage >= AltosLib.ao_battery_good);
}
}
public Battery (GridBagLayout layout, int y) {
hide();
else {
show("%4.2f V", state.apogee_voltage);
- lights.set(state.apogee_voltage > 3.7);
+ lights.set(state.apogee_voltage >= AltosLib.ao_igniter_good);
}
}
public Apogee (GridBagLayout layout, int y) {
hide();
else {
show("%4.2f V", state.main_voltage);
- lights.set(state.main_voltage > 3.7);
+ lights.set(state.main_voltage >= AltosLib.ao_igniter_good);
}
}
public Main (GridBagLayout layout, int y) {
hide();
else {
show("%4.2f V", listener_state.battery);
- lights.set(listener_state.battery > 3.7);
+ lights.set(listener_state.battery > AltosLib.ao_battery_good);
}
}
public ReceiverBattery (GridBagLayout layout, int y) {
LINUX_EXTRA=altosui-fat
MACOSX_INFO_PLIST=Info.plist
-MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) ReadMe-Mac.rtf
+MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(DOC) ReadMe-Mac.rtf
MACOSX_EXTRA=$(FIRMWARE)
WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/telemetrum.inf $(WINDOWS_ICON)
mkdir macosx
cp -a AltosUI.app macosx/
cp -a ReadMe-Mac.rtf macosx/ReadMe.rtf
+ mkdir -p macosx/Doc
+ cp -a $(DOC) macosx/Doc
cp -p Info.plist macosx/AltosUI.app/Contents
mkdir -p macosx/AltOS-$(VERSION) macosx/AltosUI.app/Contents/Resources/Java
cp -p $(FATJAR) macosx/AltosUI.app/Contents/Resources/Java/altosui.jar
AC_SUBST(ARM_CC)
if test -d pdclib -a x"$HAVE_ARM_CC" = xyes; then
- PDCLIB_INCLUDES='-I$(TOPDIR)/../pdclib/opt/include'
- PDCLIB_LIBS_M0='-L$(TOPDIR)/../pdclib/opt/lib -lpdclib-cortex-m0'
- PDCLIB_LIBS_M3='-L$(TOPDIR)/../pdclib/opt/lib -lpdclib-cortex-m3'
+ PDCLIB_ROOT='$(TOPDIR)/../pdclib-root'
+ PDCLIB_INCLUDES='-I$(TOPDIR)/../pdclib-root/include'
+ PDCLIB_LIBS_M0='-L$(TOPDIR)/../pdclib-root/lib -lpdclib-cortex-m0'
+ PDCLIB_LIBS_M3='-L$(TOPDIR)/../pdclib-root/lib -lpdclib-cortex-m3'
HAVE_PDCLIB=yes
else
PDCLIB_INCLUDES=''
AC_SUBST(PDCLIB_INCLUDES)
AC_SUBST(PDCLIB_LIBS_M0)
AC_SUBST(PDCLIB_LIBS_M3)
+AC_SUBST(PDCLIB_ROOT)
AC_SUBST(HAVE_PDCLIB)
if test "x$HAVE_ARM_CC" = "xyes"; then
<para>
Finish preparing the rocket for flight. After the
previous flight data have been reported, MicroPeak waits for
- 30 seconds before starting to check for launch. This gives
+ one minute before starting to check for launch. This gives
you time to finish assembling the rocket. As those
activities might cause pressure changes inside the airframe,
MicroPeak might accidentally detect boost. If you need to do
- anything to the airframe after the 30 second window passes,
+ anything to the airframe after the one minute window passes,
make sure to be careful not to disturb the altimeter. The
- LED will remain dark during the 30 second delay, but after
+ LED will remain dark during the one minute delay, but after
that, it will start blinking once every 3 seconds.
</para>
</listitem>
<listitem>
<para>
- Fly the rocket. Once the rocket passes about 10m in height
- (32 feet), the micro-controller will record the ground
+ Fly the rocket. Once the rocket passes about 30m in height
+ (100 feet), the micro-controller will record the ground
pressure and track the pressure seen during the flight. In
this mode, the LED flickers rapidly. When the rocket lands,
and the pressure stabilizes, the micro-controller will record
<section>
<title>Lithium Battery</title>
<para>
- The CR1025 battery used by MicroPeak holes 30mAh of power,
+ The CR1025 battery used by MicroPeak holds 30mAh of power,
which is sufficient to run for over 40 hours. Because
MicroPeak powers down on landing, run time includes only time
sitting on the launch pad or during flight.
altos_putchar(file, c);
}
-main ()
+int
+main (int argc, char **argv)
{
struct altos_device device;
struct altos_list *list;
#ifdef DARWIN
+#include <unistd.h>
+
#undef USE_POLL
/* Mac OS X don't have strndup even if _GNU_SOURCE is defined */
if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) ||
!get_number (object, CFSTR(kUSBProductID), &device->product))
continue;
- if (list->ftdi) {
- if (device->vendor != 0x0403)
- continue;
- } else {
- if (device->vendor != 0xfffe)
- continue;
- if (device->product < 0x000a || 0x0013 < device->product)
- continue;
- }
if (get_string (object, CFSTR("IOCalloutDevice"), device->path, sizeof (device->path)) &&
get_string (object, CFSTR("USB Product Name"), device->name, sizeof (device->name)) &&
get_string (object, CFSTR("USB Serial Number"), serial_string, sizeof (serial_string))) {
JAVAROOT=classes
-AM_JAVACFLAGS=-encoding UTF-8 -Xlint:deprecation
+AM_JAVACFLAGS=-target 1.6 -encoding UTF-8 -Xlint:deprecation -source 6
altoslibdir=$(libdir)/altos
-Subproject commit f3165dbd639299d08033ed5eef62a21b69540a8d
+Subproject commit 8b1c9061fa3a8f1b30ee13b373afe5cc1ad9d382
PDCLIB_INCLUDES=@PDCLIB_INCLUDES@
PDCLIB_LIBS_M0=@PDCLIB_LIBS_M0@
PDCLIB_LIBS_M3=@PDCLIB_LIBS_M3@
+PDCLIB_ROOT=@PDCLIB_ROOT@
HAVE_PDCLIB=@HAVE_PDCLIB@
SDCC=@SDCC@
vpath matrix.5c kalman
include Version
+TOPDIR=.
include Makedefs
SDCCDIRS=\
rm -f altitude.h ao_kalman.h
pdclib:
- cd ../pdclib && mkdir -p opt/include opt/lib && make && make prefix=`pwd`/opt install
+ mkdir -p $(PDCLIB_ROOT)/include $(PDCLIB_ROOT)/lib
+ cd ../pdclib && make && make prefix=`pwd`/../pdclib-root install
clean-pdclib:
- cd ../pdclib && make clean && rm -rf opt
\ No newline at end of file
+ rm -rf $(PDCLIB_ROOT)
+ cd ../pdclib && make clean