tacticalEnvCommon.jar
and the JenaCommon.jar
Jar files in the global deployment because this library must be shared between the tacticalEnv Application, the Jena module, and the UA application. If you don't do that, you would encounter a ClassCast exception[3]
: <applications> <deployment> <lib url="tacticalEnvCommon.jar" /> <lib url="JenaCommon.jar" /> </deployment> ... </applications>
<event name="alert"> <data name="alert" type="alert" desc="the alert"/> <data name="status" type="alertStatus" desc="the alert status"/> </event>The
alertStatus
types have the following definition:<enumType name="alertType" > <enumValue name="WARNING" /> <enumValue name="CAUTION" /> <enumValue name="ADVISORY" /> </enumType> <enumType name="alertStatus" > <enumValue name="NEW" /> <enumValue name="REMOVED" /> </enumType> <structType name="alert"> <field name="number" type="int" /> <field name="type" type="alertType" /> <field name="content" type="string" /> </structType>Each time the user clicks on a checkbox in front of an alert:
alert
service is sent with the status
set to NEW
alert
service is sent with the status
set to REMOVED
<application name="uaappli"> <deployment> <lib url="UAApplication.jar" /> <lib url="UAAppliHelper.jar" /> </deployment> <modules> <module name="uaappli"> <interfaces> <eventReceived service="worldConfig" uri="http://dassault-aviation.com/tacticalenv"/> <eventReceived service="flightplansModel" uri="http://dassault-aviation.com/tacticalenv"/> <eventReceived service="waypointsModel" uri="http://dassault-aviation.com/tacticalenv"/> <subscribe service="aircraftsModel" uri="http://dassault-aviation.com/tacticalenv"/> </interfaces> </module> </modules> </application>It will be notified from the following services:
worldConfig
service to set the center of the mapflightplansModel
and waypointsModel
services to set the flightplan and the WaypointsaircraftsModel
service to update the position of the Aircraftalert
service<properties> <application name="jena"> <module name="jena"> <moduleArrayGroupProperty key="schemas"> <moduleArrayValue> <moduleProperty key="name" value="inav" /> <moduleProperty key="owlData" value="MapGeoSparql.owl.rdf" /> <moduleProperty key="prefixNS" value="inav:" /> <moduleProperty key="owlNS" value="http://localhost/INAV#" /> <moduleProperty key="geosparql" value="true" /> </moduleArrayValue> </moduleArrayGroupProperty> <moduleProperty key="debug" value="false" /> <moduleProperty key="commit" value="true" /> </module> </application> <application name="uaappli" > <module name="uaappli" > <moduleProperty key="uaImpl" value="InavUI.jar" /> <moduleProperty key="uaPath" value="org.da.arinc.syntheticmap.InavUI" /> <moduleProperty key="a661Config" value="arinc/arincserver.properties" /> <moduleProperty key="includeServer" value="true" /> </module> </application> <application name="alertEngine" > <module name="alertEngine" > <moduleProperty key="alertList" value="alerts.xml" /> </module> </application> <application name="tacticalenv"> <module name="tacticalenv"> <moduleProperty key="scenario" value="tacticalEnv.xml" /> <moduleProperty key="activate" value="true" /> <moduleProperty key="updatePeriod" value="1s" /> </module> </application> </properties>
filelist.xml
file for our configuration, as for all our other tutorials:
java -jar protoframework.jar config=filelist.xml
As you see, in this configuration, the Aircraft does move. Now we can ask SPARQL requests about the environment using the userInputs application interface.owlRequest
service has the following datas:<requestResponse name="owlRequest"> <request> <data name="reqSchema" desc="Schema key" type="string" /> <data name="query" desc="JENA query" type="string" /> <data name="responseType" desc="Response Type" type="ontologyResponseType" /> </request> <response> <data name="respSchema" desc="Schema key" type="string" /> <data name="response" desc="JENA query response" type="string" /> <data name="xmlResponse" desc="JENA XML query response" type="xml" /> <data name="requestStatus" desc="Request status" type="requestStatus" /> </response> </requestResponse>You can send requests (ie queries) with the userInputs application. Try several queries which are defined in the
queries
sub-directory. The reqSchema
data must be set to inav
because it is the key of our schema in the properties.
SELECT ?label WHERE { ?wpt rdf:type inav:Waypoint . ?wpt inav:Label ?label . }You will have the following response in the
response
output data:----------- | label | =========== | "ATT1" | | "WPT7" | | "WPT10" | | "WPT9" | | "WPT4" | | "ATT2" | | "WPT11" | | "WPT8" | | "WPT6" | -----------The following request returns the list of Waypoints which are in the FlightPlan:
SELECT ?label WHERE { ?wpt rdf:type inav:Waypoint . ?fp rdf:type inav:FlightPlan . ?wpt inav:isWaypointFrom ?fp . ?wpt inav:Label ?label . }You will have the following response in the
response
output data:----------- | label | =========== | "WPT7" | | "WPT9" | | "WPT11" | | "WPT8" | | "WPT6" | -----------The following request returns the nearest ATT Waypoint and its distance:
SELECT ?label ?distance WHERE { ?wpt rdf:type inav:Waypoint . ?wpt inav:Label ?label . ?wpt inav:hasWaypointType <http://localhost/INAV#ATT> . ?ac rdf:type inav:Aircraft . ?ac inav:Label "falcon" . ?wpt inav:hasExactGeometry ?auto_2 . ?auto_2 inav:asWKT ?auto_3 . ?ac inav:hasExactGeometry ?auto_4 . ?auto_4 inav:asWKT ?auto_5 . BIND (geof:distance(?auto_3, ?auto_5, <http://www.opengis.net/def/uom/OGC/1.0/nauticalMile>) as ?distance) } ORDER BY ASC( ?distance ) LIMIT 1? ac rdf:type inav:Aircraft . ?acYou will have the following response in the
response
output data:-------------------------------- | label | distance | ================================ | "ATT1" | 42.03500329415974e0 | --------------------------------This last SPARQL query is a bit more complex than the others:
SELECT ?number ?type WHERE { ?alarm rdf:type inav:Alarm . ?alarm inav:AlarmNumber ?number . ?alarm inav:hasAlarmType ?type . }To have a non empty result you need to check some Alerts in the AlertEngine GUI.
response
output data:----------------------------------------------- | number | type | =============================================== | "5" | <http://localhost/INAV#AmberAlarm> | | "7" | <http://localhost/INAV#RedAlarm> | | "3" | <http://localhost/INAV#AmberAlarm> | -----------------------------------------------
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence