Topics sbd_cmd.doc
v0612 : Dec2006 Revision
Version Notes: What’s
new with the latest mods.
Overview and Use: Includes the required files on the UNIX
machine.
Sub-Command Categories:
Information
Requests:
(R) Re-Transmit all packets for a previous dive number N.
(@) Request all Route and Waypoint information.
(!) Request all re-settable EEPROM values.
Exceptions:
(0)
Reset; Can also change the depth of the first dive after reset.
(1)
Abort the mission.
(p)
Exception Severity Vectors for the pump, SBD, and spurious resets.
See also Timing (M) for course to steer if GPS fails.
Mission
Parameters:
(8) Set the dive depth and profile averaging.
(B) Set the maximum dives to perform.
(G) Set the glide pitch angle.
See
Timing below for settings (K, L) to control
satellite intervals.
Route
Control: ->>> Use sbd_route.pl to ensure proper
configuration.
(3)
Add/change a value in the waypoint list.
(7)
Change an individual route entry.
(W)
Change the basic route parameters.
Steering
Control/Navigation:
(D)
Current-bucking and current-crossing settings.
(E) Steer
a manual heading[TRUE].
(T)
Steering-Point distance[km] settings.
Sensor
Settings:
(A) Turn
on/off using the optical sensor.
(H)
Engineering Time-Series settings (use for diagnostics).
(F)
Doppler Settings.
(V)
Compass Correction: Magnetic Variation + correction scheme.
(Z) Turn
on/off using the altimeter, plus other altimeter limits.
Hydraulics:
(C)
Change pump timing/current settings.
Timing/Iridium
(SBD)/GPS Settings:
(9) Minimum time for one ‘dive cycle’ (effects how data is
packed).
(K) Minimum time between SBD transmits (effects how often to
surface).
(L) Argos transmit time in abort mode.
(M) Maximum time to try GPS and what course to steer if it fails.
(S) Set which wing to use for GPS and SBD (antenna-switch only).
(U) SBD time-out values.
v0608 = Sep06 = first rev of the new shore command list.
v0610 = Oct06
modifications:
‘0’
Adds changing the first dive depth after reset.
‘2’
Allows manually changing any EEPROM value.
‘P’ Adds Max_Reset option.
‘V’
Allows choosing TCM2/user-suppled compass cal coefficients.
v0612 = Dec06
modifications:
‘H’
Allows engineering time-series to be sent back via SBD.
Overview of Sending Shore Commands
Sprays that use the Short-Burst-Data (SBD) service
receive shore commands via attached files sent by email. The attached .sbd file must be correctly formatted
for proper interpretation by the Spray, and must be sent to:
‘Data@sbd.iridium.com’ with the modem’s IMEI number
in the subject line (see section 3 of the ‘Iridium Short Burst Data Developers
Guide’, IMEI = International Mobile Equipment Identity). After the file is emailed, sbd.iridium.com
emails an acknowledgement that the message has been queued. The creation and emailing of the .sbd file
if handled by the perl script:
q0610.pl perl script to get the Spray s/n, find the
corresponding
IMEI in imei.txt, run the sbd_q_0610
code, and finally,
email the .sbd file to
‘Data@sbd.iridium.com’.
Sprays deployed in the field with old code require
q0607.pl to send the proper commands.
The perl script uses/creates the following files as well:
imei.txt cross-reference of Spray s/n XXX to IMEI
number.
sbd_q_0610.c composes the command, including header
and appendix,
and writes to a .sbd file, plus appends
to a log file.
snXXX.sbd file created by sbd_q, ready for attachment.
sbd_log.XXX log file with date-time stamp of all commands
sent
to Spray XXX (XXX = serial number).
Files sbd_q_0610.c and q0610.pl will need to be
slightly modified to reflect the correct directory path on your Unix
machine. Likewise, imei.txt will need
to be updated as new SBD modems are added, or re-allocated to other Sprays.
Entering the desired Spray s/n should result with
the corresponding IMEI (if not, you need to edit imei.txt). Desired commands are entered from the
following list of commands. The command
will be subject to some minimal error/bounds checking, and you will be given
the opportunity to reject the command before it is added to the output
message. Finally you will be given one
last opportunity to not send the sbd message.
Otherwise the log file is update, the snXXX.sbd file is created, and
then emailed.
Route/Waypoint Management should be executed through
sbd_route.pl to ensure the
proper commands are issued.
Commands are sent to the Spray and parsed in the
parse_GS_cmd function.
The first character determines the command type,
proceeded by the desired
action. Here
is a summary of allowed commands:
0 P z RESET the Spray.
This forces a RESET, causing the mission to restart.
P =
password.
z = (optional) Dive
depth[m] for the first dive after reset.
( 20 <= z <= 1100 ).
1 P END MISSION. Go to
the end-mission/abort code. PASSWORD PROTECTED.
2 A N Set EEPROM[A] = N. USE WITH CAUTION !!!!!
A =
eeprom address (consult the XXXX.CFG file, where XXXX=s/n).
( 4 < A < 82 ).
N = new
value.
This
allows repairing values not normally accessible via shore commands.
3 i lat lon Changes waypoint[i] to
decimal degrees lat, lon.
i =
index into the waypoint list: 0 <= i
<= 19.
The
'HOME' waypoint can be changed as well (i=0).
4 (obsolete)
5 (obsolete) see cmd ‘W’.
6 (obsolete) see cmd ‘W’.
7 ir iw a d r
Changes the settings for a single route entry index ‘ir’.
The route
list consists of N sequential entries (1..N),
where the
basic route info (including N) is set using cmd ‘W’.
ir =
route entry to change ( 1 <= ir <= N ).
iw =
waypoint index to use for this route entry.
( if
ir=2, iw = 5, then the 2nd entry in the route will use waypt#5).
a = Approach Angle (True) for this route
entry.
0 <= a
<=360. This is the expected approach angle to this entry.
This is
used to define the ‘finish line’ when heading to this entry.
The
finish line intersects the waypt and is perpendicular to the
approach
angle. If a = 90 (approaching the waypt
from the west),
then the
finish will be a N-S line; if we are E of the finish,
we are
past the waypt.
If
a=0, then the approach angle is automatically computed, based
on the
Spray’s position at the time that the Spray switches to
this
waypt.
d = Waypoint arrival detection mode:
d=0 :
arrival is based on range only (inside the watch-circle radius).
d=1 :
arrival is either range OR crossing the finish line.
d=2 :
Finish-line only (rarely used).
r = Range [km] ( 0 <= r <10) to use for
the watch-circle radius.
If r=0, then the
maximum depth reached during the last dive is used to
calculate a watch-circle radius (but always limited to be
1<=r<=4 km).
8 z t n Change max depth to
z [dBar]. Valid range is 40 < z < 1001.
Change max glide time[minutes]to t allowed for descent, & also ascent...
maximum total dive
time = 2t. NO action is take if t<10
or t>600.
Set number of points to
average= n for the time series data compaction.
Data points are taken every 8 s, and n
points are averaged
for each output datum in the satellite
packet.
Valid range is 0 < n < 50.
9 t t
= minimum time [minutes] for one ‘dive cycle’: Valid for 0<t<60.
The
Spray will continue doing down-up cycles, counted as being the same
dive,
until dive time is greater than t. Data
from all cycles are sent
as one
dive. This is meant for shallow water
cycling.
A n Turns
on/off using the optical sensor: n=0
=off, n=1 =on.
When off
the optical sensor isn’t sampled, and the data’s not sent.
B n Change
the number of dives before ending the mission to n.
C t1 t2 dt wmin a f Change the Pump Parameters.
t1 =
max time[s] to pump.
400<t1<1800.
The oil
sensor is still monitored. This allows
extending the total
pump
time if the pump slows down.
t2 =
Deep pump time [s]. 60 < t2 <
300.
When
turning around at the bottom of the dive, the pump runs until
the
Spray is just past neutrally-buoyant (it starts to rise).
At this
time the pump runs for an extra t2 s.
This sets the initial
ascent
speed out of the bottom turn.
dt =
Incremental pump time [s]. 20 < dt
< 100.
On
ascent, when the Spray vertical speed, w, falls below wmin, the
pump is
run for dt s to get the Spray back up to speed.
wmin
= The minimum allowed ascent rate [cm/s].
4 < wmin < 20.
Every 5
minutes on ascent, w is calculated.
If it is < wmin then
the pump
is run for dt s.
a = max amps*100 allowed. 100<a<400.
If the
pump current exceeds a, then it is shut off.
The next
action
taken is determined by the value of f:
f = Amp-Action Flag 0<= f <= 2.
This is the action to take
if we exceed the max amps limit.
0= Take
no action (no changes are made to the mission).
1=
Change to 100m depth dives (but maintain the route).
2= Abort
the mission.
D n Ndive cmin cmax Determine the type of Set Correction to apply.
n = Set correction type to use.
0 = turn off set
correction.
1 = use set correction to
maintain the Course-Over-Ground heading
(
current-bucking mode, correct so we still head for the waypt).
ANY OTHER VALUE of n,
steer angle n to the present current.
Also known as
‘current-crossing’ mode.
If n=-90, steer left 90 degrees to the current, or if
n= 90, steer right 90 degrees to the current.
Ndive
= If using the current-crossing mode, then it will be automatically
turned off when the Spray
dive# > Ndive. Note that no
time-out
is applied if we’re in the
current-bucking mode (n=1).
cmin,
cmax are course correction limits for the set correction.
Let B = present bearing to
the next waypoint.
Let H = course heading to
steer after applying set correction,
(in either current-bucking or current-crossing mode).
H is kept bounded such
that B+cmin < H < B+cmax.
E n Ndive Steer
a Manual Heading.
n = manual heading to steer (True) if 0 <= n
<= 360.
If n
= -1, then the manual steering is turned off.
If n
= -2, then the Spray will just do circles (constant 30 degree roll).
Ndive
= Use the manual heading until the Spray dive #> Ndive.
F zmax ncell cellsize pulse_length
minsnr Set Doppler Settings (Mar05).
zmax [dBar] = max depth of ADP profile: 0
< zmax < 1000 (integer)
ncell = # of cells in each ensemble. 1 < ncell < 6.
cellsize [m] = cell vertical extent. 1
< cellsize < 11 (integer).
pulse_length [m] = pulse vertical length,
1 < x < 11 (integer).
minsnr = minimum SNR: average only for
SNR>minsnr. –2<x<10 (int).
if minsnr=-1, ignore SNR.
G n Change
the glide pitch angle. Valid
range is 5 < n < 41 degrees.
This is the absolute value used to glide
both up and down.
H n b Engineering
Time-Series Settings
n =
decimate the raw 8 sec engineering data by every nth point and send back.
n=0 =
off (send NO time-series).
b =
Bit-mask of what engineering parameters to send:
b =0 =
do NOT send any.
b =255 =
send ALL sensors.
b[i] =
bit i : if =1, send, if =0, do not.
b[0] =
time [s] of every nth point.
b[1] =
Pressure [counts].
b[2] =
Heading [ degrees*10].
b[3] =
Pitch Angle [degrees*10] from the compass tilt-meter.
b[4] =
Roll Angle [degrees*10] from the
compass tilt-meter.
b[5] =
Pitch Potentiometer [counts].
b[6] =
Roll Potentiometer [counts].
Example:
H 8 3 send every 8th
point (every 64 s) the
time-series of b[0] = time and b[1] =
Pressure.
I (obsolete, see cmd ‘C’).
J (obsolete, see cmd ‘C’).
K n Set
next_xmit = n [minutes]. Valid range = 10 < n < 600.
n = the minimum time [m] between satellite
transmissions.
If we're
doing multiple shallow water dives and we don't want
to
transmit every cycle, then next_xmit can be adjusted so we
only
transmit every 3 hours, for instance.
L n Set
The Argos Transmit Time to n [minutes]. -1
< n < 61.
n = The time in end-mission mode to wait with
the argos beacon on.
In the
End-of-Mission mode, the Argos transmitter is on for
n
minutes, followed by NGPS minutes of trying to get a GPS fix (see
cmd
‘M’), followed by NSBD minutes of trying to send a SBD message
(see cmd
‘U’).
When
this command is sent, it will also cause the Spray to run the
hydraulic
pump again for its maximum time, ensuring full bladders.
n = The max time [minutes] to try to get a GPS
fix: -1<n<21.
This applies for both mission mode and
end-mission/abort mode.
h = Heading to steer if there is no GPS fix.
If
0<= h <=360, then will steer this heading (True).
If h
= -1, then the Spray will just do circles.
If h
= -2, then it will steer the last valid direction.
If h
= -3, then it will head for the last valid direction to the HOME
waypoint.
N (obsolete).
P nPMP nSBD
Max_Rst Severity Level for
Exception Recovery Action
nPMP=
Pump Exception Level to take when there is a deep pump failure.
0 = No
changes are made to the Spray mission (ignore).
1 = Go
to shallow (100 m) dives.
2 = Do
shallow dives AND head for the HOME waypt.
3 =
Abort the mission.
nSBD=
SBD Exception Level when there has been no SBD comms in 48 hrs.
0 = No
changes are made to the Spray mission (ignore).
1 = Head
for the HOME waypoint.
2 = Do
shallow (100m) dives AND head for HOME.
3 =
Abort the mission.
Max_Rst =
Max spurious resets allowed before going to the abort code.
If=0,
then goes directly to abort.
Every
time ‘P’ is sent the reset counter (N_Reset) is cleared.
If
N_Reset<Max_Rst, then Spray gets to surface, does comms, & continues.
R n Re-tranmsit
all satellite packets associated with dive n.
The LIFO
buffer is searched for dive=n packets, and if found, their
status
flags are reset to 3 = 'not previously sent'.
S n_GPS n_SBD Set wing to use. range -1<n<3. (antenna
switch option)
n=0 =
STBD wing, n=1 = PORT wing, n=2 = Alternate between wings.
These
values have no effect if there is no antenna switch.
T n Ndive Steering
Point Distance (advanced navigation command).
n = Distance [km] further up the route line to
steer towards.
=0 =
turn off using the steering-point mode.
Ndive
= Use the steering point mode until the Spray dive # > Ndive.
Instead of steering
towards the waypoint, this will compute a ‘steering
point’ n km down
the route line to steer for. This will
get the Spray
more quickly back on the
route line.
U t1 t2 SBD Timing Parameters.
t1 =
Max surface time [s] to try SBD comms. Valid for 59 < t1 < 1800 s.
t2 =
Time to wait [s] before trying to re-send an SBD message.
Valid
for 30 < j < 200 s. =wait time if there no satellite is in view.
V n1 n2 Change Compass Settings:
n1 = Local variation: n1<0 for East, n1>0
for West (-180<n1<180).
Magnetic
course = True + n.
n2 = Flag to decide which compass calibration
to use:
n2=0 =
use the TCM2 on-board calibration coefficients.
n2=1 =
uset the Spray EEPROM calibration offsets.
W num new end dir : Route Settings (May06)
num
= Total number of waypoints in the route ( 1<= num <= 19).
new
= New Route index to head for ( 1 <=
new <= num).
end
= Action to take at the end-of-route.
0 = go
HOME.
1 =
repeat the route.
2 =
reverse the route.
3 = stay
stationed at the last waypoint in the route.
4 = END
the mission when the waypoint is reached (not advised).
dir
= direction to go through the route (1= forward, -1 = reverse )
Route/Waypoint Management should be executed through
sbd_route.pl to ensure the
proper commands are issued.
n=0 :
don’t use altimeter. n=1: use the
altimeter.
z0 [m] =
first depth on descent to start sampling the altimeter.
This
is to avoid shallow false-bottom detections. Valid for -1<z0 < 2000.
z1 [m] =
When the altimeter says we’re within z1 of the bottom,
then turn around and ascend. Valid for 0<z1<50.
@ (no other variables) : Request Route
Requests the Spray to return all of the route/waypoint info.
! (no other variables) : Request the mission
parameters.
The Spray will return with an EEPROM/RAM parameter list, used
to
help verify the present configuration.