FDI nominal.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/FDI_nominal.xml:117:7
     | 
 113 |       timeout duration=P1M {
 114 |         syslog error "Timed out moving mass shifter."
 115 |       }
 116 | 
 117 |       break if (
     |       ^^^^^
 118 |         abs ( Universal:platform_mass_position - HomeLocation ) < AllowableMassDeadband
 119 |       )
 120 |       set Guidance:Pitch.massPosition = HomeLocation
 121 |     }
     | 
Unexpected: `break`
One of the following is possible:
  set
  (second form of behavior setting)
  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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
mission FDI_nominal {
  arguments {
    InsertDepth = 4 meter
      """
      Depth to settle.
      """

    InsertSettleTime = 4 minute
      """
      Time to settle.
      """

    AllowableMassDeadband = 0.1 millimeter
      """
      How close to get to the specified mass position before considering it
      close enough. This goes into a mission-level Break condition because
      Guidance:Pitch.massPosition never evaluates to satisfied.
      """

    MassDefault = Control:VerticalControl.massDefault

    ExperimentMassDefault = 0 millimeter

    FwdLocation = 35 millimeter
      """
      Move here on the fwd stroke.
      """

    AftLocation = -18 millimeter
      """
      Move here on the backward stroke.
      """

    HomeLocation = 0 millimeter
      """
      Move here at the beginning and end of each experiment.
      """

    Loops = 135 count
      """
      Number of experiment iterations.
      """

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

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

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

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

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

  timeout duration=MissionTimeout

  insert Insert/NeedComms.tl id="NeedComms"


  assign in sequence NeedComms:DiveInterval = NeedCommsTime

  insert Insert/StandardEnvelopes.tl


  assign in sequence StandardEnvelopes:MinAltitude = MinAltitude

  assign in sequence StandardEnvelopes:MaxDepth = MaxDepth

  assign in sequence StandardEnvelopes:MinOffshore = MinOffshore

  behavior Guidance:SetSpeed {
    run in parallel
    set Guidance:SetSpeed.speed = 0 meter_per_second
  }

  behavior Guidance:Pitch {
    run in parallel
    set Guidance:Pitch.depth = InsertDepth
  }

  syslog info "Waiting for the vehicle to settle. Depth = "
       + Universal:depth ~ meter

  behavior Guidance:Wait {
    run in sequence
    set Guidance:Wait.duration = InsertSettleTime
  }

  aggregate HomeToZero {
    run in sequence

    assign in parallel Control:VerticalControl.massDefault = ExperimentMassDefault

    syslog "\"Homing\""

    behavior Guidance:Pitch {
      run in sequence
      timeout duration=P1M {
        syslog error "Timed out moving mass shifter."
      }

      break if (
        abs ( Universal:platform_mass_position - HomeLocation ) < AllowableMassDeadband
      )
      set Guidance:Pitch.massPosition = HomeLocation
    }

    aggregate PowerFDI {
      syslog "\"Powering\""

      readData strategy="MinError" {
        in parallel
        Sensor:FDI.powerFDI
      }

      syslog "\"Waiting for payload to boot\""

      behavior Guidance:Wait {
        run in sequence
        set Guidance:Wait.duration = 2 minute
      }

      aggregate Experiment {
        run in sequence repeat=Loops

        syslog "\"Experiment beginning: Idling for 10 seconds\""

        behavior Guidance:Wait {
          run in sequence
          set Guidance:Wait.duration = 10 second
        }

        aggregate RunFDI {
          run in sequence

          syslog "\"Starting FDI\""

          readData strategy="MinError" {
            in parallel
            Sensor:FDI.runFDI
          }

          syslog "\"Waiting\""

          behavior Guidance:Wait {
            run in sequence
            set Guidance:Wait.duration = 10 second
          }

          syslog "\"Sending Mass Shifter fwd\""

          behavior Guidance:Pitch {
            run in sequence
            timeout duration=P1M {
              syslog error "Timed out moving mass shifter."
            }

            break if (
              abs ( Universal:platform_mass_position - FwdLocation ) < AllowableMassDeadband
            )
            set Guidance:Pitch.massPosition = FwdLocation
          }

          syslog "\"Sending Mass Shifter back\""

          behavior Guidance:Pitch {
            run in sequence
            timeout duration=P2M {
              syslog error "Timed out moving mass shifter."
            }

            break if (
              abs ( Universal:platform_mass_position - AftLocation ) < AllowableMassDeadband
            )
            set Guidance:Pitch.massPosition = AftLocation
          }

          syslog "\"Sending Mass Shifter to 0\""

          behavior Guidance:Pitch {
            run in sequence
            timeout duration=P1M {
              syslog error "Timed out moving mass shifter."
            }

            break if (
              abs ( Universal:platform_mass_position - HomeLocation ) < AllowableMassDeadband
            )
            set Guidance:Pitch.massPosition = HomeLocation
          }

          syslog "\"Stopping FDI\""
        }
      }
    }
    # <Syslog>"Leaving payload powered for 30 min."</Syslog>
    # <Guidance:Wait>
    #   <Sequence/>
    #   <Setting><Guidance:Wait.duration/><Units:minute/><Value>30</Value></Setting>
    # </Guidance:Wait>

  }
}
  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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?xml version="1.0" encoding="UTF-8"?>
<Mission xmlns="Tethys"
       xmlns:Control="Tethys/Control"
       xmlns:Guidance="Tethys/Guidance" 
       xmlns:Sensor="Tethys/Sensor"
       xmlns:Units="Tethys/Units"
       xmlns:Universal="Tethys/Universal"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="Tethys http://okeanids.mbari.org/tethys/Xml/Tethys.xsd
                           Tethys/Control http://okeanids.mbari.org/tethys/Xml/Control.xsd
                           Tethys/Guidance http://okeanids.mbari.org/tethys/Xml/Guidance.xsd
                           Tethys/Sensor http://okeanids.mbari.org/tethys/Xml/Sensor.xsd
                           Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd
                           Tethys/Universal http://okeanids.mbari.org/tethys/Xml/Universal.xsd"
       Id="FDI_nominal">

    <DefineArg Name="InsertDepth"><Description>
        Depth to settle.
    </Description><Units:meter/><Value>4</Value></DefineArg>

    <DefineArg Name="InsertSettleTime"><Description>
        Time to settle.
    </Description><Units:minute/><Value>4</Value></DefineArg>

    <DefineArg Name="AllowableMassDeadband"><Description>
        How close to get to the specified mass position before considering it
        close enough. This goes into a mission-level Break condition because
        Guidance:Pitch.massPosition never evaluates to satisfied.
    </Description><Units:millimeter/><Value>0.1</Value></DefineArg>

    <DefineArg Name="MassDefault"><Control:VerticalControl.massDefault/></DefineArg>

    <DefineArg Name="ExperimentMassDefault"><Units:millimeter/><Value>0</Value></DefineArg>

    <DefineArg Name="FwdLocation"><Description>
        Move here on the fwd stroke.
    </Description><Units:millimeter/><Value>35</Value></DefineArg>

    <DefineArg Name="AftLocation"><Description>
        Move here on the backward stroke.
    </Description><Units:millimeter/><Value>-18</Value></DefineArg>

    <DefineArg Name="HomeLocation"><Description>
        Move here at the beginning and end of each experiment.
    </Description><Units:millimeter/><Value>0</Value></DefineArg>

    <DefineArg Name="Loops"><Description>
        Number of experiment iterations.
    </Description><Units:count/><Value>135</Value></DefineArg>

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

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

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

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

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

    <Timeout Duration="MissionTimeout"/>

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

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

    <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>

    <Guidance:SetSpeed>
        <Parallel/>
        <Setting><Guidance:SetSpeed.speed/><Units:meter_per_second/><Value>0</Value></Setting>
    </Guidance:SetSpeed>

    <Guidance:Pitch>
        <Parallel/>
        <Setting><Guidance:Pitch.depth/><Arg Name="InsertDepth"/></Setting>
    </Guidance:Pitch>

    <Syslog Severity="Info">Waiting for the vehicle to settle. Depth = <Universal:depth/><Units:meter/></Syslog>

    <Guidance:Wait>
        <Sequence/>
        <Setting><Guidance:Wait.duration/><Arg Name="InsertSettleTime"/></Setting>
    </Guidance:Wait>

    <Aggregate Id="HomeToZero">

        <Sequence/>

        <Assign><Parallel/><Control:VerticalControl.massDefault/><Arg Name="ExperimentMassDefault"/></Assign>

        <Syslog>"Homing"</Syslog>

        <Guidance:Pitch>
            <Sequence/>
            <Timeout Duration="P1M">
                <Syslog Severity="Error">Timed out moving mass shifter.</Syslog>
            </Timeout>
            <Break>
                <Abs><Universal:platform_mass_position/><Sub><Arg Name="HomeLocation"/></Sub></Abs>
                <Lt><Arg Name="AllowableMassDeadband"/></Lt>
            </Break>
            <Setting><Guidance:Pitch.massPosition/><Arg Name="HomeLocation"/></Setting>
        </Guidance:Pitch>

        <Aggregate Id="PowerFDI">

            <Syslog>"Powering"</Syslog>

            <ReadData Strategy="MinError">
                <Parallel/>
                <Sensor:FDI.powerFDI/>
            </ReadData>

            <Syslog>"Waiting for payload to boot"</Syslog>

            <Guidance:Wait>
                <Sequence/>
                <Setting><Guidance:Wait.duration/><Units:minute/><Value>2</Value></Setting>
            </Guidance:Wait>

            <Aggregate Id="Experiment">

                <Sequence Repeat="Loops"/>

                <Syslog>"Experiment beginning: Idling for 10 seconds"</Syslog>

                <Guidance:Wait>
                    <Sequence/>
                    <Setting><Guidance:Wait.duration/><Units:second/><Value>10</Value></Setting>
                </Guidance:Wait>

                <Aggregate Id="RunFDI">

                    <Sequence/>

                    <Syslog>"Starting FDI"</Syslog>

                    <ReadData Strategy="MinError">
                        <Parallel/>
                        <Sensor:FDI.runFDI/>
                    </ReadData>

                    <Syslog>"Waiting"</Syslog>

                    <Guidance:Wait>
                        <Sequence/>
                        <Setting><Guidance:Wait.duration/><Units:second/><Value>10</Value></Setting>
                    </Guidance:Wait>

                    <Syslog>"Sending Mass Shifter fwd"</Syslog>

                    <Guidance:Pitch>
                        <Sequence/>
                        <Timeout Duration="P1M">
                            <Syslog Severity="Error">Timed out moving mass shifter.</Syslog>
                        </Timeout>
                        <Break>
                            <Abs><Universal:platform_mass_position/><Sub><Arg Name="FwdLocation"/></Sub></Abs>
                            <Lt><Arg Name="AllowableMassDeadband"/></Lt>
                        </Break>
                        <Setting><Guidance:Pitch.massPosition/><Arg Name="FwdLocation"/></Setting>
                    </Guidance:Pitch>

                    <Syslog>"Sending Mass Shifter back"</Syslog>

                    <Guidance:Pitch>
                        <Sequence/>
                        <Timeout Duration="P2M">
                            <Syslog Severity="Error">Timed out moving mass shifter.</Syslog>
                        </Timeout>
                        <Break>
                            <Abs><Universal:platform_mass_position/><Sub><Arg Name="AftLocation"/></Sub></Abs>
                            <Lt><Arg Name="AllowableMassDeadband"/></Lt>
                        </Break>
                        <Setting><Guidance:Pitch.massPosition/><Arg Name="AftLocation"/></Setting>
                    </Guidance:Pitch>

                    <Syslog>"Sending Mass Shifter to 0"</Syslog>

                    <Guidance:Pitch>
                        <Sequence/>
                        <Timeout Duration="P1M">
                            <Syslog Severity="Error">Timed out moving mass shifter.</Syslog>
                        </Timeout>
                        <Break>
                            <Abs><Universal:platform_mass_position/><Sub><Arg Name="HomeLocation"/></Sub></Abs>
                            <Lt><Arg Name="AllowableMassDeadband"/></Lt>
                        </Break>
                        <Setting><Guidance:Pitch.massPosition/><Arg Name="HomeLocation"/></Setting>
                    </Guidance:Pitch>

                    <Syslog>"Stopping FDI"</Syslog>

                </Aggregate>

            </Aggregate>

<!--    
     <Syslog>"Leaving payload powered for 30 min."</Syslog>
     <Guidance:Wait>
       <Sequence/>
       <Setting><Guidance:Wait.duration/><Units:minute/><Value>30</Value></Setting>
     </Guidance:Wait>
     -->

        </Aggregate>

    </Aggregate>

</Mission>