Skip to content

Latest commit

 

History

History
122 lines (72 loc) · 5.81 KB

README.adoc

File metadata and controls

122 lines (72 loc) · 5.81 KB

NearMiss Engine

Purpose

This near-miss-engine is developed in context of the DMA near-miss project.

The Purpose of the component is to generate near-miss event information and save to database.

Build

The software is built as part of the parent maven build. To build this maven module separately just run mvn package or similar.

When running the build use the SpringBoot default profile (application.properties) for standalone execution of the tests.

Run

Refer to the Dockerfile to see how to run.

Configuration

The near-miss-engine has several configurations.

Refer to the NearMissEngineConfiguration.java class.

Also refer to the configurtion files:

Usage

The component has been designed to run in development mode (locally or within development environment). Or in a Docker packaged mode.

Running development mode use the profile dev

Running in Docker use the profile docker

/-------------\          /-----------\          /----------\
|             |          |cGRE       |          |{s}       |
|   Pilot Plug+---o <----| NearMiss  |--------->| NearMiss |
|   Simulator |          |  Engine   |          |    DB    |
|             |          |           |          |          |
\-------------/          \-----------/          \----------/




            -=------------------------------->
                  Direction of data flow

Implementation

Algorithm

The implementation of near collision detection is a geometric algorithm based on the idea of safety zones. A safety zone is an area around a vessel, which at any time must be kept clear of any obstacles - including other vessels. Or in the words of [4]: A safety zone "…​ is generally thought as the space around the ship, which the navigator wants to keep clear of other objects (including ships)".

In line with this the near collision algorithm implemented in the software at hand is intended to detect the presence of any other vessel inside the safety zone of own vessel.

Other vessels are modelled by 5-point geometric shapes determined by their size as reported via AIS.

The safety zone of own vessel is continuously calculated as time progresses. In line with selected academic studies ([1], [2], [3], [4], [5]) the safety zone around is defined by a geometric ellipse, which has its major axis oriented along own vessel’s course over ground (COG) and the length of its major axis varying with own vessel’s length over all (LOA) and speed over ground (SOG).

The actual size and location of the safety zone ellipse around own vessel is subject to further academic and empiric studies. But in the current implementation, the safety zone ellipse is defined by:

  • Center, c

    • Translated d meters along COG from vessel’s geometric center, where

    • d = LOA * SOG / 50 + SOG * 3

  • Orientation, t

    • t = COG

  • Length of major axis, a

    • a = LOA * 1.2 + SOG * 20

  • Length of minor axis, b

    • b = BEAM * 4

 — where LOA is own vessel’s length over all (in meters), BEAM is own vessel’s largest breadth (in meters), SOG is own vessel’s speed over ground (in knots), and COG is own vessel’s course over ground (in true degrees relative to North).

These formulas and constants are empirically and arbitrarily chosen with little concern for existing academic literature. Further work should align the parameters of the safety zone with established academic standards such as the references mentioned below. Therefore current implementation of the near-collision detection engine is intentionally writted to be flexible so that different shapes, sizes and relative locations can be tested.

Dependency to AisLib

This module does need AisLib to have been cloned from GitHub and built locally.

<dependency>
    <groupId>dk.dma.ais.lib</groupId>
    <artifactId>ais-lib-communication</artifactId>
    <version>2.4-SNAPSHOT</version>
</dependency>

References

Back

Back to near-miss parent module.