lineCaptureDepthUSBLMode.xml

Page auto-generated from XML file.

Failure

The generated TethysL source could not be parsed, likely due to source XML not being well-formed.

Below is the compile error at the TethysL level, as well as the source XML.

The TethysL file name shown below does not necessarily indicate the file exists, but hints about the actual corresponding .xml file.

Syntax error:
    --> lrauv-application/Missions/Deprecated/Engineering/lineCaptureDepthUSBLMode.xml:163:7
     | 
 159 | 
 160 |     aggregate Terminal {
 161 |       run in sequence
 162 | 
 163 |       run when (
     |       ^^^
 164 |         Mode > 1 count
 165 |       )
 166 | 
 167 |       syslog important "Terminal Mode. Requesting multiple pings if available. Range: "
     | 
Unexpected: `run`
Possible items include (total 15):
  break
  aggregate
  assign
  behavior
  [...7 more...]
  macro
  preemptive
  timeout
  }
  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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
mission lineCaptureDepthUSBLMode {
  """
  Home to transponder while maintaining altitude. The mission sequence:
  (*) Start (1) Midcourse guidance: nav to target WP while querying
  transponder (2) Terminal guidance: home to target using DUSBL tracking
  data (4) Dock: final approach using fixed heading.
  """

  arguments {
    # Define mission arguments

    MissionTimeout = 4 hour
      """
      Maximum length of mission
      """

    NeedCommsTime = 240 minute
      """
      How often to surface for commumications
      """

    MicromodemCommsInterval = 5 minute
      """
      How often to trigger Umodem communications
      """

    Repeat = 1 count
      """
      Number of times the vehicle should try to cycle through the homing
      sequence.
      """

    WaitOnDockTimeout = 5 minute
      """
      Time duration to wait on the dock after a successful line capture.
      """

    TransponderCode = Dock:Dock.transponderCode
      """
      Transponder Address.
      """

    TrackingUpdatePeriod = 2.5 second
      """
      How long to wait between acoustic queries.
      """

    NumberOfPings = 1 count
      """
      Number of pings requested before terminal guidance. Set this to 1.
      """

    NumberOfUSBLPings = 254 count
      """
      Number of pings requested for Benthos USBL Mode. This should be 2x the
      distance but max is 255. It will request again after the 255 pings.
      """

    MinAltitude = 5 meter
      """
      Minimum height above the sea floor for the entire mission.
      """

    MaxDepth = 205 meter
      """
      Maximum depth for the entire mission.
      """

    MinOffshore = 2 kilometer
      """
      Minimum offshore distance for the entire mission.
      """
  }

  output {
    # Mission Variables (don't change)

    Mode = -1 count
      """
      Mission variable (don't change). The mission sets this variable to
      reflect the termination status of the LineCapture insert.
      """
  }

  # Mission timeout

  timeout duration=MissionTimeout

  insert Insert/Science.tl {
    """
    Most missions will run the science sensors. If you don't place this
    aggregate above NeedComms, science instruments get turned off on the
    last upcast and while floating on the surface.
    """
  }



  # Safety nets and surfacing behaviors

  insert Insert/StandardEnvelopes.tl


  assign in sequence StandardEnvelopes:MinAltitude = MinAltitude

  assign in sequence StandardEnvelopes:MaxDepth = MaxDepth

  assign in sequence StandardEnvelopes:MinOffshore = MinOffshore

  insert Insert/NeedComms.tl id="NeedComms"


  assign in sequence NeedComms:DiveInterval = NeedCommsTime

  assign in sequence NeedComms:WaitForPitchUp = 0 minute

  # Micromodem comms

  insert Insert/MicromodemComms.tl id="MicromodemComms" {
    redefineArg CommsInterval = MicromodemCommsInterval
  }



  # Add track acoustic contact directive high in the stack.

  behavior Estimation:TrackAcousticContact {
    run in parallel
    set Estimation:TrackAcousticContact.contactLabelSetting = TransponderCode
    set Estimation:TrackAcousticContact.numberOfSamplesSetting = NumberOfPings
    set Estimation:TrackAcousticContact.updatePeriodSetting = TrackingUpdatePeriod
  }

  # Add LineCapture directives.

  insert Insert/LineCapture.tl


  # Add SetNav directives.

  insert Insert/SetNavAcoustic.tl


  # Start mission sequence.

  aggregate Lap {
    run in sequence repeat=Repeat

    assign in sequence Mode = -99 count

    # Execute the LineCapture sequence.

    call refId="LineCapture"

    assign in sequence Mode = LineCapture:GuidanceMode

    syslog info "Mode"
         + Mode ~ count

    aggregate Terminal {
      run in sequence

      run when (
        Mode > 1 count
      )

      syslog important "Terminal Mode. Requesting multiple pings if available. Range: "
           + Estimation:TrackAcousticContact.range_to_contact ~ meter
           + "."

      assign in sequence NumberOfPings = NumberOfUSBLPings
    }

    aggregate Docked {
      run in sequence

      break if (
        Mode < 0 count
      )

      syslog info "Waiting on dock for "
           + WaitOnDockTimeout ~ minute

      behavior Dock:Docked {
        run in sequence
        timeout duration=WaitOnDockTimeout
      }

      aggregate Detach {
        run in sequence

        syslog important "Breaking off. Range: "
             + Estimation:TrackAcousticContact.range_to_contact ~ meter
             + "."

        behavior Dock:Undock {
          run in sequence
        }
      }
    }
  }
}
  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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?xml version="1.0" encoding="UTF-8"?>
<Mission xmlns="Tethys"
    xmlns:Estimation="Tethys/Estimation"
    xmlns:Guidance="Tethys/Guidance"
    xmlns:Units="Tethys/Units"
    xmlns:Dock="Tethys/Dock"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="Tethys http://okeanids.mbari.org/tethys/Xml/Tethys.xsd
                        Tethys/Dock http://okeanids.mbari.org/tethys/Xml/Dock.xsd
                        Tethys/Estimation http://okeanids.mbari.org/tethys/Xml/Estimation.xsd
                        Tethys/Guidance http://okeanids.mbari.org/tethys/Xml/Guidance.xsd
                        Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd"
    Id="lineCaptureDepthUSBLMode">

    <Description>
        Home to transponder while maintaining altitude. The mission sequence:
        (*) Start (1) Midcourse guidance: nav to target WP while querying
        transponder (2) Terminal guidance: home to target using DUSBL tracking
        data (4) Dock: final approach using fixed heading.
    </Description>

<!-- Define mission arguments -->

    <DefineArg Name="MissionTimeout"><Description>
        Maximum length of mission
    </Description><Units:hour/><Value>4</Value></DefineArg>

    <DefineArg Name="NeedCommsTime"><Description>
        How often to surface for commumications
    </Description><Units:minute/><Value>240</Value></DefineArg>

    <DefineArg Name="MicromodemCommsInterval"><Description>
        How often to trigger Umodem communications
    </Description><Units:minute/><Value>5</Value></DefineArg>

    <DefineArg Name="Repeat"><Description>
        Number of times the vehicle should try to cycle through the homing
        sequence.
    </Description><Units:count/><Value>1</Value></DefineArg>

    <DefineArg Name="WaitOnDockTimeout"><Description>
        Time duration to wait on the dock after a successful line capture.
    </Description><Units:minute/><Value>5</Value></DefineArg>

    <DefineArg Name="TransponderCode"><Description>
        Transponder Address.
    </Description><Dock:Dock.transponderCode/></DefineArg>

    <DefineArg Name="TrackingUpdatePeriod"><Description>
        How long to wait between acoustic queries.
    </Description><Units:second/><Value>2.5</Value></DefineArg>

    <DefineArg Name="NumberOfPings"><Description>
        Number of pings requested before terminal guidance. Set this to 1.
    </Description><Units:count/><Value>1</Value></DefineArg>

    <DefineArg Name="NumberOfUSBLPings"><Description>
        Number of pings requested for Benthos USBL Mode. This should be 2x the
        distance but max is 255. It will request again after the 255 pings.
    </Description><Units:count/><Value>254</Value></DefineArg>

    <DefineArg Name="MinAltitude"><Description>
        Minimum height above the sea floor for the entire mission.
    </Description><Units:meter/><Value>5</Value></DefineArg>

    <DefineArg Name="MaxDepth"><Description>
        Maximum depth for the entire mission.
    </Description><Units:meter/><Value>205</Value></DefineArg>

    <DefineArg Name="MinOffshore"><Description>
        Minimum offshore distance for the entire mission.
    </Description><Units:kilometer/><Value>2</Value></DefineArg>

<!-- Mission Variables (don't change) -->

    <DefineOutput Name="Mode"><Description>
        Mission variable (don't change). The mission sets this variable to
        reflect the termination status of the LineCapture insert.
    </Description><Units:count/><Value>-1</Value></DefineOutput>

<!-- Mission timeout -->

    <Timeout Duration="MissionTimeout"/>

    <Insert Filename="Insert/Science.tl">
        <Description>
            Most missions will run the science sensors. If you don't place this
            aggregate above NeedComms, science instruments get turned off on the
            last upcast and while floating on the surface.
        </Description>
    </Insert>

<!-- Safety nets and surfacing behaviors -->

    <Insert Filename="Insert/StandardEnvelopes.tl"/>

    <Assign><Sequence/><Arg Name="StandardEnvelopes:MinAltitude"/><Arg Name="MinAltitude"/></Assign>

    <Assign><Sequence/><Arg Name="StandardEnvelopes:MaxDepth"/><Arg Name="MaxDepth"/></Assign>

    <Assign><Sequence/><Arg Name="StandardEnvelopes:MinOffshore"/><Arg Name="MinOffshore"/></Assign>

    <Insert Filename="Insert/NeedComms.tl" Id="NeedComms"/>

    <Assign><Sequence/><Arg Name="NeedComms:DiveInterval"/><Arg Name="NeedCommsTime"/></Assign>

    <Assign><Sequence/><Arg Name="NeedComms:WaitForPitchUp"/><Units:minute/><Value>0</Value></Assign>

<!-- Micromodem comms -->

    <Insert Filename="Insert/MicromodemComms.tl" Id="MicromodemComms">
        <RedefineArg Name="CommsInterval"><Arg Name="MicromodemCommsInterval"/></RedefineArg>
    </Insert>

<!-- Add track acoustic contact directive high in the stack. -->

    <Estimation:TrackAcousticContact>
        <Parallel/>
        <Setting><Estimation:TrackAcousticContact.contactLabelSetting/><Arg Name="TransponderCode"/></Setting>
        <Setting><Estimation:TrackAcousticContact.numberOfSamplesSetting/><Arg Name="NumberOfPings"/></Setting>
        <Setting><Estimation:TrackAcousticContact.updatePeriodSetting/><Arg Name="TrackingUpdatePeriod"/></Setting>
    </Estimation:TrackAcousticContact>

<!-- Add LineCapture directives. -->

    <Insert Filename="Insert/LineCapture.tl"/>

<!-- Add SetNav directives. -->

    <Insert Filename="Insert/SetNavAcoustic.tl"/>

<!-- Start mission sequence. -->

    <Aggregate Id="Lap">

        <Sequence Repeat="Repeat"/>

        <Assign><Sequence/><Arg Name="Mode"/><Units:count/><Value>-99</Value></Assign>

<!-- Execute the LineCapture sequence. -->

        <Call RefId="LineCapture"/>

        <Assign><Sequence/><Arg Name="Mode"/><Arg Name="LineCapture:GuidanceMode"/></Assign>

        <Syslog Severity="Info">Mode<Arg Name="Mode"/><Units:count/></Syslog>

        <Aggregate Id="Terminal">

            <Sequence/>

            <When>
                <Arg Name="Mode"/>
                <Gt><Units:count/><Value>1</Value></Gt>
            </When>

            <Syslog Severity="Important">Terminal Mode. Requesting multiple pings if available. Range: <Estimation:TrackAcousticContact.range_to_contact/><Units:meter/>.</Syslog>

            <Assign><Sequence/><Arg Name="NumberOfPings"/><Arg Name="NumberOfUSBLPings"/></Assign>

        </Aggregate>

        <Aggregate Id="Docked">

            <Sequence/>

            <Break><Arg Name="Mode"/>
                <Lt><Units:count/><Value>0</Value></Lt>
            </Break>

            <Syslog Severity="Info">Waiting on dock for <Arg Name="WaitOnDockTimeout"/><Units:minute/></Syslog>

            <Dock:Docked>
                <Sequence/>
                <Timeout Duration="WaitOnDockTimeout"/>
            </Dock:Docked>

            <Aggregate Id="Detach">

                <Sequence/>

                <Syslog Severity="Important">Breaking off. Range: <Estimation:TrackAcousticContact.range_to_contact/><Units:meter/>.</Syslog>

                <Dock:Undock>
                    <Sequence/>
                </Dock:Undock>

            </Aggregate>

        </Aggregate>

    </Aggregate>

</Mission>