fw/altos
6 years agoa few tweaks to the Releasing document based on experience with 1.8.1
Bdale Garbee [Mon, 28 Aug 2017 20:01:54 +0000 (14:01 -0600)]
a few tweaks to the Releasing document based on experience with 1.8.1

6 years agoVersion 1.8.1
Keith Packard [Mon, 28 Aug 2017 05:49:09 +0000 (22:49 -0700)]
Version 1.8.1

Android version 15

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agodoc: Update for 1.8.1
Keith Packard [Mon, 28 Aug 2017 05:48:46 +0000 (22:48 -0700)]
doc: Update for 1.8.1

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Don't compute filtered average of height error when HAS_ACCEL
Keith Packard [Mon, 28 Aug 2017 07:15:43 +0000 (00:15 -0700)]
altos: Don't compute filtered average of height error when HAS_ACCEL

We only use this for baro-only devices to avoid firing drogue charges
at mach transitions; we trust the combination of accel+baro to do the
right thing when available.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Fix freq preference loading
Keith Packard [Mon, 28 Aug 2017 07:10:04 +0000 (00:10 -0700)]
altoslib: Fix freq preference loading

Allocate throw-away freq array to get the class pointer.
Add null-ary AltosFrequency constructor for JSON code.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Make --oneline show drogue deploy speed
Keith Packard [Mon, 28 Aug 2017 00:37:10 +0000 (17:37 -0700)]
altosui: Make --oneline show drogue deploy speed

Also remove some commented out values.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Compute speed at entry to each state
Keith Packard [Mon, 28 Aug 2017 00:35:49 +0000 (17:35 -0700)]
altoslib: Compute speed at entry to each state

Useful to have drogue/main deployment speeds

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Fix parsing of old TM log GPS sat data
Keith Packard [Mon, 28 Aug 2017 00:34:49 +0000 (17:34 -0700)]
altoslib: Fix parsing of old TM log GPS sat data

Attempting to fetch sat data from wrong byte led to array bounds
exception.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Allow for missing product when checking for mma655x inverted
Keith Packard [Mon, 28 Aug 2017 00:34:07 +0000 (17:34 -0700)]
altoslib: Allow for missing product when checking for mma655x inverted

If there's no product, assume we've got some ancient log file.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Remove debug printf for gyro adjust
Keith Packard [Mon, 28 Aug 2017 00:33:38 +0000 (17:33 -0700)]
altoslib: Remove debug printf for gyro adjust

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/test: Fake baro data for flight 12 serial 2093
Keith Packard [Mon, 28 Aug 2017 00:32:27 +0000 (17:32 -0700)]
altos/test: Fake baro data for flight 12 serial 2093

This flight had a baro spike due to an accidental drogue charge firing
but is otherwise quite useful when testing for various mach delay
effects, so fake out the data during that spike.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/test: Integrate raw accel to provide speed for comparison
Keith Packard [Mon, 28 Aug 2017 00:30:15 +0000 (17:30 -0700)]
altos/test: Integrate raw accel to provide speed for comparison

This can provide a useful visualization of the 'true' vs 'kalman'
speed value, as the kalman is necessarily delayed due to the model
assuming constant acceleration.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/test: telemetrum baro data is inverted before being written to eeprom
Keith Packard [Mon, 28 Aug 2017 00:04:27 +0000 (17:04 -0700)]
altos/test: telemetrum baro data is inverted before being written to eeprom

No need for the test code to invert it during replay

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Don't eliminate baro above mach speed, just trust it less
Keith Packard [Sun, 27 Aug 2017 02:16:47 +0000 (19:16 -0700)]
altos: Don't eliminate baro above mach speed, just trust it less

Instead of completely eliminating the baro sensor above mach speed,
just derate it a bit so that the accel will dominate for speed
computation and keep the device from false-triggering across mach
transitions.

When we completely ignored the baro sensor above mach, and the flight
spent considerable time in that speed range, then the estimated height
could be far from the real value. When the estimated speed dropped
back down and the baro values were brought back into the computation,
then the resulting rapid shift in estimated speed could trigger
accidental apogee detection.

By mixing in a bit of baro data even above mach, we keep the estimated
height closer to the baro value and prevent this error, at least in
flights measured so far.

The flight known to have this problem is:

2015-09-26-serial-2093-flight-0012.eeprom

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Eliminate separate height error filter for accelerometer devices
Keith Packard [Sun, 27 Aug 2017 23:57:13 +0000 (16:57 -0700)]
altos: Eliminate separate height error filter for accelerometer devices

We don't use the error value in flight for those models anyways; it's
only useful on baro-only hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Add --oneline mode to briefly summarize flights
Keith Packard [Sun, 27 Aug 2017 02:15:59 +0000 (19:15 -0700)]
altosui: Add --oneline mode to briefly summarize flights

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Add "Huge" font size
Keith Packard [Sun, 27 Aug 2017 02:15:07 +0000 (19:15 -0700)]
altosuilib: Add "Huge" font size

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agomicropeak: Track font changes in raw data display
Keith Packard [Sun, 27 Aug 2017 02:14:10 +0000 (19:14 -0700)]
micropeak: Track font changes in raw data display

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Perform time comparisons using 16-bit arithmetic to handle wrap
Keith Packard [Thu, 24 Aug 2017 23:45:54 +0000 (16:45 -0700)]
altos: Perform time comparisons using 16-bit arithmetic to handle wrap

Subtracting two 16-bit unsigned values to perform time comparisons
yields mystic results unless we carefully cast that to int16_t.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoinstall: Add 'fat-install' target
Keith Packard [Sat, 12 Aug 2017 05:37:07 +0000 (01:37 -0400)]
install: Add 'fat-install' target

This uses the existing --with-fat-dir option and instead of installing
everything to that directory, creates a normal ikiwiki hierarchy of
files including .mdwn files, whacked release notes html files and all
of the appropriate packages.

One stop shopping for adding the release to the web site.

Attempted to update Releasing file to match.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoreleasing 1.8 1.8
Bdale Garbee [Sat, 12 Aug 2017 04:23:27 +0000 (00:23 -0400)]
releasing 1.8

6 years agoupdate docinfo file for 1.8 release
Bdale Garbee [Sat, 12 Aug 2017 04:21:43 +0000 (00:21 -0400)]
update docinfo file for 1.8 release

6 years agoNote that telebt 4.0 files need to go to altusmetrumllc dir
Keith Packard [Sat, 12 Aug 2017 04:10:23 +0000 (00:10 -0400)]
Note that telebt 4.0 files need to go to altusmetrumllc dir

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoBump version to 1.8
Keith Packard [Sat, 12 Aug 2017 04:06:48 +0000 (00:06 -0400)]
Bump version to 1.8

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agodoc: Add 1.8 release notes
Keith Packard [Sat, 12 Aug 2017 04:06:26 +0000 (00:06 -0400)]
doc: Add 1.8 release notes

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui, telegps: Add TeleBT v4.0 firmware to app packages
Keith Packard [Sat, 12 Aug 2017 04:05:50 +0000 (00:05 -0400)]
altosui, telegps: Add TeleBT v4.0 firmware to app packages

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoMerge remote-tracking branch 'origin/master'
Keith Packard [Sat, 12 Aug 2017 03:45:25 +0000 (23:45 -0400)]
Merge remote-tracking branch 'origin/master'

6 years agoao-bringup: Allow dfu_util to "fail" while flashing chaoskey
Keith Packard [Sat, 12 Aug 2017 03:40:41 +0000 (23:40 -0400)]
ao-bringup: Allow dfu_util to "fail" while flashing chaoskey

Sometimes it isn't happy about the exit status, but if the device
comes up and works OK, we don't care.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Set time in state for KML output correctly
Keith Packard [Sat, 12 Aug 2017 03:39:13 +0000 (23:39 -0400)]
altoslib: Set time in state for KML output correctly

Use new computed state_time value.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agolibaltos: Test both bluetooth and USB APIs with cjnitest
Keith Packard [Sun, 23 Jul 2017 23:49:26 +0000 (16:49 -0700)]
libaltos: Test both bluetooth and USB APIs with cjnitest

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/test: Fix AES key format in test code
Keith Packard [Sun, 23 Jul 2017 23:47:40 +0000 (16:47 -0700)]
altos/test: Fix AES key format in test code

Use temp variable instead of stepping on the AES name.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/test: Fix printf format for int64 arithmetic test
Keith Packard [Sun, 23 Jul 2017 23:46:24 +0000 (16:46 -0700)]
altos/test: Fix printf format for int64 arithmetic test

Use 'long long' and %lld for 64-bit values when printing.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Rename AltosConfig -> AltosConfigFC
Keith Packard [Sun, 23 Jul 2017 23:37:27 +0000 (16:37 -0700)]
altosui: Rename AltosConfig -> AltosConfigFC

Now the class name says that this configures the flight computer.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Adapt to flight stats time value changes
Keith Packard [Sun, 23 Jul 2017 23:38:09 +0000 (16:38 -0700)]
altosui: Adapt to flight stats time value changes

There aren't state time values anymore as those don't work when you
have multiple motors. Instead, 'boost_time' is when the rocket left
the pad and 'landed_time' is when it touched down. Use these new
values in the --summary output.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoadd TeleBT v4.0 to the list of stuff we build
Bdale Garbee [Fri, 21 Jul 2017 23:49:21 +0000 (17:49 -0600)]
add TeleBT v4.0 to the list of stuff we build

6 years agoignore more build products in telebt-v4.0 tree
Bdale Garbee [Fri, 21 Jul 2017 23:46:55 +0000 (17:46 -0600)]
ignore more build products in telebt-v4.0 tree

6 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Fri, 21 Jul 2017 23:44:03 +0000 (17:44 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

6 years agoclean up telefireone name references
Bdale Garbee [Fri, 21 Jul 2017 23:43:38 +0000 (17:43 -0600)]
clean up telefireone name references

6 years agorename existing turnon_telebt script, create a new one for v4.0
Bdale Garbee [Fri, 21 Jul 2017 23:42:54 +0000 (17:42 -0600)]
rename existing turnon_telebt script, create a new one for v4.0

6 years agolibaltos: Add btle test program
Keith Packard [Fri, 21 Jul 2017 23:16:55 +0000 (16:16 -0700)]
libaltos: Add btle test program

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/test: Add EasyMini test mode
Keith Packard [Fri, 21 Jul 2017 23:14:31 +0000 (16:14 -0700)]
altos/test: Add EasyMini test mode

Use baro-only mode, parse easymini logs.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: fix adjustment of landed time
Keith Packard [Fri, 21 Jul 2017 23:09:55 +0000 (16:09 -0700)]
altoslib: fix adjustment of landed time

Push landed time out if we computed silliness.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoSet version to 1.7.1 for TeleBT firmware build
Keith Packard [Fri, 21 Jul 2017 23:05:45 +0000 (16:05 -0700)]
Set version to 1.7.1 for TeleBT firmware build

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/telebt-v4.0: Use HW flow control to BT module time-series
Keith Packard [Wed, 28 Jun 2017 06:39:16 +0000 (23:39 -0700)]
altos/telebt-v4.0: Use HW flow control to BT module

Now that the stmf0 HW flow control works...

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/stmf0: Initialize UART RTS/CTS before turning it on
Keith Packard [Wed, 28 Jun 2017 06:37:49 +0000 (23:37 -0700)]
altos/stmf0: Initialize UART RTS/CTS before turning it on

If you try this after the UART is running, it won't work.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Deal with multiple motors in flight stats
Keith Packard [Wed, 28 Jun 2017 06:36:05 +0000 (23:36 -0700)]
altoslib: Deal with multiple motors in flight stats

Combine boost/fast/coast sections when computing ascent stats.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Fix comments in AltosQuaternion and AltosRotation
Keith Packard [Wed, 28 Jun 2017 04:37:50 +0000 (21:37 -0700)]
altoslib: Fix comments in AltosQuaternion and AltosRotation

Especially the nested comment which borked the compile

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosdroid: cal_data is no longer public from AltosState
Keith Packard [Wed, 28 Jun 2017 04:33:36 +0000 (21:33 -0700)]
altosdroid: cal_data is no longer public from AltosState

Use cal_data() method instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Clean up quaternion and rotation interfaces
Keith Packard [Thu, 22 Jun 2017 17:10:06 +0000 (10:10 -0700)]
altoslib: Clean up quaternion and rotation interfaces

Export euler to quaternion (instead of half_euler).
Provide angles to rotate rather than rates and time.
Add comments to quaternion and rotation code.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/rn4678: Add BLE support
Keith Packard [Tue, 20 Jun 2017 18:19:40 +0000 (11:19 -0700)]
altos/rn4678: Add BLE support

This just means ignoring the BLE connect status message.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Make cal_data private in AltosDataListener
Keith Packard [Tue, 20 Jun 2017 18:18:41 +0000 (11:18 -0700)]
altoslib: Make cal_data private in AltosDataListener

This way we can create it as needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib,altosuilib: Bump library version numbers
Keith Packard [Tue, 13 Jun 2017 17:58:57 +0000 (10:58 -0700)]
altoslib,altosuilib: Bump library version numbers

The API and ABI have changed a bit since 1.7

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Rename AltosGraphNew to AltosGraph
Keith Packard [Tue, 13 Jun 2017 17:50:37 +0000 (10:50 -0700)]
altosuilib: Rename AltosGraphNew to AltosGraph

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Rename AltosUIGraphNew to AltosUIGraph
Keith Packard [Tue, 13 Jun 2017 17:47:54 +0000 (10:47 -0700)]
altosuilib: Rename AltosUIGraphNew to AltosUIGraph

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Rename AltosEepromNew to AltosEeprom
Keith Packard [Tue, 13 Jun 2017 17:46:03 +0000 (10:46 -0700)]
altoslib: Rename AltosEepromNew to AltosEeprom

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Remove old AltosEeprom.java code
Keith Packard [Tue, 13 Jun 2017 17:38:13 +0000 (10:38 -0700)]
altoslib: Remove old AltosEeprom.java code

No longer in use

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/telebt-4.0: Add dependency on RN4678 header
Keith Packard [Tue, 13 Jun 2017 17:35:39 +0000 (10:35 -0700)]
altos/telebt-4.0: Add dependency on RN4678 header

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Add timeout to RN4678 status message code
Keith Packard [Tue, 13 Jun 2017 17:34:03 +0000 (10:34 -0700)]
altos: Add timeout to RN4678 status message code

If we see the start of an RN4678 status message, but then output
pauses, assume that this isn't the start of a status message and flush
the pending data.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Don't display pad, last location in flight stats without gps
Keith Packard [Tue, 13 Jun 2017 04:47:05 +0000 (21:47 -0700)]
altosuilib: Don't display pad, last location in flight stats without gps

Check stats.have_gps before displaying pad and last known location values.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Set time for TeleMini v1.0 eeprom analysing
Keith Packard [Tue, 13 Jun 2017 04:46:11 +0000 (21:46 -0700)]
altoslib: Set time for TeleMini v1.0 eeprom analysing

Need to take the computed tick time and tell the listener what time
that cooresponds to.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui, telegps, altosdroid: say ground distance, not total range
Keith Packard [Mon, 12 Jun 2017 06:13:07 +0000 (23:13 -0700)]
altosui, telegps, altosdroid: say ground distance, not total range

Ground distance is more useful in predicting recovery than total range.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Initialize new imu/mag values. Remove stale imu/mag objects.
Keith Packard [Mon, 12 Jun 2017 06:10:49 +0000 (23:10 -0700)]
altoslib: Initialize new imu/mag values. Remove stale imu/mag objects.

AltosState no longer has imu and mag objects, instead it just holds
the values now.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Display current altitude in monitor idle Pad tab
Keith Packard [Mon, 12 Jun 2017 05:52:56 +0000 (22:52 -0700)]
altosui: Display current altitude in monitor idle Pad tab

This was attempting to use 'pad' values even though monitor idle
doesn't have them.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Remove unused 'ground_rotation' from AltosState
Keith Packard [Mon, 12 Jun 2017 05:50:57 +0000 (22:50 -0700)]
altoslib: Remove unused 'ground_rotation' from AltosState

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Flush igniter fire command
Keith Packard [Mon, 12 Jun 2017 05:50:28 +0000 (22:50 -0700)]
altoslib: Flush igniter fire command

This makes the igniter fire without a multi-second delay.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Hook up idle monitoring data again
Keith Packard [Mon, 12 Jun 2017 05:49:46 +0000 (22:49 -0700)]
altoslib: Hook up idle monitoring data again

The API for idle monitoring changed, but these modules hadn't been
fixed.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Fix labels in AltosIMU to match source data
Keith Packard [Mon, 12 Jun 2017 05:47:53 +0000 (22:47 -0700)]
altoslib: Fix labels in AltosIMU to match source data

IMU bits arrive with X/Y/Z labels and are converted to the correct
axes as they leave this object.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Keep time series in AltosFlightSeries array sorted
Keith Packard [Mon, 12 Jun 2017 05:47:02 +0000 (22:47 -0700)]
altoslib: Keep time series in AltosFlightSeries array sorted

This makes using the graph way easier.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Handle EasyMini v2.0 ADC values
Keith Packard [Mon, 12 Jun 2017 05:46:01 +0000 (22:46 -0700)]
altoslib: Handle EasyMini v2.0 ADC values

Different from EasyMini v1.0

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Create separate log format for EasyMini v2.0
Keith Packard [Mon, 12 Jun 2017 05:43:57 +0000 (22:43 -0700)]
altos: Create separate log format for EasyMini v2.0

The ADC in the STM32F0 is different than the LPC, with a range of
0-4095 instead of 0-32767.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Missing config values now AltosLib.MISSING, not zero or negative
Keith Packard [Mon, 12 Jun 2017 05:42:25 +0000 (22:42 -0700)]
altoslib: Missing config values now AltosLib.MISSING, not zero or negative

Also fix AltosConfigData.java

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Adapt to Mag sensor value ordering changes
Keith Packard [Mon, 12 Jun 2017 05:39:53 +0000 (22:39 -0700)]
altoslib: Adapt to Mag sensor value ordering changes

The HMC5883 sensor data is ordered x, z, y. Relabel everything to
match that to preserve compatibility with existing firmware. With the
data correctly ordered, fix the labling of the axes along, across and
through.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: HMC5883 output order is X Z Y
Keith Packard [Mon, 12 Jun 2017 05:34:11 +0000 (22:34 -0700)]
altos: HMC5883 output order is X Z Y

Re-label everything to have the correct names. This doesn't actually
change the code at all, so the eeprom and telemetry is all compatible.

Matching changes on the host side will be required to actually process
the data correctly, of course.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Update sensor data atomically
Keith Packard [Mon, 12 Jun 2017 05:31:17 +0000 (22:31 -0700)]
altos: Update sensor data atomically

Read data into a temp variable, block interrupts, then update the
published value.

The bug is easy to see with the HMC5883 which has to byte-swap the
output of the chip, and hence can occasionally get caught with the
wrong byte order data.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib, altosuilib, altosui, telegps: Missing config values now MISSING
Keith Packard [Sun, 11 Jun 2017 23:11:09 +0000 (16:11 -0700)]
altoslib, altosuilib, altosui, telegps: Missing config values now MISSING

Config values that didn't apply to the current product used to get set
to -1, but now they're set to AltosLib.MISSING to be consistent with
the rest of the code. Deal with this in the UI bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Compute 'vertical acceleration' for eeprom files
Keith Packard [Fri, 9 Jun 2017 03:39:06 +0000 (20:39 -0700)]
altoslib: Compute 'vertical acceleration' for eeprom files

This uses the computed orientation to find the portion of the measured
acceleration which is vertical and then shows that in the post-flight
analysis graph.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Compute orientation from eeprom data files
Keith Packard [Fri, 9 Jun 2017 03:37:58 +0000 (20:37 -0700)]
altoslib: Compute orientation from eeprom data files

This was lost in the AltosFlightSeries transformation.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib,altosuilib: Remove stale source files
Keith Packard [Sun, 28 May 2017 23:53:43 +0000 (16:53 -0700)]
altoslib,altosuilib: Remove stale source files

These aren't built any longer

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Check for valid pad alt before computing GPS height series
Keith Packard [Sun, 28 May 2017 23:53:03 +0000 (16:53 -0700)]
altoslib: Check for valid pad alt before computing GPS height series

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Add status back to AltosFlightSeries for CSV export
Keith Packard [Sun, 28 May 2017 23:52:28 +0000 (16:52 -0700)]
altoslib: Add status back to AltosFlightSeries for CSV export

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Don't record radio status values in flight series
Keith Packard [Sun, 28 May 2017 23:15:17 +0000 (16:15 -0700)]
altoslib: Don't record radio status values in flight series

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: When no boost tick is found, just use first tick in file
Keith Packard [Sun, 28 May 2017 23:14:53 +0000 (16:14 -0700)]
altoslib: When no boost tick is found, just use first tick in file

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Reset transient AltosCalData values before processing data
Keith Packard [Sun, 28 May 2017 22:52:17 +0000 (15:52 -0700)]
altoslib: Reset transient AltosCalData values before processing data

Values in cal_data which are used to hold intermediate results need to
get reset back to their initial values before processing a series of
flight data again.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Don't record 'pad' state in FlightSeries
Keith Packard [Sun, 28 May 2017 22:51:56 +0000 (15:51 -0700)]
altoslib: Don't record 'pad' state in FlightSeries

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Set graph title to include product/serial/flight info
Keith Packard [Sun, 28 May 2017 22:28:29 +0000 (15:28 -0700)]
altosuilib: Set graph title to include product/serial/flight info

Better than "Flight"

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Only compute state stats for recorded states
Keith Packard [Sun, 28 May 2017 22:27:45 +0000 (15:27 -0700)]
altoslib: Only compute state stats for recorded states

Missing states shouldn't get stats; they 'didn't happen'.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Clean up gps series logging
Keith Packard [Sun, 28 May 2017 22:26:51 +0000 (15:26 -0700)]
altoslib: Clean up gps series logging

Create each gps series only when data are avaiable.
Compute gps height series shen series is finished.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: AltosFlightSeries ignore missing accel/pressure
Keith Packard [Sun, 28 May 2017 22:26:11 +0000 (15:26 -0700)]
altoslib: AltosFlightSeries ignore missing accel/pressure

missing accel often comes from invalid cal data; easier to check here.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Remove debug printfs
Keith Packard [Sun, 28 May 2017 22:25:35 +0000 (15:25 -0700)]
altoslib: Remove debug printfs

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Ignore invalid accel cal values
Keith Packard [Sun, 28 May 2017 22:21:53 +0000 (15:21 -0700)]
altoslib: Ignore invalid accel cal values

When both are the same, something is wrong.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Check for empty gps height series
Keith Packard [Sun, 28 May 2017 21:42:30 +0000 (14:42 -0700)]
altoslib: Check for empty gps height series

When the gps height series is present but empty, there won't be a max value.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Use first pressure value if no ground pressure available
Keith Packard [Sun, 28 May 2017 21:41:42 +0000 (14:41 -0700)]
altoslib: Use first pressure value if no ground pressure available

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Handle eeprom tick wrapping
Keith Packard [Sun, 28 May 2017 21:33:28 +0000 (14:33 -0700)]
altoslib: Handle eeprom tick wrapping

Need to deal with eeprom files with tick values that cross the 16-bit
barrier.
Use 'wide_tick' to order eeprom record.
Remeber 'prev_tick' to order cal data time sequence.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Display product/firmware version in stats table
Keith Packard [Sun, 28 May 2017 21:03:51 +0000 (14:03 -0700)]
altosuilib: Display product/firmware version in stats table

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Adjust boost/landed time in flight series for display
Keith Packard [Sun, 28 May 2017 21:02:51 +0000 (14:02 -0700)]
altoslib: Adjust boost/landed time in flight series for display

Makes the presented values match those used in the stats computation.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Add constants for speed/accel filtering
Keith Packard [Sun, 28 May 2017 21:02:11 +0000 (14:02 -0700)]
altoslib: Add constants for speed/accel filtering

With an eye towards letting the user pick.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Create data file open helper in AltosLib
Keith Packard [Sun, 28 May 2017 21:00:15 +0000 (14:00 -0700)]
altoslib: Create data file open helper in AltosLib

Use InputStream everywhere, instead of Reader.
Create private string input stream as java one is deprecated.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Extract a few more values from config to cal_data
Keith Packard [Sun, 28 May 2017 20:58:05 +0000 (13:58 -0700)]
altoslib: Extract a few more values from config to cal_data

Make it possible to display model/version data in the flight stats table.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Recover from a couple of API changes
Keith Packard [Sun, 28 May 2017 06:42:52 +0000 (23:42 -0700)]
altoslib: Recover from a couple of API changes

Nothing serious.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agomicropeak: Use altoslib/altosuilib flight analysis bits
Keith Packard [Sun, 28 May 2017 06:35:02 +0000 (23:35 -0700)]
micropeak: Use altoslib/altosuilib flight analysis bits

Remove custom graph and stats bits and share bits with altosui.

Signed-off-by: Keith Packard <keithp@keithp.com>