summaryrefslogtreecommitdiff
path: root/altoslib/AltosState.java
Commit message (Collapse)AuthorAge
* altos: Use factory calibration for all acceleration computationsKeith Packard2014-01-14
| | | | | | | | | The ground acceleration value will vary depending on the tilt angle of the airframe, which will result in incorrect acceleration computations during flight. This also avoids accidental boost detect when moving the airframe around in pad mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add AltosOrient class and max_orient()Keith Packard2013-12-28
| | | | | | This adds the class necessary to put orient into a UI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Bump library versionKeith Packard2013-12-20
| | | | | | | Prepare for next release by making sure we notice that the API/ABI for this library has changed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fetch 'orient' value from Mega Sensor packetKeith Packard2013-12-20
| | | | | | | The mega sensor packet had a spare byte to hold the current orientation value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib,altosui: Be more robust when graphing bogus .telem filesKeith Packard2013-10-14
| | | | | | | | | | | | Deal with files containing multiple serial number/flight number values by preserving the boost_tick value across state resets. Check for invalid state when computing actual boost time for the stats window. Ignore invalid speed/accel values when computing averages. Signed-off-by: Keith Packard <keithp@keithp.com>
* Change differentiation filter constants and limitsKeith Packard2013-10-07
| | | | | | | Larger limits avoids clipping legit data. Using the same filter time for both ascent and descent makes the results look a bit cleaner. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Prefer averaged ground pres for ground alt computationKeith Packard2013-09-19
| | | | | | | | If ground pressure is recorded (as from an eeprom file), then prefer that value to the average of the pre-boost ground pressures when computing the ground altitude. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add receiver serial to telem file namesKeith Packard2013-09-06
| | | | | | Makes it easy to record telemetry from multiple sites and compare them later. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Record time_change in AltosState correctlyKeith Packard2013-09-05
| | | | | | time_change is used to make real-time playback work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Finish AltosState changes. Update version number.Keith Packard2013-09-05
| | | | | | | Removes all of the AltosRecord bits, changes the monitor idle bits to have per-object state updaters. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Set measured acceleration for measured accelerationKeith Packard2013-09-03
| | | | | | Was setting computed acceleration even for measured data Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Clear sat data when tick changesKeith Packard2013-09-03
| | | | | | | Sat data comes in multiple records, but the tick is always the same, so use that to tell when the set of sats is new Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Start integrated value at 0 by defaultKeith Packard2013-09-03
| | | | | | Check for MISSING and start at zero in that case Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use first few baro samples for ground pressure on TMKeith Packard2013-09-03
| | | | | | | TM didn't record the ground baro reading in the log file, so pull out the first few measured baro samples and use those instead. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Make Ascent/descent use different filter values. Always filter.Keith Packard2013-09-03
| | | | | | | | | In derivative code, use a shorter filter during ascent as the baro sensor is cleaner then. Then, make sure to always filter the values as the very first few baro samples can be noisy, which generates a bad starting speed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: More AltosState hackingKeith Packard2013-09-02
| | | | | | EasyMini graphs are looking good now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosui: Further AltosState transition workKeith Packard2013-08-31
| | | | | | | Parses most eeprom and telem records now; altosui updated to show from AltosState info. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosui: Fixes for state changesKeith Packard2013-08-31
| | | | | | | Format for gps alt (now double). Use new code for csv file loading. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosui: Get legacy telem working with new AltosState structureKeith Packard2013-08-31
| | | | | | Make AltosTelemetry work without AltosRecord Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib, altosui: Restructured state management now does TM eeprom filesKeith Packard2013-08-29
| | | | | | | Removed uses of AltosRecord from AltosState, now just need to rewrite the other AltosState changing code to match Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Start restructuring AltosState harderKeith Packard2013-08-29
| | | | | | | Make per-packet code update state itself rather than having all state updates done centrally. Will make adding new packet types easier. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Add raw pressure to the AltosUI graphKeith Packard2013-06-17
| | | | | | A nice addition, and useful when diagnosing baro sensor issues Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use sequence numbers to track GPS updates to AltosRecordKeith Packard2013-05-14
| | | | | | | | | | | State objects now record what GPS sequence ID they have to know when the GPS data has been updated. Record objects bump the GPS sequence each time new GPS data is recorded. This way, record objects aren't modified as they're iterated over to generate the list of state objects which makes it possible to iterate multiple times and get the same resulting set of states. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Update GPS state even if new state is unlockedKeith Packard2013-05-07
| | | | | | | Otherwise, we can't see fine GPS details while GPS is unlocked, and that's annoying Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add range and elevation to AltosGreatCircleKeith Packard2013-04-11
| | | | | | Move the computations from AltosState here so they can be re-used elsewhere. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosui: Carry receiver status around in AltosListenerStateKeith Packard2013-04-09
| | | | | | | | | | This moves the crc_errors into the new structure and adds a receiver battery voltage value there as well. Now the receiver status can be monitored separately from the flight status. That also means that code receiving state updates should be prepared to accept missing listener or flight state values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Display current GPS in 'pad' tab for 'startup' statenKeith Packard2013-04-02
| | | | | | | This is the state for telegps, so just display the current GPS info as we don't know where it started at. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Don't display missing sensor dataKeith Packard2013-04-02
| | | | | | | For devices without sensors, don't display temperature, barometric and accelerometer-derived values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Invalidate GPS new data bit when updating stateKeith Packard2013-03-04
| | | | | | Somehow this line got lost when the GPS ground altitude fix was made. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add version numbers to java librariesKeith Packard2013-01-29
| | | | | | | Make our private java library names include a version number so we can ship and install multiple versions at the same time. Signed-off-by: Keith Packard <keithp@keithp.com>
* Change AltosLib to altoslibKeith Packard2013-01-29
| | | | | | Follow Java conventions Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Don't smash existing GPS pad alt after boostKeith Packard2013-01-10
| | | | | | | | Leave the existing GPS pad altitude value in place after boost by checking to see if it was ever computed before resetting it to the barometric pad altitude. This makes GPS height values relative to the pad. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Discard previous flight state on SN changeKeith Packard2012-12-14
| | | | | | | | A previous change discarded previous *telemetry* state, but failed to discard any previous overall flight state. This would reset some of the data fields, but wouldn't reset the GPS state and max measurements. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Move computed state from AltosRecord to AltosStateKeith Packard2012-10-21
| | | | | | | Make AltosRecord simply track the raw data and have AltosState hold all computed values, including cross-packet averages and computed speeds. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Leave new_gps indication until gps value is usedKeith Packard2012-09-12
| | | | | | | | | | | | During replay, AltosState may not see a new GPS value as soon as it lands in the state field as additional records with the same timestamp may come in after the GPS record. Instead of resetting the new_gps indication when the new record is created, wait until the new_gps indication is seen by the AltosState update code and have that clear the new_gps indication. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: comment out un-used variablesMike Beattie2012-09-07
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosui: Handle Monitor Idle errors betterKeith Packard2012-07-29
| | | | | | | | Deal with missing data by checking for MISSING in more places. Handle serial communication failures during send by reporting back from libaltos. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Don't use MISSING values in max computationsKeith Packard2012-07-17
| | | | | | | Early telemetry state may be missing critical data, don't use MISSING values in computing max ranges. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Clean up random rebase failuresKeith Packard2012-06-02
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Move altoslib sources to top dirKeith Packard2012-06-02
No sense having them live deep in the file system. Signed-off-by: Keith Packard <keithp@keithp.com>