summaryrefslogtreecommitdiff
path: root/altoslib/AltosState.java
Commit message (Collapse)AuthorAge
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Get rid of manual JSON encoding stuffKeith Packard2016-06-17
| | | | | | | Now that the reflective JSON stuff is working, we can delete all of the manual code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Improve AltosState save/restore debuggingKeith Packard2016-06-17
| | | | | | | When save/restore generate different values, write out the two versions to one.json and two.json for easy comparison. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Remove AltosHashSet codeKeith Packard2016-06-15
| | | | | | Everything has switched to JSON now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Switch preserved state format to JSONKeith Packard2016-06-15
| | | | | | This is much easier to debug than the icky strings with backslashes everywhere. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add log_space to AltosStateKeith Packard2016-05-15
| | | | | | | TeleGPS doesn't have flight_log_max value, but does have log_space which we can use for the same thing in monitor idle mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Store saved state in version-independent formatKeith Packard2016-05-12
| | | | | | | Use AltosHashSet for AltosState so that AltosDroid doesn't lose tracker information when the application is upgraded. Signed-off-by: Keith Packard <keithp@keithp.com>
* Bump java library versionsKeith Packard2016-05-12
| | | | | | Prepare for 1.6.4 release Signed-off-by: Keith Packard <keithp@keithp.com>
* Update java library version numbersKeith Packard2016-04-21
| | | | | | Prepare for 1.6.3 release. Signed-off-by: Keith Packard <keithp@keithp.com>
* Update java library versionsKeith Packard2016-01-10
| | | | | | altoslib is API incompatible with 1.6.1 release due to altos.state updates. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Hide 'state' member and use accessor functionKeith Packard2015-10-13
| | | | | | | | Someone was smashing the state to 'landed' when no packets had been received for a while. Found that by making it impossible for anyone outside of AltosState to change the value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add companion telemetry data supportKeith Packard2015-08-20
| | | | | | This got lost in the great telemetry rewrite Signed-off-by: Keith Packard <keithp@keithp.com>
* Bump Java library versionsKeith Packard2015-07-15
| | | | | | Avoid problems if you have an old version of the library installed Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Typo slipped into AltosState.javaKeith Packard2015-06-23
| | | | | | Oops. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use a longer filter for descent valuesKeith Packard2015-06-23
| | | | | | This makes descent speeds almost useful, a huge improvement Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Expose public function to set state.productKeith Packard2015-06-17
| | | | | | Just adds a setter function for this value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Update library version to 7Keith Packard2015-05-25
| | | | | | So many ABI/API changes Signed-off-by: Keith Packard <keithp@keithp.com>
* Bump java library versionsKeith Packard2015-02-07
| | | | | | | Lots of minor API/ABI changes; make sure people can install both 1.5 and 1.6 at the same time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Make AltosState serializableKeith Packard2014-11-15
| | | | | | This involved making every class it references serializable as well Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Compute tilt angle from eeprom dataKeith Packard2014-10-04
| | | | | | | | | | | | | | | | This copies the computation of tilt angle from the firmware so that post-flight analysis can also show the data. This change also renames all of the imu values to make them easier to understand: accel gyro axis along roll length of the board across pitch across the board through yaw through the board. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Extend telemetry heights from 16 to 32 bitsKeith Packard2014-07-10
| | | | | | | Uses the GPS data and/or previous kalman data to compute the upper 16 bits of the truncated telemetry altitude value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Clean up GPS DOP support in AltosStateKeith Packard2014-07-10
| | | | | | | | | Parse out hdop/pdop/vdop from telem and eeprom. Deal with legacy eeprom files that have dop/100 instead of dop/10 values. Clear state DOP values to MISSING at startup Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Preserve receiver_serial across state reset for new transmitterKeith Packard2014-07-05
| | | | | | | | When the transmitter serial or flight number changes, we re-init the state information, but we want to preserve the receiver serial number so that the log file has that in the name Signed-off-by: Keith Packard <keithp@keithp.com>
* java: Bump java library versions for next releaseKeith Packard2014-06-16
| | | | | | Prepare for future release by bumping java versions now Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: When GPS disappears, set range and elevation to MISSINGKeith Packard2014-06-14
| | | | | | | Use MISSING instead of bogus values so that displayers can tell what to do. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Correctly save firmware version in AltosStateKeith Packard2014-06-13
| | | | | | It wasn't getting cloned Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Report GPS height when baro height is not availableKeith Packard2014-06-11
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use GPS speed/height values when other sensors are missingKeith Packard2014-06-10
| | | | | | | | This lets TeleGPS report height/speed values without needing to customize every AltosState user to pull out GPS values when the other sensors aren't present. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add new 'stateless' flight state for TeleGPSKeith Packard2014-06-10
| | | | | | | TeleGPS has no flight state, so add a new 'stateless' state for code to handle this case differently than any of the existing states Signed-off-by: Keith Packard <keithp@keithp.com>
* Revert "altoslib: Parse TeleGPS state value from GPS telemetry packet"Keith Packard2014-06-08
| | | | This reverts commit d69547796caf74405f8304d23d4ae318315bbd7b.
* altoslib: Recover battery voltage from TeleGPS configuration packetKeith Packard2014-06-07
| | | | | | | | TeleGPS stuffs battery voltage in the apogee_delay slot of the configuration packet. Pull it out from there and stick it into the current state. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Parse TeleGPS state value from GPS telemetry packetKeith Packard2014-06-07
| | | | | | | TeleGPS adds 0x80 to the state value to signify that this otherwise unused byte contains the current state value Signed-off-by: Keith Packard <keithp@keithp.com>
* telegps: Add info tableKeith Packard2014-05-29
| | | | | | | Move a couple of files from altosui to altosuilib, hook up the info table after changing it to implement the AltosFlightDisplay interface Signed-off-by: Keith Packard <keithp@keithp.com>
* telegps: Add 'Info' tabKeith Packard2014-05-28
| | | | | | | This contains a summary of the tracking info, including position, speed and course. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: When log-format is missing, use productKeith Packard2014-05-28
| | | | | | | log-format was added for 1.0; earlier log files don't include that, but do say which product they're from. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Change versions to altoslib:4, altosuilib:2Keith Packard2014-05-25
| | | | | | API has changed for these libraries, time to bump the file versions Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Track pyro firing state when reading mega eeprom filesKeith Packard2014-04-30
| | | | | | | TeleMega records whether each pyro has been fired in the eeprom file; track that in the AltosState record. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Ignore speed/accel after boost when finding maximaKeith Packard2014-04-02
| | | | | | | | Large spikes in acceleration often occur with ejection charges, which can cause bogus acceleration and speed data to be seen. Ignore those for the purpose of computing the maximum values of each. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Don't lose gps_height value between GPS samplesKeith Packard2014-01-24
| | | | | | | gps_height is now reliably updated whenever GPS altitude data is received, so don't try to reset it between samples. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Track GPS altitude values to be able to report max gps heightKeith Packard2014-01-24
| | | | | | | This adds separate GPS altitude and GPS ground altitude values so that the AltosState object can report GPS max height. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>