@prefix :        <https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170PairPrototype.ttl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:  <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:     <https://www.web3d.org/specifications/x3d-4.0.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.0' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.0.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'TRC170PairPrototype.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'A Pair of TRC-170s. A TRC-170 is a long-range SHF communication system. It operates in 3 modes. 1)Direct point-to-point link (< 30 miles). 2) Tropospheric shot (up to 100 or 150 miles, depending on system version). 3) Defraction shot over an a terrain feature or object in the path ( < 50 miles).' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Mike Hunsberger' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '8 May 2001' ;
  x3do:name 'created' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '12 October 2023' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170PairPrototype.x3d' ;
  x3do:name 'identifier' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "TRC170PairPrototype.x3d" .
:meta dcterms:description "A Pair of TRC-170s. A TRC-170 is a long-range SHF communication system. It operates in 3 modes. 1)Direct point-to-point link (< 30 miles). 2) Tropospheric shot (up to 100 or 150 miles, depending on system version). 3) Defraction shot over an a terrain feature or object in the path ( < 50 miles)." .
:meta dcterms:creator "Mike Hunsberger" .
:meta dcterms:created "8 May 2001" .
:meta dcterms:modified "12 October 2023" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170PairPrototype.x3d" .
:meta dcterms:generator "X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit" .
:meta dcterms:license "../../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasExternProtoDeclare :ExternProtoDeclare_2_1, :ExternProtoDeclare_2_2 ;
  x3do:hasProtoDeclare :ProtoDeclare_2_3 ;
  x3do:hasChildren :WorldInfo_2_4, :ProtoInstance_2_5, :Background_2_6 .
:ExternProtoDeclare_2_1 a owl:NamedIndividual, x3do:ExternProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_1_1, :field_2_1_2, :field_2_1_3, :field_2_1_4, :field_2_1_5, :field_2_1_6, :field_2_1_7, :field_2_1_8, :field_2_1_9, :field_2_1_10, :field_2_1_11 ;
  x3do:appinfo 'Produce wireframe or transparent beam cylinders. Typical uses include propeller/thruster water flow or line-of-sight sonar/radar/light beams. Negative range values invert base and apex at same relative location. Default: beam with apex at (0 0 0) and base of radius 1 in x-z plane at (1 0 0).' ;
  x3do:name 'BeamCylinder' ;
  x3do:url '"../../CommunicationsAndSensors/Beam/BeamCylinderPrototype.x3d#BeamCylinder" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamCylinderPrototype.x3d#BeamCylinder" "../../CommunicationsAndSensors/Beam/BeamCylinderPrototype.wrl#BeamCylinder" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamCylinderPrototype.wrl#BeamCylinder"' .
:field_2_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo '(communications) is transmitted signal in contact with receiver or (sensor) is a target return detected?' ;
  x3do:name 'contact' ;
  x3do:type 'SFBool' .
:field_2_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'distance in meters along x axis' ;
  x3do:name 'range' ;
  x3do:type 'SFFloat' .
:field_2_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'distance in meters used until eventIn range sent' ;
  x3do:name 'defaultRange' ;
  x3do:type 'SFFloat' .
:field_2_1_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether wireframe beam is drawn' ;
  x3do:name 'wireframe' ;
  x3do:type 'SFBool' .
:field_2_1_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether solid beam is drawn' ;
  x3do:name 'solid' ;
  x3do:type 'SFBool' .
:field_2_1_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'meters across vertical y axis' ;
  x3do:name 'beamHeight' ;
  x3do:type 'SFFloat' .
:field_2_1_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'meters across horizontal z axis' ;
  x3do:name 'beamWidth' ;
  x3do:type 'SFFloat' .
:field_2_1_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'rendering color when contact=true' ;
  x3do:name 'contactColor' ;
  x3do:type 'SFColor' .
:field_2_1_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'rendering color when contact=false' ;
  x3do:name 'noContactColor' ;
  x3do:type 'SFColor' .
:field_2_1_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo '1 = fully transparent wireframe only' ;
  x3do:name 'transparency' ;
  x3do:type 'SFFloat' .
:field_2_1_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'Assigning a name to a BeamCylinder aids tracing' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:ExternProtoDeclare_2_2 a owl:NamedIndividual, x3do:ExternProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasField :field_2_2_1, :field_2_2_2, :field_2_2_3, :field_2_2_4, :field_2_2_5, :field_2_2_6, :field_2_2_7, :field_2_2_8, :field_2_2_9, :field_2_2_10, :field_2_2_11, :field_2_2_12 ;
  x3do:appinfo 'Produce wireframe or transparent beam cones. Typical uses include propeller/thruster water flow or line-of-sight sonar/radar/light beams. Negative range values invert base and apex at same relative location. Default: beam with apex at (0 0 0) and base of radius 1 in x-z plane at (1 0 0).' ;
  x3do:name 'BeamCone' ;
  x3do:url '"../../CommunicationsAndSensors/Beam/BeamConePrototype.x3d#BeamCone" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamConePrototype.x3d#BeamCone" "../../CommunicationsAndSensors/Beam/BeamConePrototype.wrl#BeamCone" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/Beam/BeamConePrototype.wrl#BeamCone"' .
:field_2_2_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo '(communications) is transmitted signal in contact with receiver or (sensor) is a target return detected?' ;
  x3do:name 'contact' ;
  x3do:type 'SFBool' .
:field_2_2_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOnly' ;
  x3do:appinfo 'distance in meters along x axis' ;
  x3do:name 'range' ;
  x3do:type 'SFFloat' .
:field_2_2_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'distance in meters used until eventIn range sent' ;
  x3do:name 'defaultRange' ;
  x3do:type 'SFFloat' .
:field_2_2_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether wireframe beam is drawn' ;
  x3do:name 'wireframe' ;
  x3do:type 'SFBool' .
:field_2_2_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'whether solid beam is drawn' ;
  x3do:name 'solid' ;
  x3do:type 'SFBool' .
:field_2_2_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'degrees across vertical y axis' ;
  x3do:name 'beamHeightDegrees' ;
  x3do:type 'SFFloat' .
:field_2_2_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'degrees across horizontal z axis' ;
  x3do:name 'beamWidthDegrees' ;
  x3do:type 'SFFloat' .
:field_2_2_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'rendering color when contact=true' ;
  x3do:name 'contactColor' ;
  x3do:type 'SFColor' .
:field_2_2_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'rendering color when contact=false' ;
  x3do:name 'noContactColor' ;
  x3do:type 'SFColor' .
:field_2_2_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'inputOutput' ;
  x3do:appinfo '1 = fully transparent wireframe only' ;
  x3do:name 'transparency' ;
  x3do:type 'SFFloat' .
:field_2_2_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'BeamCone name aids in node identification and tracing' ;
  x3do:name 'name' ;
  x3do:type 'SFString' .
:field_2_2_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ExternProtoDeclare_2_2 ;
  x3do:accessType 'initializeOnly' ;
  x3do:appinfo 'flag to turn on Script tracing' ;
  x3do:name 'traceEnabled' ;
  x3do:type 'SFBool' .
:ProtoDeclare_2_3 a owl:NamedIndividual, x3do:ProtoDeclare ;
  x3do:hasParent :Scene ;
  x3do:hasProtoInterface :ProtoInterface_2_3_1 ;
  x3do:hasProtoBody :ProtoBody_2_3_2 ;
  x3do:name 'TRC170Pair' .
:ProtoInterface_2_3_1 a owl:NamedIndividual, x3do:ProtoInterface ;
  x3do:hasParent :ProtoDeclare_2_3 ;
  x3do:hasField :field_2_3_1_1, :field_2_3_1_2, :field_2_3_1_3 .
:field_2_3_1_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'TRC1Location' ;
  x3do:type 'SFVec3f' ;
  x3do:value ( 1 1 1 ) .
:field_2_3_1_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'TRC2Location' ;
  x3do:type 'SFVec3f' ;
  x3do:value ( 0 0 0 ) .
:field_2_3_1_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :ProtoInterface_2_3_1 ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'OperatingMode' ;
  x3do:type 'SFString' ;
  x3do:value 'DIRECT' .
:ProtoBody_2_3_2 a owl:NamedIndividual, x3do:ProtoBody ;
  x3do:hasParent :ProtoDeclare_2_3 ;
  x3do:hasChildren :Group_2_3_2_1 ;
  x3do:hasROUTE :ROUTE_2_3_2_2, :ROUTE_2_3_2_3, :ROUTE_2_3_2_4, :ROUTE_2_3_2_5, :ROUTE_2_3_2_6, :ROUTE_2_3_2_7, :ROUTE_2_3_2_8, :ROUTE_2_3_2_9, :ROUTE_2_3_2_10, :ROUTE_2_3_2_11, :ROUTE_2_3_2_12, :ROUTE_2_3_2_13, :ROUTE_2_3_2_14, :ROUTE_2_3_2_15, :ROUTE_2_3_2_16, :ROUTE_2_3_2_17, :ROUTE_2_3_2_18, :ROUTE_2_3_2_19, :ROUTE_2_3_2_20, :ROUTE_2_3_2_21 .
:Group_2_3_2_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:hasChildren :HighAboveXZTranslation, :TRC1Viewpoint, :TRC2Viewpoint, :LOD_2_3_2_1_4, :LOD_2_3_2_1_5, :TransmitScript, :TransmitScript2, :CalculateAngleScript .
:HighAboveXZTranslation a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasChildren :HighAbove ;
  x3do:DEF 'HighAboveXZTranslation' .
:HighAbove a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :HighAboveXZTranslation ;
  x3do:DEF 'HighAbove' ;
  x3do:description 'High Above TRC170' ;
  x3do:orientation ( 1 0 0 -1.4 ) ;
  x3do:position ( 0 0 0 ) .
:TRC1Viewpoint a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:DEF 'TRC1Viewpoint' ;
  x3do:description 'TRC170 #1' .
:TRC2Viewpoint a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:DEF 'TRC2Viewpoint' ;
  x3do:description 'TRC170 #2' .
:LOD_2_3_2_1_4 a owl:NamedIndividual, x3do:LOD ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasChildren :TRC1_TRANSFORM, :WorldInfo_2_3_2_1_4_2 ;
  x3do:range ( 200000 ) .
:TRC1_TRANSFORM a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LOD_2_3_2_1_4 ;
  x3do:hasIS :IS_2_3_2_1_4_1_1 ;
  x3do:hasChildren :TRC1_XY_TRANSFORM, :Transform_2_3_2_1_4_1_3 ;
  x3do:DEF 'TRC1_TRANSFORM' ;
  x3do:translation ( -2 0 0 ) .
:IS_2_3_2_1_4_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :TRC1_TRANSFORM ;
  x3do:hasConnect :connect_2_3_2_1_4_1_1_1 .
:connect_2_3_2_1_4_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_4_1_1 ;
  x3do:nodeField 'translation' ;
  x3do:protoField 'TRC1Location' .
:TRC1_XY_TRANSFORM a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TRC1_TRANSFORM ;
  x3do:hasChildren :TRCBody, :TRC1Cone ;
  x3do:DEF 'TRC1_XY_TRANSFORM' ;
  x3do:translation ( 1 5 0 ) .
:TRCBody a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :TRC1_XY_TRANSFORM ;
  x3do:DEF 'TRCBody' ;
  x3do:url '"TRC170Dish.x3d" "../../CommunicationsAndSensors/TRC170/TRC170Dish.x3d" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170Dish.x3d" "TRC170Dish.wrl" "../../CommunicationsAndSensors/TRC170/TRC170Dish.wrl" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170Dish.wrl"' .
:TRC1Cone a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TRC1_XY_TRANSFORM ;
  x3do:hasChildren :BeamSwitch ;
  x3do:DEF 'TRC1Cone' ;
  x3do:translation ( 2 0 0 ) .
:BeamSwitch a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :TRC1Cone ;
  x3do:hasChildren :Group_2_3_2_1_4_1_2_2_1_1, :Group_2_3_2_1_4_1_2_2_1_2 ;
  x3do:DEF 'BeamSwitch' ;
  x3do:whichChoice 0 .
:Group_2_3_2_1_4_1_2_2_1_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :BeamSwitch ;
  x3do:hasChildren :TRC1_BEAMCYLINDER .
:TRC1_BEAMCYLINDER a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Group_2_3_2_1_4_1_2_2_1_1 ;
  x3do:hasFieldValue :fieldValue_2_3_2_1_4_1_2_2_1_1_1_1, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_2, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_3, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_4, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_5, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_6, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_7, :fieldValue_2_3_2_1_4_1_2_2_1_1_1_8 ;
  x3do:DEF 'TRC1_BEAMCYLINDER' ;
  x3do:name 'BeamCylinder' .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'defaultRange' ;
  x3do:value 10 .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'beamHeight' ;
  x3do:value 1.5 .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'beamWidth' ;
  x3do:value 1.5 .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'transparency' ;
  x3do:value 0.2 .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_5 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'wireframe' ;
  x3do:value true .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_6 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'solid' ;
  x3do:value true .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_7 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'contactColor' ;
  x3do:value ( .3 .5 .5 ) .
:fieldValue_2_3_2_1_4_1_2_2_1_1_1_8 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCYLINDER ;
  x3do:name 'noContactColor' ;
  x3do:value ( .8 .1 .1 ) .
:Group_2_3_2_1_4_1_2_2_1_2 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :BeamSwitch ;
  x3do:hasChildren :TRC1_BEAMCONE .
:TRC1_BEAMCONE a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Group_2_3_2_1_4_1_2_2_1_2 ;
  x3do:hasFieldValue :fieldValue_2_3_2_1_4_1_2_2_1_2_1_1, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_2, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_3, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_4, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_5, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_6, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_7, :fieldValue_2_3_2_1_4_1_2_2_1_2_1_8 ;
  x3do:DEF 'TRC1_BEAMCONE' ;
  x3do:name 'BeamCone' .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'defaultRange' ;
  x3do:value 10 .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'beamHeightDegrees' ;
  x3do:value 2 .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'beamWidthDegrees' ;
  x3do:value 2 .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'transparency' ;
  x3do:value 0.2 .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_5 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'wireframe' ;
  x3do:value true .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_6 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'solid' ;
  x3do:value true .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_7 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'noContactColor' ;
  x3do:value ( .8 .1 .1 ) .
:fieldValue_2_3_2_1_4_1_2_2_1_2_1_8 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC1_BEAMCONE ;
  x3do:name 'contactColor' ;
  x3do:value ( .3 .5 .5 ) .
:Transform_2_3_2_1_4_1_3 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TRC1_TRANSFORM ;
  x3do:hasChildren :TRCStand, :LOD_2_3_2_1_4_1_3_2 .
:TRCStand a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :Transform_2_3_2_1_4_1_3 ;
  x3do:DEF 'TRCStand' ;
  x3do:url '"TRC170Tripod.x3d" "../../CommunicationsAndSensors/TRC170/TRC170Tripod.x3d" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170Tripod.x3d" "../../CommunicationsAndSensors/TRC170/TRC170Tripod.wrl" "TRC170Tripod.wrl" "https://www.web3d.org/x3d/content/examples/Savage/CommunicationsAndSensors/TRC170/TRC170Tripod.wrl"' .
:LOD_2_3_2_1_4_1_3_2 a owl:NamedIndividual, x3do:LOD ;
  x3do:hasParent :Transform_2_3_2_1_4_1_3 ;
  x3do:hasChildren :Viewpoint_2_3_2_1_4_1_3_2_1, :WorldInfo_2_3_2_1_4_1_3_2_2 ;
  x3do:range ( 500 ) .
:Viewpoint_2_3_2_1_4_1_3_2_1 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :LOD_2_3_2_1_4_1_3_2 ;
  x3do:description 'TRC170 Side View' ;
  x3do:position ( 0 5 40 ) .
:WorldInfo_2_3_2_1_4_1_3_2_2 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :LOD_2_3_2_1_4_1_3_2 ;
  x3do:info '"null node for no rendering when distant"' .
:WorldInfo_2_3_2_1_4_2 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :LOD_2_3_2_1_4 ;
  x3do:info '"null node for no rendering when distant"' .
:LOD_2_3_2_1_5 a owl:NamedIndividual, x3do:LOD ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasChildren :TRC2_TRANSFORM, :WorldInfo_2_3_2_1_5_2 ;
  x3do:range ( 200000 ) .
:TRC2_TRANSFORM a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LOD_2_3_2_1_5 ;
  x3do:hasIS :IS_2_3_2_1_5_1_1 ;
  x3do:hasChildren :TRC2_XY_TRANSFORM, :Transform_2_3_2_1_5_1_3 ;
  x3do:DEF 'TRC2_TRANSFORM' ;
  x3do:translation ( -2 0 0 ) .
:IS_2_3_2_1_5_1_1 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :TRC2_TRANSFORM ;
  x3do:hasConnect :connect_2_3_2_1_5_1_1_1 .
:connect_2_3_2_1_5_1_1_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_5_1_1 ;
  x3do:nodeField 'translation' ;
  x3do:protoField 'TRC2Location' .
:TRC2_XY_TRANSFORM a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TRC2_TRANSFORM ;
  x3do:hasChildren :TRCBody-USE-1, :TRC2Cone ;
  x3do:DEF 'TRC2_XY_TRANSFORM' ;
  x3do:translation ( 1 5 0 ) .
:TRCBody-USE-1 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :TRC2_XY_TRANSFORM ;
  owl:sameAs :TRCBody . # DEF matching this USE
:TRC2Cone a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TRC2_XY_TRANSFORM ;
  x3do:hasChildren :BeamSwitch2 ;
  x3do:DEF 'TRC2Cone' ;
  x3do:translation ( 2 0 0 ) .
:BeamSwitch2 a owl:NamedIndividual, x3do:Switch ;
  x3do:hasParent :TRC2Cone ;
  x3do:hasChildren :Group_2_3_2_1_5_1_2_2_1_1, :Group_2_3_2_1_5_1_2_2_1_2 ;
  x3do:DEF 'BeamSwitch2' ;
  x3do:whichChoice 0 .
:Group_2_3_2_1_5_1_2_2_1_1 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :BeamSwitch2 ;
  x3do:hasChildren :TRC2_BEAMCYLINDER .
:TRC2_BEAMCYLINDER a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Group_2_3_2_1_5_1_2_2_1_1 ;
  x3do:hasFieldValue :fieldValue_2_3_2_1_5_1_2_2_1_1_1_1, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_2, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_3, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_4, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_5, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_6, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_7, :fieldValue_2_3_2_1_5_1_2_2_1_1_1_8 ;
  x3do:DEF 'TRC2_BEAMCYLINDER' ;
  x3do:name 'BeamCylinder' .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'defaultRange' ;
  x3do:value 10 .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'beamHeight' ;
  x3do:value 1.5 .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'beamWidth' ;
  x3do:value 1.5 .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'transparency' ;
  x3do:value 0.2 .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_5 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'wireframe' ;
  x3do:value true .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_6 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'solid' ;
  x3do:value true .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_7 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'contactColor' ;
  x3do:value ( .3 .5 .5 ) .
:fieldValue_2_3_2_1_5_1_2_2_1_1_1_8 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCYLINDER ;
  x3do:name 'noContactColor' ;
  x3do:value ( .8 .1 .1 ) .
:Group_2_3_2_1_5_1_2_2_1_2 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :BeamSwitch2 ;
  x3do:hasChildren :TRC2_BEAMCONE .
:TRC2_BEAMCONE a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Group_2_3_2_1_5_1_2_2_1_2 ;
  x3do:hasFieldValue :fieldValue_2_3_2_1_5_1_2_2_1_2_1_1, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_2, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_3, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_4, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_5, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_6, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_7, :fieldValue_2_3_2_1_5_1_2_2_1_2_1_8 ;
  x3do:DEF 'TRC2_BEAMCONE' ;
  x3do:name 'BeamCone' .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'defaultRange' ;
  x3do:value 10 .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'beamHeightDegrees' ;
  x3do:value 2 .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'beamWidthDegrees' ;
  x3do:value 2 .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_4 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'transparency' ;
  x3do:value 0.2 .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_5 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'wireframe' ;
  x3do:value true .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_6 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'solid' ;
  x3do:value true .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_7 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'noContactColor' ;
  x3do:value ( .8 .1 .1 ) .
