1 |
behavior_name=yo |
---|
2 |
# yo10.ma |
---|
3 |
# climb 3m dive -1(disabled) alt 9m pitch 26 deg |
---|
4 |
# Hand Written |
---|
5 |
# 18-Feb-02 tc@DinkumSoftware.com Initial |
---|
6 |
# 13-Mar-02 tc@DinkumSoftware.com Bug fix, end_action from quit(0) to resume(2) |
---|
7 |
# 09-Apr-03 kniewiad@webbresearch.com Adjusted for Ashumet |
---|
8 |
# 14-Nov-11 cedwards Dive to 0md/3ma, climb to 3md/-1alt |
---|
9 |
|
---|
10 |
<start:b_arg> |
---|
11 |
b_arg: start_when(enum) 2 # pitch idle (see doco below) |
---|
12 |
b_arg: num_half_cycles_to_do(nodim) -1 # Number of dive/climbs to perform |
---|
13 |
# <0 is infinite, i.e. never finishes |
---|
14 |
|
---|
15 |
# arguments for dive_to |
---|
16 |
b_arg: d_target_depth(m) 180 |
---|
17 |
b_arg: d_target_altitude(m) 3 |
---|
18 |
|
---|
19 |
b_arg: d_use_pitch(enum) 3 # 1:battpos 2:setonce 3:servo |
---|
20 |
# in rad rad, <0 dive |
---|
21 |
b_arg: d_pitch_value(X) -0.4538 # -26 deg |
---|
22 |
|
---|
23 |
# arguments for climb_to |
---|
24 |
b_arg: c_target_depth(m) 3 |
---|
25 |
b_arg: c_target_altitude(m) -1 |
---|
26 |
|
---|
27 |
b_arg: c_use_pitch(enum) 3 # 1:battpos 2:setonce 3:servo |
---|
28 |
# in rad rad, >0 climb |
---|
29 |
b_arg: c_pitch_value(X) 0.4538 # 26 deg |
---|
30 |
|
---|
31 |
|
---|
32 |
b_arg: end_action(enum) 2 # 0-quit, 2 resume |
---|
33 |
<end:b_arg> |
---|
34 |
|
---|
35 |
|
---|
36 |
# NOTE: These are symbolically defined beh_args.h |
---|
37 |
# b_arg: START_WHEN When the behavior should start, i.e. go from UNITIALIZED to ACTIVE |
---|
38 |
# BAW_IMMEDIATELY 0 // immediately |
---|
39 |
# BAW_STK_IDLE 1 // When stack is idle (nothing is being commanded) |
---|
40 |
# BAW_PITCH_IDLE 2 // When pitch is idle(nothing is being commanded) |
---|
41 |
# BAW_HEADING_IDLE 3 // When heading is idle(nothing is being commanded) |
---|
42 |
# BAW_UPDWN_IDLE 4 // When bpump/threng is idle(nothing is being commanded) |
---|
43 |
# BAW_NEVER 5 // Never stop |
---|
44 |
# BAW_WHEN_SECS 6 // After behavior arg "when_secs", from prior END if cycling |
---|
45 |
# BAW_WHEN_WPT_DIST 7 // When sensor(m_dist_to_wpt) < behavior arg "when_wpt_dist" |
---|
46 |
# BAW_WHEN_HIT_WAYPOINT 8 // When X_HIT_A_WAYPOINT is set by goto_wpt behavior |
---|
47 |
# BAW_EVERY_SECS 9 // After behavior arg "when_secs", from prior START if cycling |
---|
48 |
# BAW_EVERY_SECS_UPDWN_IDLE 10 // After behavior arg "when_secs", from prior START AND |
---|
49 |
# // updown is idle, no one commanding vertical motion |
---|
50 |
# BAW_SCI_SURFACE 11 // SCI_WANTS_SURFACE is non-zero |
---|
51 |
# BAW_NOCOMM_SECS 12 // when have not had comms for WHEN_SECS secs |
---|
52 |
# |
---|
53 |
# b_arg: STOP_WHEN |
---|
54 |
# 0 complete |
---|
55 |
# 1-N same as "start_when" |
---|