hydr_structures/structures/actuator/definition.rs
1//! Explicit finite-rate actuator definition contracts.
2
3/// Explicit independent opening-error and arrival-window allowances. No defaults apply.
4#[derive(Clone, Copy, Debug, PartialEq)]
5pub struct GateActuatorAccuracy {
6 /// Absolute opening-error allowance in metres, admitted independently of the relative branch.
7 pub maximum_absolute_opening_error_m: f64,
8 /// Relative opening-error allowance for positive openings when absolute admission does not apply.
9 pub maximum_relative_opening_error: f64,
10 /// Maximum exact full arrival-window width in seconds, independent of position accuracy.
11 pub maximum_arrival_window_s: f64,
12}
13
14/// Immutable ideal constant asymmetric-rate response bound to one actual gate.
15#[derive(Clone, Debug, PartialEq)]
16pub struct GateActuatorDefinition {
17 /// Exact actuator identity in immutable definition order.
18 pub actuator_id: String,
19 /// Exact identity of the bound original gate.
20 pub structure_id: String,
21 /// Explicit nonnegative opening speed. Zero stalls opening motion.
22 pub opening_rate_m_per_s: f64,
23 /// Explicit nonnegative closing speed. Zero stalls closing motion.
24 pub closing_rate_m_per_s: f64,
25 /// Explicit independent numerical admission policy.
26 pub accuracy: GateActuatorAccuracy,
27 /// Nonempty evidence identifying the supplied directional rates.
28 pub rate_provenance: String,
29 /// Explicit ideal-response assumptions, including excluded mechanical dynamics.
30 pub ideal_response_applicability: String,
31}
32
33/// Original actual opening and target supplied explicitly at initial time.
34#[derive(Clone, Debug, PartialEq)]
35pub struct GateActuatorInitialState {
36 /// Exact actuator identity in immutable definition order.
37 pub actuator_id: String,
38 /// Original explicitly supplied actual opening in metres, inside the bound gate range.
39 pub opening_m: f64,
40 /// Original active target in metres, inside the actual gate range.
41 pub target_opening_m: f64,
42}
43
44/// Original finite target calendar and closed support horizon.
45#[derive(Clone, Debug, PartialEq)]
46pub struct GateActuatorSchedule {
47 /// Original finite nonnegative start of supported response.
48 pub initial_time_s: f64,
49 /// Original strictly increasing target-event times inside the support horizon.
50 pub target_times_s: Vec<f64>,
51 /// Original finite terminal support time in seconds.
52 pub end_s: f64,
53}
54
55/// Identity-bound causal target packet at one original calendar event.
56#[derive(Clone, Debug, PartialEq)]
57pub struct GateTargetUpdate {
58 /// Exact actuator identity in immutable definition order.
59 pub actuator_id: String,
60 /// Exact identity of the bound original gate.
61 pub structure_id: String,
62 /// Original requested target in metres, inside the actual gate range.
63 pub target_opening_m: f64,
64 /// Original issue time, exactly equal to the target event.
65 pub issued_at_s: f64,
66 /// Finite availability time no later than issue time. Negative timestamps remain valid.
67 pub available_at_s: f64,
68}