fw/altos
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>
6 years agoaltosuilib: Remove 'cal_data' param from AltosGraphNew constructor
Keith Packard [Sun, 28 May 2017 06:34:18 +0000 (23:34 -0700)]
altosuilib: Remove 'cal_data' param from AltosGraphNew constructor

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Make AltosFlightStatsTable neater
Keith Packard [Sun, 28 May 2017 06:33:37 +0000 (23:33 -0700)]
altosuilib: Make AltosFlightStatsTable neater

Elide missing data, change titles when data are simpler

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Provide consistent cal_data from idle and replay readers
Keith Packard [Sun, 28 May 2017 06:33:07 +0000 (23:33 -0700)]
altoslib: Provide consistent cal_data from idle and replay readers

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Return AltosTimeValue from min/max funcs
Keith Packard [Sun, 28 May 2017 06:32:29 +0000 (23:32 -0700)]
altoslib: Return AltosTimeValue from min/max funcs

Allowing the user to have both value and time.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Publish boost_time and landed_time from AltosFlightStats
Keith Packard [Sun, 28 May 2017 06:31:48 +0000 (23:31 -0700)]
altoslib: Publish boost_time and landed_time from AltosFlightStats

Nice to be able to use these when displaying data.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Allow for other tick sizes
Keith Packard [Sun, 28 May 2017 06:30:54 +0000 (23:30 -0700)]
altoslib: Allow for other tick sizes

Use 1/100 sec by default, but provide for MicroPeak which uses a
different step.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Change how speed/accel are computed from pressure
Keith Packard [Sun, 28 May 2017 06:30:13 +0000 (23:30 -0700)]
altoslib: Change how speed/accel are computed from pressure

Filter *then* differentiate. This works way better that doing things
in the other order.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agotelegps: Get telegps application working again
Keith Packard [Sat, 27 May 2017 23:12:31 +0000 (16:12 -0700)]
telegps: Get telegps application working again

Many minor API tweaks

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosdroid: Deal with AltosState changes
Keith Packard [Sat, 27 May 2017 07:27:04 +0000 (00:27 -0700)]
altosdroid: Deal with AltosState changes

cal data split out from altos state.
altos state needed to have no-arguments constructor for JSON code.
Also messed with voice to make it stay quiet during app startup.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Use cal data temp gps for telemetry data too
Keith Packard [Sat, 27 May 2017 02:05:51 +0000 (19:05 -0700)]
altoslib: Use cal data temp gps for telemetry data too

This avoids bouncing the location data during flight

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Remove debug printf.
Keith Packard [Sat, 27 May 2017 01:47:18 +0000 (18:47 -0700)]
altosui: Remove debug printf.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Trim stale bits of AltosState
Keith Packard [Sat, 27 May 2017 01:46:46 +0000 (18:46 -0700)]
altoslib: Trim stale bits of AltosState

Much of this is now in AltosCalData.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Preserve old GPS data during operation
Keith Packard [Sat, 27 May 2017 01:46:00 +0000 (18:46 -0700)]
altoslib: Preserve old GPS data during operation

This avoids having the lat/lon values blank out when the GPS receiver
looses lock.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Get KML export working again
Keith Packard [Sat, 27 May 2017 01:22:02 +0000 (18:22 -0700)]
altoslib: Get KML export working again

Even annotate the states with avg speed/accel for fun.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Make sure AltosFlightSeries is filled in before use
Keith Packard [Sat, 27 May 2017 00:14:29 +0000 (17:14 -0700)]
altoslib: Make sure AltosFlightSeries is filled in before use

After all of the raw data is captured, the derived data needs to be
computed by calling the 'finish' function.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Remove --cat mode
Keith Packard [Sat, 27 May 2017 00:13:43 +0000 (17:13 -0700)]
altosui: Remove --cat mode

Wasn't documented, didn't do much useful.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Make AltosReplayReader start synchronously enough to track states
Keith Packard [Fri, 26 May 2017 07:51:37 +0000 (00:51 -0700)]
altoslib: Make AltosReplayReader start synchronously enough to track states

