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/WaypointReplacement.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 91011
# - 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
<?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.--><DefineBehaviorxmlns="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="Waypoint"Language="Lua"><Description>
Simple example replacement for Waypoint behavior. Only takes two
settings: latitude and longitude
</Description><DefineSettingName="latitudeSet"><Guidance:Waypoint.latitude/><Description>
Goal latitude.
</Description><Units:radian/><DefaultValue>NaN</DefaultValue></DefineSetting><DefineSettingName="longitudeSet"><Guidance:Waypoint.longitude/><Description>
Goal longitude.
</Description><Units:radian/><DefaultValue>NaN</DefaultValue></DefineSetting><Construct><Description>
Define functions for use in the behavior
</Description><Script><![CDATA[ function GetBearing( lat0, lon0, lat1, lon1 ) local y = math.sin( lon1 - lon0 ) * math.cos( lat1 ) local x = math.cos( lat0 ) * math.sin( lat1 ) - math.sin( lat0 ) * math.cos( lat1 ) * math.cos( lon1 - lon0 ) return math.atan2( y, x ) end return "Constructed Waypoint", "IMPORTANT" ]]></Script></Construct><Initialize><InputName="latitude"><Universal:latitude/><Units:radian/><DefaultValue>NaN</DefaultValue></Input><InputName="longitude"><Universal:longitude/><Units:radian/><DefaultValue>NaN</DefaultValue></Input><Script><![CDATA[ if latitudeSet==latitudeSet then goalLat = latitudeSet else goalLat = latitude end if longitudeSet==longitudeSet then goalLon = longitudeSet else goalLon = longitude end goalBear = GetBearing(latitude,longitude,goalLat,goalLon) if goalLat ~= latitude then perpendicularSlope = -( goalLon - longitude ) / ( goalLat - latitude ) startOverLine = latitude > ( goalLat + ( ( longitude - goalLon ) * perpendicularSlope ) ) else perpendicularSlope = nil startOverLine = longitude > goalLon end ]]></Script></Initialize><Run><Output><Control:HorizontalControl.horizontalMode/><Units:enum/></Output><Output><Control:HorizontalControl.latitudeCmd/><Units:radian/></Output><Output><Control:HorizontalControl.longitudeCmd/><Units:radian/></Output><Output><Control:HorizontalControl.bearingCmd/><Units:radian/></Output><Script><![CDATA[ return 1.0, goalLat, goalLon, goalBear; ]]></Script></Run><IsSatisfied><InputName="latitude"><Universal:latitude/><Units:radian/><DefaultValue>NaN</DefaultValue></Input><InputName="longitude"><Universal:longitude/><Units:radian/><DefaultValue>NaN</DefaultValue></Input><Script><![CDATA[ if perpendicularSlope ~= nil then isOverLine = latitude > (goalLat + ( ( longitude - goalLon ) * perpendicularSlope)) else isOverLine = longitude > goalLon; end return isOverLine ~= startOverLine ]]></Script></IsSatisfied></DefineBehavior>