• No results found

Anti-Grounding Task in DUNE

5.2.6 Discussion

The observant reader may have noticed that the functions in the subclasses were relatively similar. Adding these functions to the superclass would be a better solution, avoiding having to make one function in each class performing almost identical task (such as the get square functions). The problem with such an approach, is that the data is returned in std::vectorcontainers. The vector container is dependent on having a fixed and known object size at compilation time, which it would not have if it stored objects of different types. The multi-class approach is therefore a compromise which makes the code less elegant, but should not affect performance. A proposed solution is to store pointers to objects instead of the actual objects in the container. This option has not been further explored.

5.3 Anti-Grounding Task in DUNE

To keep the vessel in the navigable area of the sea, a system for checking plans and mon-itoring the depths in the vicinity of the vessel has been developed, in the form of an anti-grounding task in DUNE. As the functionality of the task issupervisingthe depth, it has been placed indune/src/Supervisors/Grounding/.

Two alternatives has been developed to accomplish anti-grounding, one based on the two-dimensional grid, and the other based on the DEPARE contour vertices.

Checking plans in DUNE, is accomplished by subscribing to

IMC::PlanSpecification. Each message contains one or more maneuvers which have to be checked. The maneuvers may be of different types, each with their own speciality that the grounding task can handle separately.

The only maneuver currently supported by this task, is the GoTo maneuver. This maneuver creates a straight line path from one point to another that is to be traveled at a given speed.

Acknowledgement: Alberto Dallolio wrote the code in the DUNE task that iterates through a received plan, while the author developed thecheckTransectcode. Al-berto Dallolio also wrote the periodical grounding check on the vessels surroundings in the task.

5.3.1 By two-dimensional grids

The two-dimensional grids created in section 4.3.2 only contains points that are on the ocean, and has no representation of land. To be able to detect land, one either has to add data for land3, or use the absence of points in an area to deduce that the area is land. The

3Readily available from the S-57 object LNDARE.

Figure 5.5:Plan used to demonstrate anti-grounding transect checking.

latter is chosen in this implementation, which creates an instance of theTwoDGridclass, and uses thechecktransectfunction.

For this to be effective, the square has to bengrid∗√

2m in width and length, where ngrid is the grids resolution. Due to rounding errors and small possible position shifts when projecting ETRS UTM33 grids to WGS84, some small marginmeshould be added ngrid∗√

2 +mem.

Iterating through the maneuvers of the plan, acheckTransectis called on each goTo maneuver.

A special case of the GoTo maneuver is when it is starting in a different location than where the vessel is located. Then the vessel first travels to the starting point of the maneuver. To check the transect between the current vessel position and the starting point of the maneuver is solved by having the task subscribe to the IMC messageIMC::GpsFix , and storing the most recent location. This can then be used as starting position of the transect.

If grounding is detected in an activated plan, anIMC::Abortmessage is sent, which makes the vehicle supervisor end the plan execution, and stopping the vessel. An alterna-tive to this, would be searching for a valid path with the path planner described in section 5.4.

In addition to checking received plans, the task can also perform regular depth data queries for the current location, giving the operator warning if the vessel is nearing or entering shallow water. For this, using the already receivedIMC::GpsFixis used. With thegetWithinRadiusfunction, the information about the surroundings are queried, and the result can be checked for shallow depth.

Based on the path shown in figure 5.5, the results from this anti-grounding approach is shown in figure 5.6.

5.3 Anti-Grounding Task in DUNE

(a)50m grid (b)2m grid

Figure 5.6: The results of runningcheckTransecton Munkholmen, Trondheim with grids of depth. Red points are detected land area, other colors show the navigable waters of the transects (with no depth limit set).

5.3.2 By DEPARE Contour Vertices

For checking plans, the DEPARE contour vertices can also be used. By checking a corridor around a transect, all depth changes along the transect is detected.

In order to guarantee that a vertex is detected, the corridor width has to be larger than largest gap expected between the vertices of any contour in the data. When the vertex distance of the data is set to 5m, as used in the data shown in figure 4.6, a result such as figure 5.7 are returned.

As each crossing of a line of vertices signify entering an area with different depth limits by a different DRVAL1 and DRVAL2, how is the vessel to know if it is entering a shallow area or leaving it? The proposed solution to this, is to store the previous registered DRVAL1. When meeting a new vertex with DRVAL2 equal to the previously recorded DRVAL1, the detected vertex signifies that one is entering the area with the detected DR-VAL1, else, one is leaving the area.

5.3.3 Discussion

The queries used for the anti-grounding examples use the square queries with the vessel at the center of the square. Alternative, this square could be skewed in the direction of movement to get more relevant data in a longer horizon. Ideally, the area checked should be cone shaped around the vessel, with the broadest part of the cone sitting in the direction of movement, but making those kinds of queries efficiently in SQL would be difficult.

The depth soundings of the ENCs is referenced to NMAPssea chart zero4reference, as is defined in [81]. This level is placed below or at the lowest astronomic level refer-ence, which is the the lowest expected tidal depth without accounting for the effects of the weather. Lower depth than those read from the ENC data is therefore not expected to occur frequently.

A benefit of using the DEPARE vertices rather than the twoDgrid, is that it requires less data to be stored to accomplish the same effective resolution for anti-grounding purposes.

It would also make it easier to make maneuvers that follows the contours of sub-aquatic

4Translation from Norwegian word Sjøkartnull.

Figure 5.7: The results of runningcheckTransecton Munkholmen, Trondheim with contour vertices. Points show returned vertices with known DRVAL1 and DRVAL2 for each transect.

structures, which might be an usefull feature for searching along the coastline. The draw-backs is that it does not contain the amount of information that the MAREANO grid has.

In the used dataset, as shown in figure 4.6, a filter has been applied to remove areas where DRVAL1 is above 20m, in order to reduce the amount of vertices in the database. Keeping this filter would also lead to having no information about depths in deeper areas

Grid Areas Considered Grounding

An example of what areas the grid implementation deem not navigable is shown in figure 5.8. This is the same area previously shown in figure 4.3b. From the figure, the need to put restrictions on depth is visible by areas on land being allowed. The outer area of the figure has a 5m depth limit, which results in a larger safety buffer around land. The figure shows depth soundings from the MAREANO dataset, in a 50m·50m grid.