Authors: John Kerfoot, David Aragon




Yüklə 78.36 Kb.
tarix28.02.2016
ölçüsü78.36 Kb.
SLOCUM Glider Mission Writing

------------------------------------------------------------------------------

Authors: John Kerfoot, David Aragon

Email: kerfoot@marine.rutgers.edu, dkaragon@marine.rutgers.edu

Creation Date: March 5, 2010

------------------------------------------------------------------------------


Introduction
The Slocum Coastal Electric Glider is commanded via user-generated missions executed from the glider shell (GliderDOS). GliderDOS is a subset of picoDOS, which itself is a subset of the Disk Operating System (DOS). As such, the file system uses the 8.3 naming convention, meaning that all files are restricted to 8 characters for the filename and 3 characters for the file extension.
Missions are comprised of the following file-types:


  • MISSION files (.mi extension)

  • MAFILES files (.ma extension)

While all of the mission directives can be specified in .mi files only, use of .ma files allows for much more flexibility in altering intended waypoints and science payload sampling as well as changing surface intervals, all of which may be done frequently during a deployment as deployment goals change.


Mission files are composed of behaviors (behavior: prefix), which themselves are composed of behavior arguments (b_arg: prefix) and sensor values (sensor: prefix). A typical mission file contains a series of behaviors and assigns priorities to each behavior to create a behavior stack or log_c_stack. This stack is then used to control the glider. Once a mission is started, the glider cycles through the behavior stack to determine which behavior is given priority. Once a behavior is started, it must finish before another behavior can begin.
Background: BEHAVIORS
A mission should always contain at least one instance of each of the following 7 behaviors:

  • behavior: abend

  • behavior: surface

  • behavior: goto_list

  • behavior: yo

  • behavior: sample

  • behavior: prepare_to_dive

  • behavior: sensors_in

Each of these behaviors plays a critical role in defining the mission parameters. The first 5 behaviors (abend, surface, goto_list, yo, and sample) are the most commonly modified behaviors, while the last 2 must ALWAYS be present in the mission, but are almost never modified by the end-user. As such, this document focuses on the 5 behaviors commonly used to modify glider behavior by the end user.


The following locations of the pertinent documents provided below are referenced from the top-level directory contained in the gliderDOS production_* folder:

  • ./src/doco: this directory contains all C-language source code and header files for all sensor definitions and behaviors. Perusing this source can provide a more detailed understanding of how each sensor and behavior actually work.

  • ./src/code/masterdata: this text document contains the default values for all sensors known to the glider. Any sensor: not directly set in a mission or ma file takes it’s default value from masterdata. The default sensor: values are set from this file during the compilation of the source code. This is a critical point as any change in a value in this file will NOT take effect unless the source code is re-compiled.

Typically, new sensor: values are set directly in the glider’s autoexec.mi file, a mission file or via the GliderDos prompt.

  • ./src/doco: contains readme files on the general design/description of the glider, filetypes and specfications.

The following is a summary of the behaviors used to control sampling on the

slocum glider. Default values for each b_arg are specified in the masterdata document and are used when not explicitly specified in the mission or ma file.
Please consult the masterdata version corresponding to the software version your glider is running. There are a number of documents contained in the source code release that can provide a complete description of all sensor: values as well as behavior: and b_arg: parameters.
behavior: abend

The abend behavior defines all of the critical reasons for the glider to abort the mission, climb to the surface and call the dockserver. Any abort triggered by the behavior arguments listed in this behavior can be thought of as a software abort, meaning that while significant, the deployment can most likely be completed.


behavior: surface

The surface behavior defines all of the reasons for the glider to surface and call the dockserver as well as the settings that define the climb to the surface (ie: pitch angle for the climb).


behavior: goto_list

The goto_list behavior defines the following:



  • The mission waypoints

  • The starting waypoint

  • The number of times to cycle through the waypoint list

  • The distance the glider must be from the current waypoint to satisfy the behavior.


behavior: yo

The yo behavior defines:



  • The dive to and climb to depths

  • The dive and climb pitch angles

  • The number of yos (dive/climb cycles) to perform

  • The minimum height off of the bottom


behavior: sample

The sample behavior, along with sensor: settings, controls the sampling state of each of the science payload sensors. It allows the user to turn on/off instruments, control the sampling rate of individual instruments and the portion of the yo (dive, climb, inflecting, hovering) for which the instrument is sampling.


