Repository navigation
v1.2.0
AstroNav Nano Firmware v1.2.0
A safety and reliability release. Apogee, pyro and landing decisions have been reworked, flight logs are more complete and more robust, and several bugs that could lose data or settings are fixed.
Warning
Copy your flight logs off the board before updating. The flash filesystem grows from 1 MB to 2 MB, and the first boot after the update reformats it. All logs and Settings.ini are erased. Re-check your settings afterwards.
Safety
- New setting
MIN_PYRO_FIRE_HEIGHT_M(default 5 m). The pyro never fires unless the rocket climbed at least this high above the launch point. If a bump while carrying an armed rocket is mistaken for a launch, the charge still cannot fire near people. Setting0disables this protection; treat it as a dangerous setting. - The pyro never fires on an unreliable barometer. Parachute timing depends on the barometer, so a missing, stale or rejected reading blocks deployment.
FIRE_PYRO_APOGEE=FALSEis now respected. Previously the pyro still fired at apogee with this setting.- No deployment on the ground or in a tree. Apogee now requires free fall on the IMU (≤ 0.5 g). A rocket resting, carried or swinging reads about 1 g, so it can't trigger.
PYROTESTis ground-only. It works only inIdlebefore launch, with double confirmation, and can no longer fire during a flight. A test no longer uses up the flight pyro.- Invalid settings are rejected. Non-numeric, out-of-range,
nanorinfvalues fall back to the safe default and the file is rewritten. Previously a typo could silently disable launch detection. An unrecognizedFIRE_PYRO_APOGEEvalue is treated asFALSE.
Flight logic
- New
Descentstate (replacesPyroFired): Idle → Boost → Coast → Descent → Landed. Apogee is always recorded, also when the pyro is disabled or blocked. - Apogee detection rebuilt. The primary trigger is the end of the climb, with a drop-from-peak backup and a peak-hold backup. The
ESTIMATED_*settings are now a real baseline: near the expected apogee, confirmation is faster. They never block apogee on flights far below or far above the estimate. - Altitude estimate with less lag. Single light filter (about 50 ms behind instead of about 0.4 s) and a velocity slope over 0.4 s.
- Barometer spike filter. Physically impossible jumps, such as the ejection-charge pressure spike, are rejected before they reach the altitude estimate. The limit scales with your speed settings. Also fixes the estimate running away during a barometer dropout.
- Landing detection uses both sensors. Landing is declared when one sensor is fully calm and the other moves at most slightly, so wind rocking still lands. A rocket still swinging, for example in a tree, waits until it settles. Free fall is no longer mistaken for "lying still".
- Landing timeout that scales with the real peak height and keeps waiting while the barometer still shows a descent, so the log is always saved.
- No flash writes during a normal flight. The flight number is prepared on the ground. Launch no longer rewrites
Settings.iniduring boost, and the sample loop no longer bursts after a stall.
Flight logs
- New header fields:
DETECTED_APOGEE_M,DETECTED_APOGEE_MS,APOGEE_TRIGGER,LAUNCH_ALTITUDE_M,MIN_PYRO_FIRE_HEIGHT_M,PYRO_BLOCKED_REASON,LANDING_TRIGGER,BARO_REJECTED_SAMPLES,SAMPLE_GAPS,PYRO_AT_APOGEE_ENABLEDandRAM_DROPPED_SAMPLES. - New CSV column
baro_rejected, added at the end. It marks samples where the spike filter intervened. - No more saturation: altitude and vertical speed are stored as 32-bit values. Previously they capped at 327 m and 327 m/s.
- Longer recording: the RAM buffer grows from 2048 to 6144 samples (about 102 s to about 307 s at 20 Hz). Longer flights continue streaming to flash during the descent; those logs end with
FINAL_summary lines. - Storage-full handling. Free space is checked before writing. Samples that don't fit are counted in the log and in
Settings.iniand never cut off silently. The firmware never deletes your files. - Summary numbers fixed. Float values in log headers,
Settings.iniand serial output were printed empty;printffloat support is now linked in.
Settings.ini and device profile
- Flight records now persist.
MAX_FLIGHT_ALTITUDE_M,MAX_FLIGHT_SPEED_MPS,LAST_FLIGHT_ALTITUDE_MandLAST_FLIGHT_SPEED_MPSpreviously failed their checksum and were reset on every boot. - New
[storage]section:STORAGE_TOTAL_KB,STORAGE_FREE_KB,ESTIMATED_LOG_SECONDS_FREEandLAST_LOG_STATUS. - New
OTP_HARDWARE_MATCHES_BUILDfield. A board's OTP identity stays valid when firmware is built for a newer hardware revision. LOG_COUNTnow reflects the number of flight logs on the board.
Fixes
- Log cleanup could delete the wrong file, for example the real
/Settings.ini. The firmware no longer deletes files in/logs. - The upload script only probes the upload port and Raspberry Pi USB devices. It no longer sends
DUMP_OTPto unrelated serial devices.
Build and repository
- Platform, Arduino core and libraries are pinned to exact versions for reproducible builds. The unused ICM-42688 library dependency is removed.
include/build_info.hand.pio/are no longer tracked in git. The header is generated on every build.- New documentation: Flight Log Storage (how to adjust RAM and flash sizes, and the reboot symptoms if they are too large), an updated user manual and a new README.
Upgrade notes
- Back up
/logsfirst. The filesystem is reformatted on the first boot. - After the first boot, set your values in
[settings]again and reviewMIN_PYRO_FIRE_HEIGHT_M. - Flight records start at
0.0; the stored profile resets once because of the new checksum format. - Tools that read the CSV: the
statecolumn now showsdescentinstead ofpyro. Abaro_rejectedcolumn is appended at the end. Existing columns are unchanged. - Do a ground test (
PYROTESTwith an LED or meter, no charge) and a toss test before flying. CheckAPOGEE_TRIGGER,PYRO_BLOCKED_REASONandLANDING_TRIGGERin the log.
Documentation: wiki.youpspace.com · Safety · Firmware update · youpspace.com