:fieldValue_2_3_2_1_5_1_2_2_1_2_1_8 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :TRC2_BEAMCONE ;
  x3do:name 'contactColor' ;
  x3do:value ( .3 .5 .5 ) .
:Transform_2_3_2_1_5_1_3 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :TRC2_TRANSFORM ;
  x3do:hasChildren :TRCStand-USE-1, :LOD_2_3_2_1_5_1_3_2 .
:TRCStand-USE-1 a owl:NamedIndividual, x3do:Inline ;
  x3do:hasParent :Transform_2_3_2_1_5_1_3 ;
  owl:sameAs :TRCStand . # DEF matching this USE
:LOD_2_3_2_1_5_1_3_2 a owl:NamedIndividual, x3do:LOD ;
  x3do:hasParent :Transform_2_3_2_1_5_1_3 ;
  x3do:hasChildren :Transform_2_3_2_1_5_1_3_2_1, :Transform_2_3_2_1_5_1_3_2_2 ;
  x3do:range ( 500 ) .
:Transform_2_3_2_1_5_1_3_2_1 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LOD_2_3_2_1_5_1_3_2 ;
  x3do:hasChildren :Viewpoint_2_3_2_1_5_1_3_2_1_1 .
:Viewpoint_2_3_2_1_5_1_3_2_1_1 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Transform_2_3_2_1_5_1_3_2_1 ;
  x3do:description 'TRC170 Side View' ;
  x3do:position ( 0 5 40 ) .
:Transform_2_3_2_1_5_1_3_2_2 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :LOD_2_3_2_1_5_1_3_2 .
:WorldInfo_2_3_2_1_5_2 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :LOD_2_3_2_1_5 ;
  x3do:info '"null node"' .
:TransmitScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasField :field_2_3_2_1_6_1, :field_2_3_2_1_6_2 ;
  x3do:DEF 'TransmitScript' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	size = new SFVec3f(100, 100, 100) ;
	Browser.println ('TransmitScript initialize() complete');
}

// function name matches eventIn variable name ('hour')
// hourValue captures the new value of the ROUTE hour event
// minutes is just the current field value

function transState (newValue, timestamp)
{
	transmitState = newValue ;
	if (transmitState == 3) {
		size = new SFVec3f(10, 10, 10) ;
	}
	else {
		size = new SFVec3f(100, 100, 100) ;
	}
	Browser.println ('size	= ' + size);
}
""" .
:field_2_3_2_1_6_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TransmitScript ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'transState' ;
  x3do:type 'SFInt32' .
:field_2_3_2_1_6_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TransmitScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'size' ;
  x3do:type 'SFVec3f' .
:TransmitScript2 a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasField :field_2_3_2_1_7_1, :field_2_3_2_1_7_2 ;
  x3do:DEF 'TransmitScript2' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	size = new SFVec3f(100, 100, 100) ;
	Browser.println ('TransmitScript initialize() complete');
}

// function name matches eventIn variable name ('hour')
// hourValue captures the new value of the ROUTE hour event
// minutes is just the current field value

function transState (newValue, timestamp)
{
	transmitState = newValue ;
	if (transmitState == 3) {
		size = new SFVec3f(10, 10, 10) ;
	}
	else {
		size = new SFVec3f(100, 100, 100) ;
	}
	Browser.println ('size	= ' + size);
}
""" .
:field_2_3_2_1_7_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TransmitScript2 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'transState' ;
  x3do:type 'SFInt32' .
:field_2_3_2_1_7_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :TransmitScript2 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'size' ;
  x3do:type 'SFVec3f' .
:CalculateAngleScript a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :Group_2_3_2_1 ;
  x3do:hasField :field_2_3_2_1_8_1, :field_2_3_2_1_8_2, :field_2_3_2_1_8_3, :field_2_3_2_1_8_4, :field_2_3_2_1_8_5, :field_2_3_2_1_8_6, :field_2_3_2_1_8_7, :field_2_3_2_1_8_8, :field_2_3_2_1_8_9, :field_2_3_2_1_8_10, :field_2_3_2_1_8_11, :field_2_3_2_1_8_12, :field_2_3_2_1_8_13, :field_2_3_2_1_8_14, :field_2_3_2_1_8_15, :field_2_3_2_1_8_16, :field_2_3_2_1_8_17, :field_2_3_2_1_8_18 ;
  x3do:hasIS :IS_2_3_2_1_8_19 ;
  x3do:DEF 'CalculateAngleScript' ;
  x3do:sourceCode """
ecmascript:

function initialize ()
{
	Browser.println ('TRC1	=' + TRC1Location);
	Browser.println ('TRC2	=' + TRC2Location);
	Browser.println ('TransmitScript initialize() complete');
	active = true ;
	TRC1_XZangle	= new SFRotation(0, 1, 0, 0) ;
	TRC2_XZangle	= new SFRotation(0, 1, 0, 0) ;
	TRC1_XYangle	= new SFRotation(0, 0, 1, 0) ;
	TRC2_XYangle	= new SFRotation(0, 0, 1, 0) ;
	XZangle	= new SFRotation(0, 1, 0, 0) ;
	XYangle	= new SFRotation(0, 0, 1, 0) ;
	TRC1_ViewpointAngle	= new SFRotation(0, 1, 0, 0) ;
	TRC2_ViewpointAngle	= new SFRotation(0, 1, 0, 0) ;
	HighAboveViewpointAngle	= new SFRotation(1, 0, 0, 0) ;
	HighAboveTranslationAngle	= new SFRotation(0, 1, 0, 0) ;

	beamScale	   = new SFVec3f ( ) ;
	center		   = new SFVec3f ( ) ;
	TRC1_Viewpoint	   = new SFVec3f ( ) ;
	TRC2_Viewpoint	   = new SFVec3f ( ) ;
	HighAboveViewpoint = new SFVec3f ( ) ;
	LinkEstablished	= true;
	Browser.println ('OperatingMode	=' + OperatingMode);

	compute(active) ;
}

function compute ( )
{
	if (OperatingMode == 'DIRECT') {
		WhichBeam = 0 ;
		computeDistance( ) ;
		computeXZangle( );
		computeXYangle( ) ;

	}

	if (OperatingMode == 'TROPOSCATTER') {
		WhichBeam = 1 ;
		centerX 	= (TRC2Location[0] - TRC1Location[0])/2 ;
		centerZ 	= (TRC2Location[2] - TRC1Location[2])/2 ;
		XZDistance	= Math.sqrt(centerX * centerX + centerZ * centerZ);
		center[0]	= TRC1Location[0] + centerX;
		center[1]	= 15000 ;  // vertical height of troposphere
		center[2]	= TRC1Location[2] + centerZ;
                Browser.println ('TRC1	= ' + TRC1Location);
                Browser.println ('center	= ' + center);
                Browser.println ('TRC2	= ' + TRC2Location);

		computeTropoDistance(TRC1Location, center) ;
		computeTropoXZangle( );
		computeTropoXYangle( ) ;
		TRC1_beamLength 	= tropoDistance-2;
		TRC1_XZangle		= XZangle;
		TRC1_XYangle		= XYangle;

		computeTropoDistance(TRC2Location, center) ;
		computeTropoXZangle( );
		computeTropoXYangle( ) ;
		TRC2_beamLength 	= tropoDistance-2;
		TRC2_XZangle		= XZangle;
		TRC2_XYangle		= XYangle;
	}

	TRC1_Viewpoint[0]	= TRC1Location[0] + Math.sin(TRC1_XZangle[3] - 1.57)*40;
	TRC1_Viewpoint[1]	= TRC1Location[1] + 10;
	TRC1_Viewpoint[2]	= TRC1Location[2] +Math.cos(TRC1_XZangle[3] - 1.57)*40;
	Browser.println ('TRC1_Viewpoint	'+ TRC1_Viewpoint);
	TRC1_ViewpointAngle[3]	= TRC1_XZangle[3] - 1.57 ;

	TRC2_Viewpoint[0]	= TRC2Location[0] + Math.sin(TRC2_XZangle[3] - 1.57)*40 ;
	TRC2_Viewpoint[1]	= TRC2Location[1] + 10;
	TRC2_Viewpoint[2]	= TRC2Location[2] + Math.cos(TRC2_XZangle[3] - 1.57)*40;
	TRC2_ViewpointAngle[3]	= TRC2_XZangle[3] - 1.57 ;
	Browser.println ('TRC2_Viewpoint	'+ TRC2_Viewpoint);

	HighAboveViewpoint[0]	= center[0] + Math.sin(TRC1_XZangle[3])*3000 ;
	HighAboveViewpoint[1]	= center[1]  + 5000;
	HighAboveViewpoint[2]	= center[2] + Math.cos(TRC1_XZangle[3])*3000 ;
	Browser.println ('HighAboveViewpoint	'+ HighAboveViewpoint);
//	HighAboveViewpointAngle[3]	= Math.cos(TRC1_XZangle[3]) ;
	HighAboveTranslationAngle[3]	= TRC1_XZangle[3] ;
//	Browser.println ('HighAboveTranslationle		'+ HighAboveViewpointAngle);
	Browser.println ('HighAboveXZTranslationAngle	'+HighAboveTranslationAngle);



}

function computeTropoDistance(loc1, loc2 )
{
	tropoDeltaX 	= (loc2[0] - loc1[0]) ;
	tropoDeltaY 	= (loc2[1] - loc1[1]) ;
	tropoDeltaZ 	= (loc2[2] - loc1[2]) ;
	tropoDistanceSquared	= tropoDeltaX * tropoDeltaX + tropoDeltaY * tropoDeltaY + tropoDeltaZ * tropoDeltaZ ;
	Browser.println ('Distance Squared	=' + tropoDistanceSquared);
	tropoDistance 	= Math.sqrt(tropoDistanceSquared) ;
	Browser.println ('Distance	=' + tropoDistance);

	if (XZDistance > 100/.6*1000) {
		LinkEstablished = false;
		//TRC1_beamLength = 5000 ;
		//TRC2_beamLength = 5000 ;
	}
}

function computeTropoXZangle( )
{
	if (tropoDeltaZ == 0) {
		tropoDeltaZ = .00000001 ;
	}

	angle 	= Math.atan(tropoDeltaX/tropoDeltaZ) ;
	if (tropoDeltaZ < 0) {
		XZangle[3] = angle + Math.PI/2;
	}
	else {
		XZangle[3] = angle -  Math.PI/2;
	}
	Browser.println ('Angle	=' + XZangle[3]);
//	Browser.println ('Angle2	=' + TRC2_XZangle[3]);
}


function computeTropoXYangle( )
{
	Browser.println ('tropoDeltaY	=' + tropoDeltaY);
	angle 	= Math.asin(tropoDeltaY/tropoDistance) ;
	XYangle[3] = angle ;
	//XYangle[3]  = - TRC1_XYangle[3];

	Browser.println ('AngleXY	=' +XYangle[3]);
//	Browser.println ('Angle2XY	=' + TRC2_XYangle[3]);
}

function computeDistance( )
{
	Browser.println ('TRC1	=' + TRC1Location);
	Browser.println ('TRC2	=' + TRC2Location);
	deltaX 	= (TRC2Location[0] - TRC1Location[0]) ;
	deltaY 	= (TRC2Location[1] - TRC1Location[1]) ;
	deltaZ 	= (TRC2Location[2] - TRC1Location[2]) ;
	distanceSquared	= deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ ;
	Browser.println ('Distance Squared	=' + distanceSquared);
	distance 	= Math.sqrt(distanceSquared) ;
	Browser.println ('Distance	=' + distance);

	beamScale[0] 	= distance/10;
	beamScale[1]	= 10;
	beamScale[2]	= 10;
	Browser.println ('BeamScale	=' + beamScale);
	TRC1_beamLength 	= distance -2;
	TRC2_beamLength 	= distance -2;
	if (distance > 5/.6*1000) {
		LinkEstablished = false;
		TRC1_beamLength = 5000/.6 ;
		TRC2_beamLength = 5000/.6 ;
	}
}

function computeXZangle( )
{
	if (deltaZ == 0) {
		deltaZ = .00000001 ;
	}

	angle 	= Math.atan(deltaX/deltaZ) ;
	if (deltaZ < 0) {
		TRC1_XZangle[3] = angle + Math.PI/2;
	}
	else {
		TRC1_XZangle[3] = angle -  Math.PI/2;
	}
	TRC2_XZangle[3]  = TRC1_XZangle[3] +  Math.PI;

	Browser.println ('Angle	=' + TRC1_XZangle[3]);
	Browser.println ('Angle2	=' + TRC2_XZangle[3]);
}



function computeXYangle( )
{
	angle 	= Math.asin(deltaY/distance) ;
	TRC1_XYangle[3] = angle ;
	TRC2_XYangle[3]  = - TRC1_XYangle[3];

	Browser.println ('AngleXY	=' + TRC1_XYangle[3]);
	Browser.println ('Angle2XY	=' + TRC2_XYangle[3]);
}
""" .
:field_2_3_2_1_8_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'TRC1Location' ;
  x3do:type 'SFVec3f' .
