crossing_gate_state — DRIVE crossing op

• Data kinds: signal → table

• Call: import fullseye as fs; fs.ledger.crossing_gate_state(t, *, t_warning: 'float', t_lower_start: 'float', lower_duration: 'float', t_clear: 'float', raise_duration: 'float') -> 'Dict[str, np.ndarray]' (to call the implementation directly, import drivecrossing; drivecrossing.crossing_gate_state(t, *, t_warning: 'float', t_lower_start: 'float', lower_duration: 'float', t_clear: 'float', raise_duration: 'float') -> 'Dict[str, np.ndarray]'; from the registry, opsdrive.get("crossing_gate_state"))

Usage

Evaluates the railroad-crossing state machine (crossing warning signal + crossing gate) at times t (array).

States: 0 idle (no warning, boom up), 1 warning (warning on, boom up), 2 lowering (descending), 3 closed (barrier down), 4 raising (train has passed, warning stopped, boom rising). The warning lamps are lit in 1–3 (interpretation criteria 5(5) "stop the warning after passage"). Boom angle [rad]: up π/2 → down 0. Lowering and raising follow a smooth cosine shape (assumption: no source for the real descent curve). entry_forbidden = 1–4 (Article 33 paragraph 2. Including raising is a conservative interpretation).

Return value: state (int), boom_angle, lamps_on (bool), entry_forbidden (bool), t_closed (end of lowering).

Empty input (t with 0 elements) raises ValueError.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_driving_crossing — py -3.11 examples/poc_driving_crossing.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (crossing)

crossing_timing_check · crossing_lamp_signal · lamp_pair_phase · crossing_clear_time · exit_room_check · crossing_stop_check · track_sight_distance · sight_triangle_distance


*Provenance: drivecrossing.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.