The Altos UI needs to see 'pad' state and then 'boost' state so that
it will automatically switch tabs during the flight. When reading from
eeprom files, the only way that is going to happen is if the reader
thread waits until the UI has definitely seen 'pad' state, which we do
by simply delaying the reader thread until after that has happened.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib,altosuilib,altosui: Get stats and replay working again.
Keith Packard [Fri, 26 May 2017 07:20:17 +0000 (00:20 -0700)]
altoslib,altosuilib,altosui: Get stats and replay working again.

Stats are really easy with all of the data in memory.
Replay takes a special thread to run the data and dump it into a
single state.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib/altosuilib/altosui: More work towards using AltosFlightSeries for analysis
Keith Packard [Fri, 26 May 2017 05:36:05 +0000 (22:36 -0700)]
altoslib/altosuilib/altosui: More work towards using AltosFlightSeries for analysis

Graphing and CSV seem complete now; stats still missing lots of stuff.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosui: Adapt to AltosFlightSeries for data analysis
Keith Packard [Fri, 26 May 2017 00:29:31 +0000 (17:29 -0700)]
altosui: Adapt to AltosFlightSeries for data analysis

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Adapt to AltosFlightSeries data processing plan
Keith Packard [Fri, 26 May 2017 00:26:49 +0000 (17:26 -0700)]
altosuilib: Adapt to AltosFlightSeries data processing plan

Replace use of list of AltosState with AltosFlightSeries to improve
data analysis.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Do data analysis on raw values rather than AltosState
Keith Packard [Fri, 26 May 2017 00:24:14 +0000 (17:24 -0700)]
altoslib: Do data analysis on raw values rather than AltosState

Use AltosFlightSeries instead of a sequence of AltosState records when
processing saved data. This provides a better way of doing filtering
and plotting.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Don't store computed telemetry fields
Keith Packard [Tue, 23 May 2017 21:53:55 +0000 (14:53 -0700)]
altoslib: Don't store computed telemetry fields

These values are only needed once, so there's no reason to save them.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agodoc: Add telegps outline
Keith Packard [Mon, 22 May 2017 21:36:46 +0000 (14:36 -0700)]
doc: Add telegps outline

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoadd thrust as a graphable time series type
Bdale Garbee [Fri, 12 May 2017 18:58:18 +0000 (12:58 -0600)]
add thrust as a graphable time series type

6 years agoaltosui: Hacks to plug into the new graph stuff
Keith Packard [Fri, 12 May 2017 07:01:14 +0000 (00:01 -0700)]
altosui: Hacks to plug into the new graph stuff

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltosuilib: Start creating new graph interface that takes time series data
Keith Packard [Fri, 12 May 2017 00:16:56 +0000 (17:16 -0700)]
altosuilib: Start creating new graph interface that takes time series data

Replace the AltosState interface so the graph can get better data, and
can be used for more stuff.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Create new abstraction underneath AltosState for recording values
Keith Packard [Fri, 12 May 2017 00:14:51 +0000 (17:14 -0700)]
altoslib: Create new abstraction underneath AltosState for recording values

Provides a way for the graph API to see raw data values, instead of
those cooked by AltosState.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: include TimeSeries code in build
Bdale Garbee [Thu, 11 May 2017 18:14:41 +0000 (12:14 -0600)]
altoslib: include TimeSeries code in build

6 years agoaltosuilib: Add time series subclass with data for generating a plot
Keith Packard [Wed, 10 May 2017 22:18:13 +0000 (15:18 -0700)]
altosuilib: Add time series subclass with data for generating a plot

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Add initial time series functions
Keith Packard [Wed, 10 May 2017 22:16:34 +0000 (15:16 -0700)]
altoslib: Add initial time series functions

Provides the basis for offering a sequence of time/value datasets for
graphing instead of using AltosState.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/telebt-v3.0: Add send_packet command
Keith Packard [Sat, 20 May 2017 04:36:01 +0000 (21:36 -0700)]
altos/telebt-v3.0: Add send_packet command

Useful for doing host-based RF protocols.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/telebt-v4.0: Remove HAS_POLLCHAR
Keith Packard [Sat, 20 May 2017 04:35:05 +0000 (21:35 -0700)]
altos/telebt-v4.0: Remove HAS_POLLCHAR

This isn't being used anymore.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoao-bringup: turnon_chaoskey: search for ao-usbload in PATH
Keith Packard [Sat, 20 May 2017 04:31:52 +0000 (21:31 -0700)]
ao-bringup: turnon_chaoskey: search for ao-usbload in PATH

Don't assume it's in /usr/bin

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/telefireone-v1.0: Fix confusing defines about config storage
Keith Packard [Sat, 20 May 2017 04:30:29 +0000 (21:30 -0700)]
altos/telefireone-v1.0: Fix confusing defines about config storage

USE_INTERNAL_FLASH is about storing config data in internal flash, and
should be on for telefireone.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Set default accel cal for old TeleMetrum v1 files
Keith Packard [Mon, 15 May 2017 19:13:35 +0000 (12:13 -0700)]
altoslib: Set default accel cal for old TeleMetrum v1 files

Before we stashed the config data in the log file, altoslib had to
"known" what the accelerometer calibration values should be set
to.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Set default log format to FULL until we learn different
Keith Packard [Mon, 15 May 2017 19:12:57 +0000 (12:12 -0700)]
altoslib: Set default log format to FULL until we learn different

Ancient log files don't even have a product name in them, so we'll
guess TeleMetrum v1.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Mark AltosConfigData fields as MISSING until set
Keith Packard [Mon, 15 May 2017 19:11:31 +0000 (12:11 -0700)]
altoslib: Mark AltosConfigData fields as MISSING until set

Instead of using -1 or 0 randomly, use MISSING consistently.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agore-brand current telefiretwo product as telefireone
Bdale Garbee [Mon, 15 May 2017 16:16:33 +0000 (10:16 -0600)]
re-brand current telefiretwo product as telefireone

6 years agoaltos/ao_rn4678: Send '$$$' for new devices. Fix name setting code.
Keith Packard [Mon, 15 May 2017 15:59:52 +0000 (08:59 -0700)]
altos/ao_rn4678: Send '$$$' for new devices. Fix name setting code.

New devices won't respond to the cmd pin we have configured, so get
them to command mode by sending the $$$ string. Somehow I'd botched
the name setting code and hadn't caught it as I hadn't tried a new
device...

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/stmf: Fix up serial port flow control configuration bits
Keith Packard [Mon, 15 May 2017 15:58:21 +0000 (08:58 -0700)]
altos/stmf: Fix up serial port flow control configuration bits

Compute whether any sw/hw flow control is in use.
Compute whether hw flow control is in use as a separate value.

These make the code a bit easier to follow.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agolibaltos: Add support for TeleBT-v4.0 bluetooth channel change
Keith Packard [Sat, 13 May 2017 22:24:20 +0000 (15:24 -0700)]
libaltos: Add support for TeleBT-v4.0 bluetooth channel change

The RN4678 in TeleBT v4.0 uses channel 6 instead of channel 1.
There is code in the linux bits which discovers this value, but that
crashes when run under java for unknown reasons.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltoslib: Handle TeleBT v4.0 battery voltage
Keith Packard [Sat, 13 May 2017 22:21:40 +0000 (15:21 -0700)]
altoslib: Handle TeleBT v4.0 battery voltage

The device reports raw ADC values, which mean AltosLib needs to
translate them.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos/telebt-v4.0: Hook up RN4678 module
Keith Packard [Sat, 13 May 2017 22:19:25 +0000 (15:19 -0700)]
altos/telebt-v4.0: Hook up RN4678 module

We've switched from the BM70 to this module which offers a virtual
serial channel over both BT and BTLE.

Signed-off-by: Keith Packard <keithp@keithp.com>
6 years agoaltos: Add RN4678 Bluetooth module driver
Keith Packard [Sat, 13 May 2017 22:17:41 +0000 (15:17 -0700)]
altos: Add RN4678 Bluetooth module driver

This works much like the old BTM module, but supports both bluetooth
and bluetooth LE. I've poked at it briefly over BTLE to see that it
appears to have the right name, but haven't attempted to communicate
over BTLE yet.

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