Skip to content

anduril/sample-app-ais-integration-grpc

Repository files navigation

AIS to Lattice Integration - gRPC

This is a sample application showcasing an integration between AIS vessel traffic data and Lattice.

The sample application demonstrates how to use the Lattice gRPC SDK for initializing an entity and features the publish_entity endpoint to illustrate publishing an entity to the Lattice API.

Image showing the Lattice UI with AIS data displayed

The AIS (Automatic Identification System) vessel traffic dataset is a repository of vessel identification and positioning data. The data is collected through an onboard navigation safety device that transmits and monitors the location and characteristics of vessels in U.S. For this sample demonstration, the only 4 fields in the dataset that we are interested in are the MMSI, latitude, longitude, and vessel name. These fields are used to simulate maritime traffic, creating and continuously updating vessel entities with their latest position and publishing them to the Lattice API in real-time.

Before you begin

  • Install Python version greater than or equal to 3.9.
  • Complete the set up instructions in the Lattice SDK Documentation.

Clone the repository

git clone https://github.com/anduril/sample-app-ais-integration-grpc.git sample-app-ais-integration-grpc
cd sample-app-ais-integration-grpc

Optional: Initialize a virtual environment

python -m venv .venv
source .venv/bin/activate

Install dependencies and configure project

  1. Install the dependencies used for this project:
    pip install -r requirements.txt
  2. Modify the configuration file in var/config.yml:
    • Replace <ENVIRONMENT_TOKEN> and <LATTICE_ENDPOINT> with your environment endpoint and tokens:
    • You can also modify:
      • entity-update-rate-seconds: To change the interval between publishing vessel entities
      • vessel-mmsi: To change the vessels to track
      • ais-generate-interval-seconds: To change the interval between generating vessel data

Run the app

Run the following command to start the app

python src/main.py --config var/config.yml

Verify the output

Navigate to your Lattice UI and verify that the vessel entities are displayed.

About

A sample application showcasing the use of the Entities gRPC APIs

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages