1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136 | # Copyright (c) 2024 MBARI
# MBARI Proprietary Information. Confidential. All Rights Reserved
# Unauthorized copying or distribution of this file via any medium is strictly
# prohibited.
#
# WARNING - This file contains information whose export is restricted by the
# Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
# amended. Violations of these export laws are subject to severe civil and/or
# criminal penalties.
# SURFACE BENCH TEST for the adaptive backseat (strategy 3 = expanding_donut)
mission run_backseat_on_surface_expanding_donut {
arguments {
ElapsedSinceMissionStarted = 0 minute
# --- Backseat mission-driven config ---
# published to the slate as _.bs_* for the backseat to read once at startup
PublishPeriod = 2 second
"""Re-publish period for the _.bs_* config below."""
MinDepth = 10 meter
"""Absolute min of the frontseat-owned safety/search band. Published to the
backseat as _.bs_min_depth_limit (cosmetic here — no diving on surface)."""
MaxDepth = 60 meter
"""Absolute max of the frontseat-owned safety/search band. Published to the
backseat as _.bs_max_depth_limit (cosmetic here — no diving on surface)."""
Strategy = 3 count
"""Backseat strategy id (STRATEGY_IDS): 3=expanding_donut."""
BsSignalThreshold = 10 count
"""expanding_donut signal_threshold: per-profile peak to mark a profile "high signal"."""
BsThreshHighSignalCounts = 1 count
"""expanding_donut thresh_high_signal_counts: consecutive high profiles -> start the spiral."""
BsThreshLowSignalCounts = 1 count
"""expanding_donut thresh_low_signal_counts: consecutive low profiles -> back to transit."""
BsMedianWindowSamples = 1 count
"""expanding_donut median_window_samples: median-filter length."""
BsMaWindowSeconds = 2 second
"""expanding_donut ma_window_seconds: moving-average window."""
BsRudderStart = 15 degree
"""expanding_donut rudder_start: tight first ring of the spiral."""
BsRudderEnd = 3 degree
"""expanding_donut rudder_end: widest ring of the spiral."""
}
# Power the science payload.
insert id="Science" Insert/Science.tl
# Power the Backseat payload.
insert Insert/BackseatDriver.tl
assign in sequence BackseatDriver:EnableBackseat = true
insert Insert/PowerOnly.tl
# Run the backseat guidance so it processes on-surface.
behavior Guidance:BackseatDriver {
run in parallel
}
# --- Publish mission-driven config to the backseat (read once at startup) ---
# Needs BackseatComponent. fullSlateAccess=1 on the frontseat.
aggregate PublishBackseatParams {
run when ( elapsed ( customUri "_.bs_strategy" ) > PublishPeriod )
assign in sequence customUri "_.bs_strategy" = Strategy
assign in sequence customUri "_.bs_min_depth_limit" = MinDepth
assign in sequence customUri "_.bs_max_depth_limit" = MaxDepth
assign in sequence customUri "_.bs_signal_threshold" = BsSignalThreshold
assign in sequence customUri "_.bs_thresh_high_signal_counts" = BsThreshHighSignalCounts
assign in sequence customUri "_.bs_thresh_low_signal_counts" = BsThreshLowSignalCounts
assign in sequence customUri "_.bs_median_window_samples" = BsMedianWindowSamples
assign in sequence customUri "_.bs_ma_window_seconds" = BsMaWindowSeconds
assign in sequence customUri "_.bs_rudder_start" = BsRudderStart
assign in sequence customUri "_.bs_rudder_end" = BsRudderEnd
}
behavior Guidance:GoToSurface {
run in progression
}
aggregate CheckIn {
run in sequence repeat=288
readDatum id="Read_GPS" {
timeout duration=P5M
Universal:time_fix
}
readDatum id="Read_Iridium" {
timeout duration=P2H {
behavior Guidance:Execute {
run in sequence
set command = "Burn on"
}
syslog critical "Dropped weight due to communications timeout."
}
Universal:platform_communications
}
behavior Guidance:Wait {
run in sequence
set duration = 5 minute
}
assign in sequence ElapsedSinceMissionStarted = elapsed ( Universal:mission_started )
syslog important "run_backseat_on_surface mission has been running for "
+ ElapsedSinceMissionStarted~minute
}
syslog important "Restarting logs and run_backseat_on_surface_expanding_donut mission."
behavior Guidance:Execute {
run in sequence
set command = "restart logs"
}
}
|