Maps a target's image position to turret angles (pure C++20, natively tested).
Read-only view of the controller state for the HUD and stats line.
void fill_pose_fields(ControlStatus &st, const aiming::AimMap &map, const HomeState &home)
Fills aim_x, aim_y, lim, rx0, ry0, rx1, ry1, home_ms and returning of st from st.angles (which must a...
Definition status_fields.cpp:24
constexpr float kReturningMarginDeg
A pose further than this from home on either axis counts as "travelling home" after a Home command.
Definition status_fields.h:20
int16_t round_pixel(float v)
Rounds a pixel coordinate to int16, saturating at the int16 range (a nearly flat map can put the inve...
Definition status_fields.cpp:7
Snapshot of the controller, published once per control pass.
Definition control_status.h:17
pan = pan_a * x + pan_b, tilt = tilt_a * y + tilt_b.
Definition aim_map.h:50
AI return-home state read from the aiming::AimPolicy. Ignored unless ai_mode is set.
Definition status_fields.h:23
bool homed
aiming::AimPolicy::homed(): Home has fired since the last lock or reset.
Definition status_fields.h:25
uint32_t home_remaining_ms
aiming::AimPolicy::home_remaining_ms() at this pass.
Definition status_fields.h:26
bool ai_mode
The controller is in ControlMode::Ai.
Definition status_fields.h:24