Code development platform for open source projects from the European Union institutions

Skip to content
In this minor release the ``delete-location-unavailable`` property has been added in the
property file to allow a fine grained handling of the ais messages containing not availabe latitude and longitude
values, that in the specific case are 91 and 181, respectively.

If the property is not set will default to false that is the behavior the ais adaptor had in the prevoius version.
Therefore this version is backward compatible.

When the ``delete-location-unavailable`` is set to false (default) and the ais message has a latitude=91 and/or
longitude=181, the adaptor will write these values in the <Location /> tag even if they are incorrect as degrees.
For instance a AISMessage(lat: 91, long: 23.5301) the translated cise message would be:
```xml
<Vessel>
    <LocationRel>
        <Location>
            <Geometry>
                <Latitude>91</Latitude>
                <Longitude>23.5301</Longitude>
            </Geometry>
            <LocationQualitativeAccuracy>High</LocationQualitativeAccuracy>
        </Location>
        <COG>12</COG>
        ...
    </LocationRel>
    <MMSI>123456789</MMSI>
    <NavigationalStatus>UnderWayUsingEngine</NavigationalStatus>
</Vessel>
```
Notice that the ``<Latitude>91</Latitude>`` is not a valid degree.

When the ``delete-location-unavailable`` is set to true and the ais message has a latitude=91 and/or
longitude=181, the adaptor will delete the <Location /> to avoid sending a location with incorrect degrees values inside.
For instance a AISMessage(lat: 91, long: 23.5301) the translated cise message would be:
```xml
<Vessel>
    <LocationRel>
        <COG>12</COG>
        ...
    </LocationRel>
    <MMSI>123456789</MMSI>
    <NavigationalStatus>UnderWayUsingEngine</NavigationalStatus>
</Vessel>
```