Skip to content

HSLdevcom/suomenlinna-ferry-hfp

Repository files navigation

suomenlinna-ferry-hfp Test and create Docker image

Application for producing HFP data from vehicles that have only location data available. The location data will be matched to a scheduled trip from GTFS data and published over MQTT for customers.

Development

Gradle build system is used.

  1. Run tests with ./gradlew test
  2. Run application with ./gradlew run
  3. Build runnable JAR with ./gradlew shadowJar

Usage

The application can be run either with Gradle or Docker. Environment variables are used to configure how the application works. Currently there are two modes for the application, which can be selected with CONFIG environment variable: SBDRIVE and SUOMENLINNA, which use configuration files sbdrive.conf and suomenlinna.conf respectively. See the specified file and application.conf for other available environment variables.

Versioning

This application uses calendar versioning with the following pattern: YYYYMMDD. New versions can be published by creating a release in GitHub. The Docker image of this application uses latest tag for the latest build of master branch and prod tag for the latest build made from a tagged commit. Specific versions are also available with the same Docker tag as the Git tag of the version.

Architecture

Architecture diagram

The application works by matching vehicle positions to scheduled trips by checking whether the vehicle is near the first stop of the trip when the trip should begin. Vehicle positions can be listened over MQTT or polled using HTTP. Schedules for the trips are found from a GTFS package that will be downloaded regularly.

Currently the application is optimized for matching Suomenlinna ferry positions available from meri.digitraffic.fi to their scheduled trips, but other vehicles are also supported (e.g. robot buses). See PollingVehicleStateProvider and MqttVesselLocationProvider for examples.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages