Back to catalog

Behavior Correctness

H01 FixedTurn Behavior

Behavior correctness tests for BHV_FixedTurn. These cases verify fixed-turn direction, scheduled turn specifications, inherited and fixed speed branches, timeout completion, runtime updates, and invalid turn configuration.

Stem Mission

Baseline scenario context

The stem mission runs one simulated vehicle through a short approach leg before activating BHV_FixedTurn. Case overlays vary turn direction, fixed-turn magnitude, scheduled turn specifications, speed selection, and timeout behavior.

Examples

Representative runs

Starboard 90

Description: After the approach leg leaves the vehicle heading about 45 degrees, runs the stock fix_turn=90, mod_hdg=25, turn_dir=star, and speed=1.4; passes when FT_DONE=true, final heading is 105 through 170 degrees, turn time exceeds one second, turn distance exceeds three meters, and no behavior error was observed.

Port 360

Description: Uses the same 355-degree configuration with turn_dir=port; the first evaluator phase requires DESIRED_RUDDER<-50, and the completion phase requires the same near-start final heading, long-turn time/distance, and no-error conditions, with radial FT_REPORT fields remaining diagnostic.

Turn Spec Sequence

Description: Queues a 45-degree starboard turn followed by a 45-degree port turn, both at speed 1.4 and mod_hdg=45; passes when TURN_ONE, TURN_TWO, and FT_DONE are true, final heading has returned to 35 through 55 degrees, the final turn has time above one second and distance above three meters, and no behavior error was observed.

Case Matrix

All cases

starboard_90_pass

After the approach leg leaves the vehicle heading about 45 degrees, runs the stock fix_turn=90, mod_hdg=25, turn_dir=star, and speed=1.4; passes when FT_DONE=true, final heading is 105 through 170 degrees, turn time exceeds one second, turn distance exceeds three meters, and no behavior error was observed.

port_90_pass

Changes only turn_dir=port; passes when FT_DONE=true, final heading is above 285 degrees, turn time exceeds one second, turn distance exceeds three meters, and no behavior error was observed.

starboard_360_pass

Sets fix_turn=355, mod_hdg=90, turn_dir=star, and speed=1.8; an ordered evaluator first requires DESIRED_RUDDER>50 after FIX_TURN=true, then requires completion with final heading 20 through 65 degrees, turn time above 15 seconds, turn distance above 25 meters, and no behavior error, while the radial fields in FT_REPORT remain diagnostic.

port_360_pass

Uses the same 355-degree configuration with turn_dir=port; the first evaluator phase requires DESIRED_RUDDER<-50, and the completion phase requires the same near-start final heading, long-turn time/distance, and no-error conditions, with radial FT_REPORT fields remaining diagnostic.

speed_auto_pass

Sets speed=auto for the stock starboard 90-degree turn; while positive rudder proves the turn is active, the first evaluator phase requires 1.7<DESIRED_SPEED<1.9, then the completion phase requires the stock starboard heading, time/distance, and no-error outcome.

fixed_speed_pass

Sets speed=1.3 for the stock starboard 90-degree turn; the first evaluator phase requires 1.25<DESIRED_SPEED<1.35, then the completion phase requires the stock heading, time/distance, and no-error outcome.

turn_delay_pass

Adds turn_delay=4 to the stock starboard 90-degree turn; three seconds after FIX_TURN=true, the first evaluator phase requires heading to remain between 44 and 46 degrees, then the completion phase requires the stock starboard heading, time/distance, and no-error outcome.

timeout_complete_pass

Configures fix_turn=355, mod_hdg=10, speed=1, and behavior timeout=4; passes when timeout-driven FT_DONE=true arrives with turn time between three and eight seconds, turn distance above two meters, and no behavior error.

turn_spec_sequence_pass

Queues a 45-degree starboard turn followed by a 45-degree port turn, both at speed 1.4 and mod_hdg=45; passes when TURN_ONE, TURN_TWO, and FT_DONE are true, final heading has returned to 35 through 55 degrees, the final turn has time above one second and distance above three meters, and no behavior error was observed.

turn_spec_fallback_pass

Queues spd=-1,mhdg=-1,fix=-1,turn=auto so the entry inherits static speed=1.4,mod_hdg=25,fix_turn=90,turn_dir=star; passes when TURN_ONE and FT_DONE are true, heading is 105 through 170 degrees, turn time and distance are positive, and no behavior error was observed.

turn_spec_key_update_pass

Starts with keyed entry alpha, then at one second replaces it with a 45-degree port turn at speed 1.4 and mod_hdg=45, appending TURN_TWO and FT_DONE flags; passes when retained TURN_ONE, appended TURN_TWO, and FT_DONE are true, heading is above 285 degrees, time and distance are positive, and no behavior error was observed.

turn_spec_bad_update_recover_pass

Sends malformed keyed update key=alpha,bogus=oops at one second and a valid 45-degree starboard replacement at two seconds; passes when TURN_ONE, TURN_TWO, and FT_DONE are true, heading is 70 through 130 degrees, time and distance are positive, and no behavior error was observed, without grading a rejection warning for the malformed update.

turn_spec_clear_pass

Queues a near-full TURN_ONE entry, then posts turn_spec=clear at one second so the static starboard 90-degree turn runs instead; passes when TURN_ONE=false, FT_DONE=true, heading is 105 through 170 degrees, time and distance are positive, and no behavior error was observed.

turn_spec_timeout_pass

Queues a 355-degree starboard turn with mod_hdg=10, speed 1, and entry timeout=4; passes when TURN_ONE and FT_DONE are true, turn time is three through eight seconds, turn distance exceeds two meters, and no behavior error was observed.

zero_fix_turn_pass

Sets fix_turn=0; passes when FT_DONE=true, turn time is below two seconds, turn distance is below 0.25 meters, heading remains between 44 and 46 degrees, and no behavior error was observed.

runtime_static_update_pass

Posts turn_dir=port at one second and speed=1.6 at 1.2 seconds before the static turn activates; while negative rudder proves the port turn is active, the first evaluator phase requires 1.55<DESIRED_SPEED<1.65, then completion requires heading above 285 degrees, positive time/distance, and no behavior error.

turn_spec_clear_add_pass

Replaces a queued near-full TURN_ONE entry with turn_spec=clear plus a 45-degree port TURN_TWO entry at one second; passes when TURN_ONE=false, TURN_TWO=true, FT_DONE=true, heading is above 285 degrees, time and distance are positive, and no behavior error was observed.

turn_spec_aliases_pass

Queues fhdg=90,tdir=star instead of fix and turn, overriding opposite static values; passes when TURN_ONE and FT_DONE are true, heading is 105 through 170 degrees, time and distance are positive, and no behavior error was observed.

bad_fix_turn_fail

Sets fix_turn=-5; this expected-negative case passes only when Abe's helm reaches MALCONFIG after the two-second evaluator arm barrier and before the 15-second fallback deadline.

bad_stale_nav_thresh_fail

Sets stale_nav_thresh=0; this expected-negative case passes only on the same exact MALCONFIG state before the fallback deadline.

bad_turn_dir_fail

Sets turn_dir=banana; this expected-negative case passes only on the same exact MALCONFIG state before the fallback deadline.

bad_speed_fail

Sets speed=-1; this expected-negative case passes only on the same exact MALCONFIG state before the fallback deadline.

bad_turn_spec_fail

Adds bogus=oops to a scheduled turn; this expected-negative case passes only on the same exact MALCONFIG state before the fallback deadline.

bad_schedule_repeat_fail

Sets schedule_repeat=maybe; this expected-negative case passes only on the same exact MALCONFIG state before the fallback deadline.

Source links

Harness README Mission README