fix(firmware): track the quiet floor continuously instead of latching at boot - #1821
Open
clonea1 wants to merge 1 commit into
Open
fix(firmware): track the quiet floor continuously instead of latching at boot#1821clonea1 wants to merge 1 commit into
clonea1 wants to merge 1 commit into
Conversation
… at boot
calibration_update() averages the first EDGE_CALIB_FRAMES frames and latches
the result for the lifetime of the boot. That cannot be made to work: the node
is calibrating in the seconds right after a human walked over and plugged it
in, so the window is contaminated by construction, and nobody can leave a room
fast enough to fix it. Whatever the room looked like during that one minute
becomes "normal" permanently, and a node commissioned during a busy afternoon
stays desensitised for weeks.
A leaky minimum needs no clean room and no cooperation. It drops instantly to
any new low, so it finds the quiet by itself whenever quiet next happens --
minutes after a bad start rather than never. It climbs only slowly, so a
genuine change in the room is eventually adopted while a person standing still
for a while is not mistaken for the new floor.
if (motion < s_floor) s_floor = motion; /* descend at once */
else s_floor *= EDGE_FLOOR_LEAK;
The warm-up is kept, but only to seed a plausible starting value rather than to
latch one.
Measured support for the shape, on a nine-node ESP32-C6 fleet: the room's true
floor sits about 14x below where household animals register, and the settling
period after human activity runs a couple of hours. A tracker that descends to
real quiet and climbs at well under a percent a minute resolves that; an
average over one arbitrary minute cannot.
Separated by hand from a larger local change rather than cherry-picked -- the
same file also carries 256-bin HE20 subcarrier support and a vitals-slots
packet, which are unrelated and are not included here.
Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
calibration_update() averages the first EDGE_CALIB_FRAMES frames and latches
the result for the lifetime of the boot. That cannot be made to work: the node
is calibrating in the seconds right after a human walked over and plugged it
in, so the window is contaminated by construction, and nobody can leave a room
fast enough to fix it. Whatever the room looked like during that one minute
becomes "normal" permanently, and a node commissioned during a busy afternoon
stays desensitised for weeks.
A leaky minimum needs no clean room and no cooperation. It drops instantly to
any new low, so it finds the quiet by itself whenever quiet next happens --
minutes after a bad start rather than never. It climbs only slowly, so a
genuine change in the room is eventually adopted while a person standing still
for a while is not mistaken for the new floor.
The warm-up is kept, but only to seed a plausible starting value rather than to
latch one.
Measured support for the shape, on a nine-node ESP32-C6 fleet: the room's true
floor sits about 14x below where household animals register, and the settling
period after human activity runs a couple of hours. A tracker that descends to
real quiet and climbs at well under a percent a minute resolves that; an
average over one arbitrary minute cannot.
Separated by hand from a larger local change rather than cherry-picked -- the
same file also carries 256-bin HE20 subcarrier support and a vitals-slots
packet, which are unrelated and are not included here.
Rebased onto current
mainbefore opening: staged before today's seven merges, so it needed replaying to avoid reading as a revert of them. Clean rebase, no files deleted.