19 tracking::TrackPhase state = tracking::TrackPhase::Idle;
24enum class AimKind : uint8_t { Hold, Aim, Home };
31 AimKind kind = AimKind::Hold;
36 float deadband_deg = 1.0f;
37 uint32_t home_delay_ms = 2000;
60 bool homed()
const {
return homed_; }
65 bool have_setpoint_ =
false;
66 Angles setpoint_{0.0f, kTiltHomeDeg};
69 bool searching_ =
false;
70 uint32_t last_seen_ms_ = 0;
Maps a target's image position to turret angles (pure C++20, natively tested).
Definition aim_policy.h:41
bool homed() const
True once Home has fired, until the next lock or reset().
Definition aim_policy.h:60
void reset()
forget the setpoint and the lost-target timer (mode changes)
Definition aim_policy.cpp:9
const AimMap & map() const
the active map
Definition aim_policy.h:46
uint32_t home_remaining_ms(uint32_t now_ms) const
Milliseconds until the pending return Home fires: home_delay_ms minus the time since the target was l...
Definition aim_policy.cpp:47
Result of one policy update. For Aim and Home, angles is the new target pose. For Hold,...
Definition aim_policy.h:30
pan = pan_a * x + pan_b, tilt = tilt_a * y + tilt_b.
Definition aim_map.h:50
Turret pose: pan degrees from home (positive = right), tilt servo degrees (larger = up).
Definition aim_map.h:30
Definition aim_policy.h:35
Definition aim_policy.h:18
float x
target centroid, frame pixels
Definition aim_policy.h:20
Value types shared by the motion detector and the tracker (pure C++20, natively tested).