:field_2_3_2_1_8_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'TRC2Location' ;
  x3do:type 'SFVec3f' .
:field_2_3_2_1_8_3 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'initializeOnly' ;
  x3do:name 'OperatingMode' ;
  x3do:type 'SFString' .
:field_2_3_2_1_8_4 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC1_XZangle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_5 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC2_XZangle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_6 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'beamScale' ;
  x3do:type 'SFVec3f' .
:field_2_3_2_1_8_7 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC1_beamLength' ;
  x3do:type 'SFFloat' .
:field_2_3_2_1_8_8 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC2_beamLength' ;
  x3do:type 'SFFloat' .
:field_2_3_2_1_8_9 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC1_XYangle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_10 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC2_XYangle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_11 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'LinkEstablished' ;
  x3do:type 'SFBool' .
:field_2_3_2_1_8_12 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC1_Viewpoint' ;
  x3do:type 'SFVec3f' .
:field_2_3_2_1_8_13 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC2_Viewpoint' ;
  x3do:type 'SFVec3f' .
:field_2_3_2_1_8_14 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC1_ViewpointAngle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_15 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'TRC2_ViewpointAngle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_16 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'HighAboveViewpoint' ;
  x3do:type 'SFVec3f' .
:field_2_3_2_1_8_17 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'HighAboveTranslationAngle' ;
  x3do:type 'SFRotation' .
:field_2_3_2_1_8_18 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'WhichBeam' ;
  x3do:type 'SFInt32' .
:IS_2_3_2_1_8_19 a owl:NamedIndividual, x3do:IS ;
  x3do:hasParent :CalculateAngleScript ;
  x3do:hasConnect :connect_2_3_2_1_8_19_1, :connect_2_3_2_1_8_19_2, :connect_2_3_2_1_8_19_3 .
:connect_2_3_2_1_8_19_1 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_8_19 ;
  x3do:nodeField 'TRC1Location' ;
  x3do:protoField 'TRC1Location' .
:connect_2_3_2_1_8_19_2 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_8_19 ;
  x3do:nodeField 'TRC2Location' ;
  x3do:protoField 'TRC2Location' .
:connect_2_3_2_1_8_19_3 a owl:NamedIndividual, x3do:connect ;
  x3do:hasParent :IS_2_3_2_1_8_19 ;
  x3do:nodeField 'OperatingMode' ;
  x3do:protoField 'OperatingMode' .
:ROUTE_2_3_2_2 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_XZangle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'TRC1_TRANSFORM' .
:ROUTE_2_3_2_3 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC2_XZangle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'TRC2_TRANSFORM' .
:ROUTE_2_3_2_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_beamLength' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'range' ;
  x3do:toNode 'TRC1_BEAMCYLINDER' .
:ROUTE_2_3_2_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_beamLength' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'range' ;
  x3do:toNode 'TRC1_BEAMCONE' .
:ROUTE_2_3_2_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC2_beamLength' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'range' ;
  x3do:toNode 'TRC2_BEAMCYLINDER' .
:ROUTE_2_3_2_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_beamLength' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'range' ;
  x3do:toNode 'TRC2_BEAMCONE' .
:ROUTE_2_3_2_8 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_XYangle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'TRC1_XY_TRANSFORM' .
:ROUTE_2_3_2_9 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC2_XYangle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'TRC2_XY_TRANSFORM' .
:ROUTE_2_3_2_10 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'LinkEstablished' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'contact' ;
  x3do:toNode 'TRC1_BEAMCYLINDER' .
:ROUTE_2_3_2_11 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'LinkEstablished' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'contact' ;
  x3do:toNode 'TRC1_BEAMCONE' .
:ROUTE_2_3_2_12 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'LinkEstablished' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'contact' ;
  x3do:toNode 'TRC2_BEAMCYLINDER' .
:ROUTE_2_3_2_13 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'LinkEstablished' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'contact' ;
  x3do:toNode 'TRC2_BEAMCONE' .
:ROUTE_2_3_2_14 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_Viewpoint' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'position' ;
  x3do:toNode 'TRC1Viewpoint' .
:ROUTE_2_3_2_15 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC2_Viewpoint' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'position' ;
  x3do:toNode 'TRC2Viewpoint' .
:ROUTE_2_3_2_16 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC1_ViewpointAngle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'orientation' ;
  x3do:toNode 'TRC1Viewpoint' .
:ROUTE_2_3_2_17 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'TRC2_ViewpointAngle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'orientation' ;
  x3do:toNode 'TRC2Viewpoint' .
:ROUTE_2_3_2_18 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'HighAboveViewpoint' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'translation' ;
  x3do:toNode 'HighAboveXZTranslation' .
:ROUTE_2_3_2_19 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'HighAboveTranslationAngle' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'rotation' ;
  x3do:toNode 'HighAboveXZTranslation' .
:ROUTE_2_3_2_20 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'WhichBeam' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'BeamSwitch' .
:ROUTE_2_3_2_21 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :ProtoBody_2_3_2 ;
  x3do:fromField 'WhichBeam' ;
  x3do:fromNode 'CalculateAngleScript' ;
  x3do:toField 'whichChoice' ;
  x3do:toNode 'BeamSwitch2' .
:WorldInfo_2_4 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:info '"Authors: Mike Hunsberger" "Revised: 30 April 2001" "Purpose: Pair of TSSRs" "Browser: CosmoPlayer"' ;
  x3do:title 'AntennaWorld' .
:ProtoInstance_2_5 a owl:NamedIndividual, x3do:ProtoInstance ;
  x3do:hasParent :Scene ;
  x3do:hasFieldValue :fieldValue_2_5_1, :fieldValue_2_5_2, :fieldValue_2_5_3 ;
  x3do:name 'TRC170Pair' .
:fieldValue_2_5_1 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_5 ;
  x3do:name 'TRC1Location' ;
  x3do:value ( 0 0 0 ) .
:fieldValue_2_5_2 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_5 ;
  x3do:name 'TRC2Location' ;
  x3do:value ( -20000 0 -20000 ) .
:fieldValue_2_5_3 a owl:NamedIndividual, x3do:fieldValue ;
  x3do:hasParent :ProtoInstance_2_5 ;
  x3do:name 'OperatingMode' ;
  x3do:value 'TROPOSCATTER' .
:Background_2_6 a owl:NamedIndividual, x3do:Background ;
  x3do:hasParent :Scene ;
  x3do:groundAngle ( 1.57079 ) ;
  x3do:groundColor ( 1 0.8 0.6 0.6 0.4 0.2 ) ;
  x3do:skyAngle ( 0.2 ) ;
  x3do:skyColor ( 1 1 1 0.2 0.2 1 ) .
