Old ballast and trim.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/Maintenance/old_ballast_and_trim.xml:92:5
    | 
 88 |     call id="StartingMission" refId="NeedComms"
 89 |   }
 90 | 
 91 |   aggregate RunBallastAndTrim {
 92 |     aggregate Depth1 {
    |     ^^^^^^^^^
 93 |       run in sequence
 94 |       break if ( isNaN ( Depth1 ) or isNaN ( DepthDeadband1 ) )
 95 |       insert Insert/oldBallastAndTrim.xml {
 96 | 
    | 
Unexpected: `aggregate`
One of the following is possible:
  """
  arguments
  output
  run
  test_code
  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
mission ballast_and_trim {
  arguments {
    MissionTimeout = 90 minute
      """
      Maximum duration of mission
      """

    SkipComms = false
      """
      Skip communications at start of mission.
      """

    Depth1 = 35 meter


    DepthDeadband1 = 0.1 meter


    Depth2 = NaN meter


    DepthDeadband2 = NaN meter


    SettleTime = 10 minute
      """
      How long to wait after reaching target depth before starting ballast and
      trim.
      """

    EstimationTimeout = 45 minute
      """
      Timeout for ballast and trim estimation.
      """

    MinEstimationTime = 10 minute
      """
      Minimum time to run ballast and trim estimation before determining
      convergence (must be shorter than timeout).
      """

    MassEstimationErrorBound = 0.25 millimeter
      """
      Desired range of the estimated sample mean from the true mean statistic
      (smaller values take longer to converge).
      """

    BuoyEstimationErrorBound = 15 cubic_centimeter
      """
      Desired range of the estimated sample mean from the true mean statistic
      (smaller values take longer to converge).
      """

    EstimationConfidence = 99.9 percent
      """
      Confidence level that the estimator has reached the desired error range
      (larger values take longer to converge).
      """

    MinAltitude = 5 meter


    MaxDepth = 52 meter


    MinOffshore = 2 kilometer


  }

  timeout duration=MissionTimeout
  insert Insert/Science.xml

  insert Insert/NeedComms.xml id="NeedComms"

  assign in sequence  NeedComms:DiveInterval = MissionTimeout
  insert Insert/StandardEnvelopes.xml

  assign in sequence  StandardEnvelopes:MinAltitude = MinAltitude
  assign in sequence  StandardEnvelopes:MaxDepth = MaxDepth
  assign in sequence  StandardEnvelopes:MinOffshore = MinOffshore
  aggregate StartingMission {
    run in sequence
    break if ( SkipComms )
    # DO NOT REMOVE the syslog entry below. The MissionManager seems to ignore the value of SkipComms, does not evaluate the Break statement properly, and always calls NeedComms. Adding the syslog call somehow fixes it.

    syslog info "Checking for additional instructions before submerging."
    call id="StartingMission" refId="NeedComms"
  }

  aggregate RunBallastAndTrim {
    aggregate Depth1 {
      run in sequence
      break if ( isNaN ( Depth1 ) or isNaN ( DepthDeadband1 ) )
      insert Insert/oldBallastAndTrim.xml {

        redefineArg InsertDepth = Depth1

        redefineArg InsertDepthDeadband = DepthDeadband1

        redefineArg InsertSettleTime = SettleTime

        redefineArg EstTimeout = EstimationTimeout

        redefineArg MinEstTime = MinEstimationTime

        redefineArg MassEstErrorBound = MassEstimationErrorBound

        redefineArg BuoyEstErrorBound = BuoyEstimationErrorBound

        redefineArg EstConfidence = EstimationConfidence

      }


    }

    aggregate Depth2 {
      run in sequence
      break if ( isNaN ( Depth2 ) or isNaN ( DepthDeadband2 ) )
      insert Insert/oldBallastAndTrim.xml {

        redefineArg InsertDepth = Depth2

        redefineArg InsertDepthDeadband = DepthDeadband2

        redefineArg InsertSettleTime = SettleTime

        redefineArg EstTimeout = EstimationTimeout

        redefineArg MinEstTime = MinEstimationTime

        redefineArg MassEstErrorBound = MassEstimationErrorBound

        redefineArg BuoyEstErrorBound = BuoyEstimationErrorBound

        redefineArg EstConfidence = EstimationConfidence

      }


    }

  }

  call id="EndingMission" refId="NeedComms"
}
  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
<?xml version="1.0" encoding="UTF-8"?>
<Mission xmlns="Tethys"
    xmlns:Units="Tethys/Units"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="Tethys http://okeanids.mbari.org/tethys/Xml/Tethys.xsd
    Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd"
    Id="ballast_and_trim">

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

    <DefineArg Name="SkipComms"><Description>
        Skip communications at start of mission.
    </Description><False/></DefineArg>

    <DefineArg Name="Depth1"><Units:meter/><Value>35</Value></DefineArg>

    <DefineArg Name="DepthDeadband1"><Units:meter/><Value>0.1</Value></DefineArg>

    <DefineArg Name="Depth2"><Units:meter/><Value>NaN</Value></DefineArg>

    <DefineArg Name="DepthDeadband2"><Units:meter/><Value>NaN</Value></DefineArg>

    <DefineArg Name="SettleTime"><Description>
        How long to wait after reaching target depth before starting ballast and
        trim.
    </Description><Units:minute/><Value>10</Value></DefineArg>

    <DefineArg Name="EstimationTimeout"><Description>
        Timeout for ballast and trim estimation.
    </Description><Units:minute/><Value>45</Value></DefineArg>

    <DefineArg Name="MinEstimationTime"><Description>
        Minimum time to run ballast and trim estimation before determining
        convergence (must be shorter than timeout).
    </Description><Units:minute/><Value>10</Value></DefineArg>

    <DefineArg Name="MassEstimationErrorBound"><Description>
        Desired range of the estimated sample mean from the true mean statistic
        (smaller values take longer to converge).
    </Description><Units:millimeter/><Value>0.25</Value></DefineArg>

    <DefineArg Name="BuoyEstimationErrorBound"><Description>
        Desired range of the estimated sample mean from the true mean statistic
        (smaller values take longer to converge).
    </Description><Units:cubic_centimeter/><Value>15</Value></DefineArg>

    <DefineArg Name="EstimationConfidence"><Description>
        Confidence level that the estimator has reached the desired error range
        (larger values take longer to converge).
    </Description><Units:percent/><Value>99.9</Value></DefineArg>

    <DefineArg Name="MinAltitude"><Units:meter/><Value>5</Value></DefineArg>

    <DefineArg Name="MaxDepth"><Units:meter/><Value>52</Value></DefineArg>

    <DefineArg Name="MinOffshore"><Units:kilometer/><Value>2</Value></DefineArg>

    <Timeout Duration="MissionTimeout"/>

    <Insert Filename="Insert/Science.xml"/>

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

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

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

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

    <Aggregate Id="StartingMission">

        <Sequence/>

        <Break><Arg Name="SkipComms"/>
        </Break>

<!-- DO NOT REMOVE the syslog entry below. The MissionManager seems to ignore the value of SkipComms, does not evaluate the Break statement properly, and always calls NeedComms. Adding the syslog call somehow fixes it. -->

        <Syslog Severity="Info">Checking for additional instructions before submerging.</Syslog>

        <Call Id="StartingMission" RefId="NeedComms"/>

    </Aggregate>

    <Aggregate Id="RunBallastAndTrim">

        <Aggregate Id="Depth1">

            <Sequence/>

            <Break>
                <IsNaN><Arg Name="Depth1"/>
                </IsNaN>
                <Or><IsNaN><Arg Name="DepthDeadband1"/>
                </IsNaN></Or>
            </Break>

            <Insert Filename="Insert/oldBallastAndTrim.xml">
                <RedefineArg Name="InsertDepth"><Arg Name="Depth1"/></RedefineArg>
                <RedefineArg Name="InsertDepthDeadband"><Arg Name="DepthDeadband1"/></RedefineArg>
                <RedefineArg Name="InsertSettleTime"><Arg Name="SettleTime"/></RedefineArg>
                <RedefineArg Name="EstTimeout"><Arg Name="EstimationTimeout"/></RedefineArg>
                <RedefineArg Name="MinEstTime"><Arg Name="MinEstimationTime"/></RedefineArg>
                <RedefineArg Name="MassEstErrorBound"><Arg Name="MassEstimationErrorBound"/></RedefineArg>
                <RedefineArg Name="BuoyEstErrorBound"><Arg Name="BuoyEstimationErrorBound"/></RedefineArg>
                <RedefineArg Name="EstConfidence"><Arg Name="EstimationConfidence"/></RedefineArg>
            </Insert>

        </Aggregate>

        <Aggregate Id="Depth2">

            <Sequence/>

            <Break>
                <IsNaN><Arg Name="Depth2"/>
                </IsNaN>
                <Or><IsNaN><Arg Name="DepthDeadband2"/>
                </IsNaN></Or>
            </Break>

            <Insert Filename="Insert/oldBallastAndTrim.xml">
                <RedefineArg Name="InsertDepth"><Arg Name="Depth2"/></RedefineArg>
                <RedefineArg Name="InsertDepthDeadband"><Arg Name="DepthDeadband2"/></RedefineArg>
                <RedefineArg Name="InsertSettleTime"><Arg Name="SettleTime"/></RedefineArg>
                <RedefineArg Name="EstTimeout"><Arg Name="EstimationTimeout"/></RedefineArg>
                <RedefineArg Name="MinEstTime"><Arg Name="MinEstimationTime"/></RedefineArg>
                <RedefineArg Name="MassEstErrorBound"><Arg Name="MassEstimationErrorBound"/></RedefineArg>
                <RedefineArg Name="BuoyEstErrorBound"><Arg Name="BuoyEstimationErrorBound"/></RedefineArg>
                <RedefineArg Name="EstConfidence"><Arg Name="EstimationConfidence"/></RedefineArg>
            </Insert>

        </Aggregate>

    </Aggregate>

    <Call Id="EndingMission" RefId="NeedComms"/>

</Mission>