behavior: prepare_to_dive

The prepare_to_dive behavior tells the glider how long to wait, while on the surface, to obtain a valid gps fix. Following the successful or unsuccessful GPS acquisition, the behavior then prepares for the dive (deflates airbag, turns off argo and turns off surface sensors) and, finally, intitiates the dive.


This behavior is typically place at the bottom of the behavior stack to initiate a dive.
behavior: sensors_in

The sensors_in behavior simply sets input sensor sampling times. By default it turns all the input sensors off.


This behavior is typically put at the bottom (lowest priority) of the behavior stack to shut everything off and then higher priority behaviors turn them on as needed or specified by the sample behaviors.
Mission Design

Mission are designed and written in 2 distinct ways:



  • All behaviors and sensor values are placed in the mission (.mi) file. While this consolidates the mission into a single file, any changes to the mission parameters (dive/climb depths, waypoint lists, surfacing intervals, etc.) require that the mission be exited (via ^C) and restarted before the changes take effect. The new mission file must be transferred to the glider and then the mission must be restarted. This process significantly increases the time the glider spends on the surface as well as the associated Iridium satellite communication cost.

  • While all behaviors and sensors values are placed in the mission file, most of the specific behavior arguments (b_arg:) defining the behaviors are specified in associated .ma files. The mission (.mi) defines the names of these .ma files using a specific behavior argument (b_arg: args_from_file(enum)) so that the glider knows which mafiles to include in the specified mission. This style of mission writing allows for a single mission to be run by a fleet of gliders while allowing the end-user to customize a single glider’s behavior to achieve the mission end goals. The most significant drawback of this style of mission is an increased complexity in the number of and types of files required.

Our recommendation is to use the second mission style explained above and the rest of this document details the requirements for writing missions using this style.


Mission Writing:
This section covers the specifics of each of the 7 main behaviors contained in a mission file and the behavior arguments (b_arg:) used to define them. The referenced mission file is tn.mi and is included with this manual. This mission, besides defining safety settings, dive parameters and sampling, allows for a surface event to be triggered based upon a timeout interval as well as a surface event to be triggered when the glider has not established communications for a specified time interval.
COMMENTS

Mission (.mi) and ma (.ma) files can be commented by prefacing the comment with a pound (#) sign. Everything after the # is recognized as a comment and ignored by the glider. Commenting of missions and ma files is strongly encouraged. For example, the tn.mi mission contains a commented header that describes the mission and lists the names of all supporting ma files used to customize the mission parameters.


BEHAVIORS:
behavior: abend

The abend behavior is a behavior which monitors various mission safety conditions and triggers a software abort if any of the conditions are violated. These types of aborts are almost always recoverable; that is, they almost never require the recovery of the glider. The abend behavior in tn.mi is displayed below:


# ABORT BEHAVIOR

behavior: abend


# OVERDEPTH: glider finds itself in > 204m of water

b_arg: overdepth(m) 204

b_arg: overdepth_sample_time(sec) 12
# OVERTIME: disabled

b_arg: overtime(sec) -1.0


# COP TICKLE: watchdog not tickled for 24 hours

b_arg: no_cop_tickle_for(sec) 50400.0

b_arg: no_cop_tickle_percent(%) -1

# SAMEDEPTH: 15 min every 60 seconds

b_arg: samedepth_for(sec) 900.0

b_arg: samedepth_for_sample_time(sec) 60.0


# STALLED FOR: 15 min every 60 seconds

b_arg: stalled_for(sec) 900.0

b_arg: stalled_for_sample_time(sec) 60.0

# HARDWARE: vacuum, battery

b_arg: undervolts(volts) 9.5

b_arg: undervolts_sample_time(sec) 12.0


b_arg: vacuum_max(inHg) 13.0

b_arg: vacuum_min(inHg) 5.0

b_arg: vacuum_sample_time(sec) 36.0
# WAYPOINT TOO FAR ABORT: 500km (500,000m)

b_arg: max_wpt_distance(m) 500000


The rest of the more common arguments are discussed below:


  • b_arg: overdepth(m): triggers an abort if the glider exceeds this depth, measured in meters.

  • b_arg: overtime(sec): triggers an abort if the total mission time exceeds this value, measured in seconds.

  • b_arg: no_cop_tickle(sec): the glider contains a hardware jumper controlling a watchdog circuit, which initiates the burnwire sequence used to eject the emergency weight at the aft of the glider. As long as the software is operating properly and “tickling” the watchdog circuit, the weight is not ejected. If the jumper time is exceeded, the burnwire sequence is intiated and the weight is ejected, necessitating a recovery of the glider. There are 2 different watchdog circuit configurations: a 2 hour and 16 hour version.

This behavior argument instructs the glider to trigger a “software” abort if the watchdog circuit has not been tickled for this amount of time, specified in seconds. In practice, the value specified should always be less than the length of the watchdog timer (either 2 or 16 hours).

In this example, with a glider that has a 16 hour watchdog circuit, we’ve specified that a software abort should be triggered at 50400 seconds (14 hours), giving us a 2 hour window before the hardware generates an abort.



  • b_arg: same_depth_for(sec): triggers an abort if the glider is stuck at depth for the specified time, measured in seconds.

  • b_arg: stalled_for(sec): triggers an abort if the glider is not moving horizontally through the water for the specified time, measured in seconds.

  • b_arg: undervolts(volts): triggers an abort if the battery voltage on the glider drops below the specified value, measured in volts. This is more of an issue with alkaline batteries than with lithium primaries or secondaries.

  • b_arg: vacuum_max(inHg): triggers an abort if the internal vacuum exceeds the specified value, measured in inches of Mercury.

  • b_arg: vacuum_min(inHg): triggers an abort if the internval vacuum drops below the specified value, measured in inches of Mercury.

  • b_arg: max_wpt_distance(m): triggers an abort if the distance to the current waypoint exceeds the specified value, measured in meters.

All behavior arguments (b_arg:) ending with *sample_time(sec) instruct the glider to check for the corresponding condition every x seconds. Setting the *sample_time(sec) behavior argument to a value less than 0 disables the check.

For example:
b_arg: overdepth(m) 204

b_arg: overdepth_sample_time(sec) 12


The first line instructs the glider to check that it’s current depth does not exceed 204 meters. The second line specifies how often to check for this condition.
An abort code, corresponding to the type of abort triggered by the behavior argument, is generated in the event this behavior is triggered. Here are a few examples of a specific abort type and the resulting code:


  • MS_ABORT_OVERDEPTH: results from exceeding the depth specified in b_arg: overdepth(m).

  • MS_ABORT_OVERTIME: results from exceeding the maximum allowable mission time specified in b_arg: overtime(sec).

  • MS_ABORT_WPT_TOOFAR: results from exceeding the maximum allowable distance to the current waypoint, as specified by b_arg: max_wpt_distance(m).

  • MS_ABORT_BEH_ERROR: normally results from an improperly defined behavior in a mission or ma file such as syntax or wrong number of waypoints in behavior: goto_list.

The full list of abort codes is specified in the gliderDOS release under:


./src/code/mission_status.h
Each code has a numeric termination code (also listed in command.h) that is displayed as part of the GliderDos prompt after the abort. For example, in the event that an overdepth abort was triggered, the GliderDos prompt would appear as:
GliderDos A 7 >
A more in-depth explanation of how aborts are triggered is presented in the GliderDos source under:
./src/doco/how-it-works/abort-sequences.txt
behavior: surface

Surface behaviors define the conditions under which a glider should attempt to surface as well as what to do while on the surface. The tn.mi mission utilizes 5 surfacing behaviors. All five surface behaviors are listed below:


# SURFACE BEHAVIOR: NOTHING COMMANDED

behavior: surface

b_arg: args_from_file(enum) 10 # mafiles/surfac10.ma

b_arg: start_when(enum) 1 # 1-stack idle


# SURFACE : No waypoints commanded

behavior: surface

b_arg: args_from_file(enum) 10 # mafiles/surfac10.ma

b_arg: start_when(enum) 3 # 3-heading idle


# SURFACE : SURFACING INTERVAL

behavior: surface

b_arg: args_from_file(enum) 20 # mafiles/surfac20.ma

b_arg: start_when(enum) 9 # 9-every when_secs


# SURFACE : HIT A WAYPOINT

behavior: surface

b_arg: args_from_file(enum) 30 # mafiles/surfac30.ma

b_arg: start_when(enum) 8 # 8-when hit waypoint


# SURFACE : NO COMMS

behavior: surface

b_arg: args_from_file(enum) 40 # mafiles/surfac40.ma

b_arg: start_when(enum) 12 # 12 No comms

A surface behavior can be activated under a number of conditions. You may specify what condition/state the glider must be in before a behavior becomes active by using the b_arg: start_when(enum) behavior argument. The full list of codes is contained in the GliderDos release source under:
./src/code/beh_args.h
The behavior becomes active when this condition is met. For example, the first surface behavior has a b_arg: start_when(enum) value set to 1, which corresponds to the command stack being idle. This occurs when the glider is not being commanded, ie: not doing anything. All surface behaviors should have this behavior argument specified.
Each of the surface behaviors contain another behavior argument, b_arg: args_from_file(enum). This behavior argument allows the behavior to be defined using an .ma file. In the case of the surface behavior, the ma filename is created by appending the number specified in b_arg: args_from_file(enum) to the string “surfac”, which results in surfac10.ma. This file must be placed in the MAFILES directory under the glider root. The contents of the surfac10.ma file for tn.mi are displayed below:
# Getting to the surface

behavior_name=surface



b_arg: c_use_bpump(enum) 2

b_arg: c_bpump_value(X) 1000

b_arg: c_use_pitch(enum) 3 # servo, rad, >0 = climb

b_arg: c_pitch_value(X) 0.4528 # 26 degrees



All behaviors defined in an external .ma file must have obey the following syntax rules:

  1. The first non-comment line must contain the following line: behavior_name=BEHAVIOR where BEHAVIOR is the desired behavior name (ie: surface, goto_list, etc.)

  2. The behavior arguments must be enclosed in tags.

There are 2 pieces to this behavior which define the use of the air bladder and the glider pitch for getting to the surface. The 2 behavior arguments containing c_use_* specify how the glider should measure each of the corresponding movements.


For example, b_arg: c_use_bpump(enum) 2 instructs the glider to push the buoyancy pump forward by an absolute volume (cc) measurement, which is specified by the next behavior arguments b_arg: c_bpump_value(X) 1000 (1000 cc), which is clipped to maximum allowable volume.
The next pair of behavior arguments defines the glider pitch. The first argument, b_arg: c_use_pitch(enum) 3 instructs the glider to move the pitch battery using feedback provided by the pitch servomechanism (or servo, for short). In other words, set the pitch angle to 0.4528 (b_arg: c_pitch_value(X) 0.4528) radians (or 26 degrees).
To sum up, this surface behavior tells the glider to climb to the surface at 0.4528 radians (26 degrees) and to fully inflate the air bladder.
A complete listing of device modes can be found near the end of the masterdata document.
The last 3 surface behaviors used in this mission control when the glider should surface. As each behavior contains the b_arg: args_from_file(enum) argument, each of the conditions making the behavior active are contained in the corresponding surfac*.ma file.
Surfacing at a Specified Time Interval:

This mission specifies a surfacing behavior triggered at a specified interval through the surfac20.ma file. The argument specifying when the behavior becomes active is:


b_arg: start_when(enum) 9
which corresponds to exceeding the specified time interval contained in surfac20.ma:
behavior_name=surface
# SURFAC20.MA (Timeout Expired)

# Surface for timeout expired

b_arg: when_secs(sec) 3600
# Flight Controls

b_arg: c_use_bpump(enum) 2

b_arg: c_bpump_value(X) 1000

b_arg: c_use_pitch(enum) 3 # servo, rad, >0 = climb

b_arg: c_pitch_value(X) 0.4528 # 26 degrees

# Surface Timeouts & Other Params

b_arg: report_all(bool) 0 # F->just gps

b_arg: end_action(enum) 1 # Surface menu

b_arg: gps_wait_time(sec) 600 # GPS wait

b_arg: keystroke_wait_time(sec) 300 # Surface time

b_arg: printout_cycle_time(sec) 40.0 # Surface menu print rate


The first behavior argument specified here is:
b_arg: when_secs(sec) 3600
The behavior instructs the glider to surface once every hour, regardless of any other surfacing behavior. The next 4 b_arg: parameters are identical to those specified in the prior surfacing behavior (surfac10.ma) and describe how the glider will surface (ie: at a pitch of 0.4528 radians with the air bladder fully inflated).
The next 5 b_arg: parameters define the glider’s behavior after it surfaces:


  • b_arg: report_all(bool):

  • b_arg: end_action(enum): instructs the glider on what to do once the gps position is acquired. In this case, the glider is instructed to wait for the user to end the mission (via ^C). Otherwise, resume the mission.

  • b_arg: gps_wait_time(sec): how long to wait to acquire a GPS fix, measured in seconds.

  • b_arg: keystroke_wait_time(sec): how long to wait for a keystroke before resuming the mission, measured in seconds.

  • b_arg: printout_cycle_time(sec): how often to print each surface dialog paragraph to the screen.


Surfacing When a Waypoint is Reached

This mission also specifies a surfacing behavior triggered when the glider reaches the current waypoint. The argument specifying when the behavior becomes active is:


b_arg: start_when(enum) 8
and the behavior arguments for this behavior are specified in the surfac30.ma (b_arg: args_from_file(enum) 30):
behavior_name=surface
# SURFAC30.MA (Waypoint Surface Radius)

# Surface Near Waypoint

b_arg: when_wpt_dist(m) 500

# Flight Controls

b_arg: c_use_bpump(enum) 2

b_arg: c_bpump_value(X) 1000

b_arg: c_use_pitch(enum) 3 # servo, rad, >0 = climb

b_arg: c_pitch_value(X) 0.4528 # 26 degrees

# Surface Timeouts & Other Params

b_arg: report_all(bool) 0 # F->just gps

b_arg: end_action(enum) 1 # Surface menu

b_arg: gps_wait_time(sec) 600 # GPS wait

b_arg: keystroke_wait_time(sec) 300 # Surface time

b_arg: printout_cycle_time(sec) 40.0 # Surface menu print rate




The only new b_arg in this file is the first one:
b_arg: when_wpt_dist(m) 500
which tells the glider that it must be a minimum of 500 meters from the current waypoint to satisfy the behavior and surface.
Surfacing After a Specified Interval of No Communication

This mission also specifies a surfacing behavior triggered if the glider has not had contact with shore for a specified interval. The argument specifying when the behavior becomes active is:


b_arg: start_when(enum) 9
which corresponds to exceeding the specified time interval contained in surfac40.ma:
behavior_name=surface
# SURFAC40.MA (No Comms)

# Surface for no comms (file transfer uncompleted)

b_arg: when_secs(sec) 5400
# Flight Controls

b_arg: c_use_bpump(enum) 2

b_arg: c_bpump_value(X) 1000

b_arg: c_use_pitch(enum) 3 # servo, rad, >0 = climb

b_arg: c_pitch_value(X) 0.4528 # 26 degrees

# Surface Timeouts & Other Params

b_arg: report_all(bool) 0 # F->just gps

b_arg: end_action(enum) 1 # Surface menu

b_arg: gps_wait_time(sec) 600 # GPS wait

b_arg: keystroke_wait_time(sec) 300 # Surface time

b_arg: printout_cycle_time(sec) 40.0 # Surface menu print rate


In this case:
b_arg: when_secs(sec) 5400
tells the glider to surface if it has not had a successful connection for 90 minutes. This behavior is typically used in conjunction with a timeout surfacing behavior in the following way: the timeout surfacing behavior (surfac20.ma) is used as the preferred surfacing method and, in this case, is set to 60 minutes (3600 seconds). If the glider surfaces but is not able to successfully connect to the dockserver, it will dive after 5 minutes (b_arg: keystroke_wait_time(sec) 300). 30 minutes later, however, the no comms behavior will be triggered and the glider will surface and attempt to connect again, rather than wait another 60 minutes for the timeout surfacing behavior to trigger.
behavior: goto_list

The goto_list behavior is used to specify the list of waypoint, which waypoint to head to first, and how many times to cycle through the waypoint list. As with the surface behaviors discussed above, the arguments defining this behavior are specified in a ma file as follows:


# Waypoint GOTO_LIST

behavior: goto_list

b_arg: args_from_file(enum) 10 # mafiles/goto_l10.ma

b_arg: start_when(enum) 0 # 0-immediately


which, in this case, is the goto_l10.ma file:
behavior_name=goto_list
# ENDURANCE LINE (OFFSHORE WAYPOINT FIRST)

# 1 km RADIUS


b_arg: num_legs_to_run(nodim) -1 # -1 loop,-2 run once,> 0 this many legs

b_arg: start_when(enum) 0 # 0 baw_immediately

b_arg: list_stop_when(enum) 7 # 7 baw_when_wpt_dist

# SATISFYING RADIUS

b_arg: list_when_wpt_dist(m) 3000

# LIST PARAMETERS

b_arg: initial_wpt(enum) -1 # 0 to n-1,-1 first after last,-2 closest

b_arg: num_waypoints(nodim) 2 # num of waypoints in list


-7414.000 3926.250

-7252.500 3900.000


The first 6 behavior arguments define how to treat the waypoint list:


  • b_arg: num_legs_to_run(nodim): specifies how many times to traverse the waypoint list. A value of -1 runs it indefinitely, -2 runs through the list once and a value greater than 0 runs through the list that many times.

  • b_arg: start_when(enum): specifies when to start the behavior, in this case, immediately.

  • b_arg: list_stop_when(enum): only used if set to 7, this b_arg applies a stopping condition to all of the waypoints in the list. In this case, the stopping condition is specified with the next behavior argument.

  • b_arg: list_when_wpt_dist(m): each of the waypoints in the list are achieved when the glider’s distance is less than 3000 meters.

  • b_arg: initial_waypoint(enum): specifies which waypoint to head to first. A value of 0 to n-1 number of waypoints specifies that waypoint as the first in the list. A value of -1 selects the first waypoint in the list after the last one encountered and a value of -2 selects the closest. The setting of -2 needs some clarification, however. The closest waypoint is not actually selected. Instead, the midpoints between each successive pair of waypoints are calculated first. The waypoint selected is that which comes after the midpoint that is closest to the glider. This selection criteria can result in a puzzling waypoint selection, depending on the geometry of the waypoints desired.

  • b_arg: num_waypoints(enum): a safety argument. This b_arg must specify the number of you wapoints in the specified list, otherwise the glider will abort the mission.


behavior: yo

The yo behavior is used to specify the diving and climbing behavior of the glider. As with the other behaviors discussed above, the arguments defining this behavior are specified in a ma file as follows:


# YO : FLIGHT SETTINGS

behavior: yo

b_arg: args_from_file(enum) 10 # mafiles/yo10.ma

b_arg: start_when(enum) 2 # 2-depth idle

b_arg: end_action(enum) 2 # 2 resume
which, in this case, is the yo10.ma file:
behavior_name=yo

# 2009_05_05 dkaragon shrunk size, pitch settings 5/5/09




b_arg: start_when(enum) 2 # pitch idle

b_arg: num_half_cycles_to_do(nodim) -1 # infinite


# DIVE #

b_arg: d_target_depth(m) 98

b_arg: d_target_altitude(m) 5

b_arg: d_use_bpump(enum) 2 # absolute (cc)

b_arg: d_bpump_value(X) -1000.0

b_arg: d_use_pitch(enum) 3 # servo

b_arg: d_pitch_value(X) -0.4537 # radians

b_arg: d_stop_when_stalled_for(sec) 240

b_arg: d_stop_when_hover_for(sec) 180
# CLIMB #

b_arg: c_target_depth(m) 5

b_arg: c_target_altitude(m) -1

b_arg: c_use_bpump(enum) 2 # absolute (cc)

b_arg: c_bpump_value(X) 1000.0

b_arg: c_use_pitch(enum) 3 # servo

b_arg: c_pitch_value(X) 0.4537 # radians

b_arg: c_stop_when_stalled_for(sec) 240

b_arg: c_stop_when_hover_for(sec) 180

b_arg: end_action(enum) 2



The first behavior argument (b_arg: start_when(enum)) instructs the glider to begin a new yo when the pitch is idle (ie: not being actively adjusted). The next behavior argument (b_arg: num_half_cycles_to_do(nodim):) specifies the number of yos (dive/climb cycles) to perform. Setting to -1 results in an infinite number of yos. This setting is typically used when surfacing behaviors triggered based on either a timeout or no comms are included in the mission. Setting this value to a number greater than 0 causes the glider to perform this many yos before satisfying the behavior.
The rest of the behavior arguments define the diving (d_*) and climbing (c_*) behavior of the glider:

  • b_arg: d_target_depth(m): the depth to dive to, specified in meters.

  • b_arg: d_target_altitude(m): while diving to d_target_depth, stay this far off of the bottom, specified in meters.

  • b_arg: d_use_bpump(enum): use an absolute measurement for the buoyancy pump.

  • b_arg: d_bpump_value(X): pull (negative value) the buoyancy pump piston this far backwards (large values are clipped), measured in cubic centimeters due to b_arg: d_use_bpump(enum).

  • b­_arg: d_use_pitch(enum): use the servomechanism to measure the pitch angle.

  • b_arg: d_pitch_value(X): dive at a pitch angle of 0.4537 radians (~26 degrees).

  • b_arg: d_stop_when_stalled_for(sec): keep diving until the glider determines it is no longer flying horizontally for this long, specified in seconds.

  • b_arg: d_stop_when_hover_for(sec): keep diving until the glider determines it is no longer flying vertically for this long, specified in seconds.

All of the same behavior arguments are also used to define the climbing behavior; however the d_ is replaced with a c_ and the c_bpump_value(X) is positive, signaling that the pump should be pushed forward, and the c_pitch_value(X) value is positive.


behavior: sample

The sample behavior can be used to control either all of the scientific instrumentation as a unit or to customize sampling strategy on an instrument by instrument basis. In order to use individual sample behaviors to control each instrument, the following sensor must be set:


sensor: c_science_all_on_enabled 0
This sensor value can either be set in the glider’s autoexec.mi configuration file or in the individual mission file (the preferred spot), in this case, tn.mi. As with the other behaviors discussed above, the arguments defining this behavior are specified in a ma file as follows:
# SAMPLE : CTD

behavior: sample

b_arg: args_from_file(enum) 10 # mafiles/sample10.ma
Arguments controlling the sampling of the CTD are defined in the sample10.ma:
behavior_name=sample
# SAMPLE10.MA (CTD)

b_arg: sensor_type(enum) 1 # CTD

b_arg: sample_time_after_state_change(s) 0 # start sampling right away
# Sampling Arguments

b_arg: intersample_time(sec) 4 # if < 0 then off

# if = 0 then fast as posible,

# >0 that number

b_arg: state_to_sample(enum) 7 # 7 diving|hovering|climbing


The behavior argument settings are as follows:


  • b_arg: sensor_type(enum): an integer corresponding the the type of instrument this behavior is controlling. A full list of instrument type specifications is located in: ./src/code/sample.c.

  • b_arg: sample_time_after_state_change(s): how long after a state change to continue sampling.

  • b_arg: intersample_time(sec): how often to sample, specified in seconds. A negative value turns the sensor off, 0 samples as fast as the instrument can and a value larger than zero samples that often.

  • b_arg: state_to_sample(enum): a bit field used to describe which states to sample during. The glider has four states (specified with their individual bit values): 1) diving, 2) hovering, 4) climbing and 8)on the surface. The value is set to 7, which instructs the CTD to sample during dives, hovers and climbs (1 + 2 + 4).


Using ma Files to Modify a Mission on the Fly

With a general understanding of the relationship between mission (.mi) and ma files (.ma), it’s possible to modify deployment goals while minimally interfering with the glider. This is accomplished through the modification of ma files and re-compiling the mission/ma files from with a currently running mission.


For example, if the user wanted to extend the timeout surfacing behavior interval from 1 hour to 3 hours, they just need to create a new surfac20.ma file with the desired timeout (ie: 10800 seconds or 3 hours) and either place it on the glider prior to deployment (with different filename, then renaming it to surfac20.ma) or transfer it to the glider, from the dockserver terminal, using the following command:
!dockzr surfac20.ma
Once the .ma file has been received, the user must send a ^F sequence from the dockserver terminal. This sequence results in a re-compiling of the mission and associated ma files. The new timeout then takes effect. Likewise, the list of target waypoints can be modified by creating a new goto_l10.ma file and performing the same sequence of events.
In comparison, a mission that is contained in a single .mi file can only be started after exiting the current mission and then restarting the new mission. This has a number of drawbacks: 1) The mission file is often larger (>5x the size) than even a few .ma files and 2) A lot of time is wasted on the surface, where the glider is subject to damage and unintended movement due to surface currents and wind fields.
This illustrates the flexibility provided by specifying mission parameters via ma files.


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azrefs.org 2016
rəhbərliyinə müraciət

    Ana səhifə