Editor: Fetching Vessels from AIS
Description
This guide provides an overview of how the Automatic Identification System (AIS) of maritime assets can be used to initialize the positions of Maritime Vessels based on real-time data from aisstream.io. Aisstream is an online resource that allows users to “track ship movements, monitor maritime accidents and discover ship's cargo from a WebSocket API in real-time and for free”.
The Demo_Maritime_AIS_API
demo in Nominal Editor is referenced in this guide and is a provided example of using the streamed AIS data to populate the simulation with real-world vessel position data. This demo is using Nominal's Prototype Maritime Simulation system. We invite any feedback from our users on how it can be improved via the contact page on our website: www.nominalsys.com/contact.
Warning
The functionality for AIS depends on a valid Internet connection and, depending on the use, a valid port that can be opened. As such, the functionality of this feature may depend on the environment in which Nominal Editor is being run. Cloud deployments, for example, may not run AIS as expected.
Setting Up the AIS Integration
To use the provided blueprint functions at a simulation level, users will first need to create an account associated with aissstream to generate an API key. To get started, navigate in a browser to Sign Up/Authenticate (aisstream.io) and follow their prompts. Once signed in, select API Keys
and then Create API Key,
a list of previously generated API Keys will also be displayed. On the initial sign-in page, user can also see their recent usage.
Once you have an AIS API key, open Nominal Editor, navigate to the Nominal for Unreal Settings within Project settings
and copy your API key into the AIS API Key
field of the Maritime sub-section. The default vessel Blueprint used when spawning AIS-initiated vessels and the scale for the vessel can also be configured here.
Requesting AIS Data
Via the Maritime Subsystem
, users can request a target number of AIS Vessels to spawn within a configured latitude and longitude bounding box. As aisstream is streaming data to the simulation, a timeout in seconds is also provided. The Request Data message is populating maritime vessels based on the contents of the aisstream Position Report, the details of which can be found at aisstream.io/documentation#PositionReport.
The bounding boxes are configured via Geodetic Elements; the referenced demo has a bonding box that covers Australia’s coastline.
Finally, the referenced demo has bound the spawning of aisstream to spawn vessels to a keyboard button press, with one vessel being spawned until the configured limit is reached.
Warning
AIS does not have a way to store data on previous vessel information. As such, data that is pulled into the simulation is current data of vessel information published. Depending on the bounding box size, this may take a few seconds to load data from an active vessel. If the Timeout
field’s value is exceeded, the function will exit.