Tank buoyancy.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/Demo/tank_buoyancy.xml:35:43
    | 
 31 | 
 32 |       aggregate GoBuoyantFast {
 33 |         run when (
 34 |           Universal:depth > 4.9 meter
 35 |           and ( Universal:depth_rate > ( -.025 meter_per_second ) )
    |                                           ^
 36 |         )
 37 | 
 38 |         behavior Guidance:Buoyancy {
 39 |           run in progression
    | 
Unexpected: `.`
One of the following is possible:
  number
  NaN
 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
mission tank_buoyancy {
  arguments {
    MassDefault = Control:VerticalControl.massDefault
  }

  timeout duration=P45M

  aggregate {
    run in sequence

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

    behavior Guidance:Pitch {
      run in parallel
      set Guidance:Pitch.depth = 15 meter
      set Guidance:Pitch.massPosition = MassDefault
    }

    behavior Guidance:Point {
      run in parallel
      set Guidance:Point.heading = 0 degree
    }

    aggregate Maintain_Depth {
      run in sequence

      # RISING

      aggregate GoBuoyantFast {
        run when (
          Universal:depth > 4.9 meter
          and ( Universal:depth_rate > ( -.025 meter_per_second ) )
        )

        behavior Guidance:Buoyancy {
          run in progression
          set Guidance:Buoyancy.position = 650 cubic_centimeter
        }
      }

      aggregate GoBuoyant {
        run when (
          Universal:depth > 4.9 meter
        )

        behavior Guidance:Buoyancy {
          run in progression
          set Guidance:Buoyancy.position = 600 cubic_centimeter
        }
      }

      # SINKING

      aggregate GoHeavyFast {
        run when (
          Universal:depth < 4.7 meter
          and ( Universal:depth_rate < .025 meter_per_second )
        )

        behavior Guidance:Buoyancy {
          run in progression
          set Guidance:Buoyancy.position = 250 cubic_centimeter
        }
      }

      aggregate GoHeavy {
        run when (
          Universal:depth < 4.7 meter
        )

        behavior Guidance:Buoyancy {
          run in progression
          set Guidance:Buoyancy.position = 300 cubic_centimeter
        }
      }

      behavior Guidance:Wait {
        run in sequence
        timeout duration=P30M
      }
    }
  }
}
  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
<?xml version="1.0" encoding="UTF-8"?>
<Mission xmlns="Tethys"
       xmlns:Control="Tethys/Control"
       xmlns:Guidance="Tethys/Guidance" 
       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/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd
                           Tethys/Universal http://okeanids.mbari.org/tethys/Xml/Universal.xsd"
       Id="tank_buoyancy">

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

    <Timeout Duration="P45M"/>

    <Aggregate>

        <Sequence/>

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

        <Guidance:Pitch>
            <Parallel/>
            <Setting><Guidance:Pitch.depth/><Units:meter/><Value>15</Value></Setting>
            <Setting><Guidance:Pitch.massPosition/><Arg Name="MassDefault"/></Setting>
        </Guidance:Pitch>

        <Guidance:Point>
            <Parallel/>
            <Setting><Guidance:Point.heading/><Units:degree/><Value>0</Value></Setting>
        </Guidance:Point>

        <Aggregate Id="Maintain_Depth">

            <Sequence/>

<!-- RISING -->

            <Aggregate Id="GoBuoyantFast">

                <When>
                    <Universal:depth/>
                    <Gt><Units:meter/><Value>4.9</Value></Gt>
                    <And><Universal:depth_rate/><Gt><Units:meter_per_second/><Value>-.025</Value></Gt></And>
                </When>

                <Guidance:Buoyancy>
                    <Progression/>
                    <Setting><Guidance:Buoyancy.position/><Units:cubic_centimeter/><Value>650</Value></Setting>
                </Guidance:Buoyancy>

            </Aggregate>

            <Aggregate Id="GoBuoyant">

                <When>
                    <Universal:depth/>
                    <Gt><Units:meter/><Value>4.9</Value></Gt>
                </When>

                <Guidance:Buoyancy>
                    <Progression/>
                    <Setting><Guidance:Buoyancy.position/><Units:cubic_centimeter/><Value>600</Value></Setting>
                </Guidance:Buoyancy>

            </Aggregate>

<!-- SINKING -->

            <Aggregate Id="GoHeavyFast">

                <When>
                    <Universal:depth/>
                    <Lt><Units:meter/><Value>4.7</Value></Lt>
                    <And><Universal:depth_rate/><Lt><Units:meter_per_second/><Value>.025</Value></Lt></And>
                </When>

                <Guidance:Buoyancy>
                    <Progression/>
                    <Setting><Guidance:Buoyancy.position/><Units:cubic_centimeter/><Value>250</Value></Setting>
                </Guidance:Buoyancy>

            </Aggregate>

            <Aggregate Id="GoHeavy">

                <When>
                    <Universal:depth/>
                    <Lt><Units:meter/><Value>4.7</Value></Lt>
                </When>

                <Guidance:Buoyancy>
                    <Progression/>
                    <Setting><Guidance:Buoyancy.position/><Units:cubic_centimeter/><Value>300</Value></Setting>
                </Guidance:Buoyancy>

            </Aggregate>

            <Guidance:Wait>
                <Sequence/>
                <Timeout Duration="P30M"></Timeout>
            </Guidance:Wait>

        </Aggregate>

    </Aggregate>

</Mission>