All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play-commons-constants.1.0.source-code.play-epsparql-iccs-aishub-05.templ.eprq Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
#
# Title: High speed in windy conditions
# Description: Emit an event when a specific HighSpeed Vessel (defined by SAN Engine) is speeding in windy conditions, i.e. vessel is speeding (average speed the last 5 minutes) with more than 15 Knots while the wind force is more than 10 knots. 
#
# TODO: Which stream should the complex event be in? New topic needed?
# TODO: aggragate functions MIN, AVG to be tested by FZI
#

PREFIX ais:    
PREFIX rdf:    
PREFIX geo:    
PREFIX xsd:    
PREFIX :       

CONSTRUCT {
    :e rdf:type :VesselHighSpeedInWindyConditions .
    :e :stream  .
	:e ais:MMSI %MMSI_FROM_SAN% .
	:e ais:course ?course .
	:e ais:speed ?speed .
	:e ais:windSpeed ?windSpeed .
	:e ais:windDirection ?windDirection .
}
WHERE {
    WINDOW {
        EVENT ?id1 {
            ?e1 rdf:type :VesselEvent .
			?e1 :stream  .
			?e1 ais:MMSI %MMSI_FROM_SAN% .
			?e1 ais:speed ?speed .
			?e1 ais:windSpeed ?windSpeed .
            }
    } ("PT5M"^^xsd:duration, sliding)
	BIND(AVG(?speed) AS ?avgSpeed)
	BIND(AVG(?windSpeed) AS ?avgWindSpeed)
	FILTER (?avgSpeed >= %AVG_SPEED_FROM_SAN% && ?avgSpeed >= %AVG_WINDSPEED_FROM_SAN%)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy