Class MaritimeSystem
- Namespace
- NominalSystems.Universe
- Assembly
- NominalSystems.Universe.dll
[Nominal] The maritime system is able to keep track of vessels and manage the AIS integration for the vessels and messages.
public class MaritimeSystem : UniverseSystem
- Inheritance
-
MaritimeSystem
- Extension Methods
Constructors
MaritimeSystem()
Default constructor
protected MaritimeSystem()
Fields
MaxVessels
The maximum number of vessels that can be created in the system, which will be blocked by AIS if more vessels are registered.
[Unit(UnitType.NONE)]
public int MaxVessels
Field Value
Properties
IsConnected
A flag indicating if the AIS connection has been attempted
[ReadOnly]
public bool IsConnected { get; }
Property Value
NumVessels
The total number of vessels loaded into the system
[Unit(UnitType.NONE)]
[ReadOnly]
public int NumVessels { get; }
Property Value
Methods
AddCoordinateRangeAIS(GeodeticElements, GeodeticElements)
Adds a new range of coordinates to the AIS system to request. This will append the range to the list of valid coordinates.
public void AddCoordinateRangeAIS(GeodeticElements minimumCoordinates, GeodeticElements maximumCoordinates)
Parameters
minimumCoordinates
GeodeticElements[deg] The minimum coordinates of the grid
maximumCoordinates
GeodeticElements[deg] The maximum coordinates of the grid
CancelRequestAIS()
Cancels the request that is currently being processed by the AIS system.
public void CancelRequestAIS()
ClearCoordinatesAIS()
Clears the AIS coordinates that are currently being used within the range and resets the list of coordinates.
public void ClearCoordinatesAIS()
ConnectAIS(string)
Connects to the Automatic Identification System using the AIS system with a valid AISStream API token.
public void ConnectAIS(string token)
Parameters
token
stringThe access token used to connect to the service
DisconnectAIS()
Disconnects from the AIS system and closes the connection.
public void DisconnectAIS()
GetVessel(int)
Returns the vessel that matches the MMSI ID value that was passed in.
public Vessel? GetVessel(int id)
Parameters
id
int[-] The MMSI ID
Returns
- Vessel
A vessel object if it exists
GetVessels()
Returns the list of vessels from the Maritime subsystem of all tracked vessels.
public List<Vessel> GetVessels()
Returns
OnFinish(double)
Called when the object is deleted from the simulation and can handle any cleanup of variables.
protected override void OnFinish(double time)
Parameters
time
double[s] The current clock time when deleted
RequestVesselsAIS(string[])
Requests AIS data from the integration with the system and loads some new vessels. This will attempt to create the vessels from the data that is returned. This will be based on the AISCoordinates which can be added by the AddCoordinateRangeAIS method.
public void RequestVesselsAIS(string[] ids)
Parameters
ids
string[]A list of MMSI vessel IDs to filter by