DepthEnvelopeReplacement.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/BehaviorScripts/DepthEnvelopeReplacement.xml:11:46
    | 
  7 | # -   Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
  8 | # -   amended. Violations of these export laws are subject to severe civil and/or
  9 | # -   criminal penalties.
 10 | 
 11 | # NOTE: DefineBehavior NOT handled by TethysL
Unexpected: end-of-input
One of the following is possible:
  aggregate
  mission
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# -   Copyright (c) 2024 MBARI
# -   MBARI Proprietary Information. Confidential. All Rights Reserved
# -   Unauthorized copying or distribution of this file via any medium is strictly
# -   prohibited.
# -
# -   WARNING - This file contains information whose export is restricted by the
# -   Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
# -   amended. Violations of these export laws are subject to severe civil and/or
# -   criminal penalties.

# NOTE: DefineBehavior NOT handled by TethysL
 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
-   Copyright (c) 2024 MBARI
-   MBARI Proprietary Information. Confidential. All Rights Reserved
-   Unauthorized copying or distribution of this file via any medium is strictly
-   prohibited.
-
-   WARNING - This file contains information whose export is restricted by the
-   Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
-   amended. Violations of these export laws are subject to severe civil and/or
-   criminal penalties.
-->

<DefineBehavior 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"
       Name="DepthEnvelope" Language="Lua">

    <Description>
        Overly simple example replacement for DepthEnvelope behavior. Only takes
        three settings: maxDepth, minDepth, and pitch
    </Description>

    <DefineSetting Name="maxDepthSet">
        <Guidance:DepthEnvelope.maxDepth/>
        <Description>
            Maximum Depth
        </Description><Units:meter/>
        <DefaultValue>NaN</DefaultValue>
    </DefineSetting>

    <DefineSetting Name="minDepthSet">
        <Guidance:DepthEnvelope.minDepth/>
        <Description>
            Minimum Depth
        </Description><Units:radian/>
        <DefaultValue>NaN</DefaultValue>
    </DefineSetting>

    <DefineSetting Name="pitchSet">
        <Guidance:DepthEnvelope.pitch/>
        <Description>
            Pitch to use when correcting depth. Default is 20 degrees.
        </Description><Units:radian/>
        <DefaultValue>0.34906585</DefaultValue>
    </DefineSetting>

    <Construct>
        <Description>
            Not really used for depth envelope.
        </Description>
        <Script><![CDATA[
           return "Constructed DepthEnvelope", "IMPORTANT"
        ]]></Script>
    </Construct>

    <Run>
        <Input Name="depth"><Universal:depth/><Units:meter/><DefaultValue>NaN</DefaultValue></Input>
        <Output><Control:VerticalControl.verticalMode/><Units:enum/></Output>
        <Output><Control:VerticalControl.pitchCmd/><Units:radian/></Output>
        <Script><![CDATA[
           if minDepthSet == minDepthSet and depth < minDepthSet then
               -- 5.0 is Vertical Control's pitch mode
               return 5.0, -pitchSet;
           elseif maxDepthSet == maxDepthSet and depth > maxDepthSet then
               return 5.0, pitchSet;
           end
           -- If nothing is returned, nothing happens
        ]]></Script>
    </Run>

</DefineBehavior>