TransportMode

sealed class TransportMode

Defines different modes of transport for navigation, each with its own constraints and routing rules. These modes influence route calculation, taking into account road access, speed limits, and restrictions of the specified transport mode.

Inheritors

Types

Link copied to clipboard
data object Bicycle : TransportMode

Allows navigation through bike paths and prohibits navigation on large roads.

Link copied to clipboard
data class Bus(val heightMeters: Double = 4.0, val widthMeters: Double = 2.55, val lengthMeters: Double = 15.0, val weightKg: Double = 25000.0) : TransportMode

Takes special challenges for busses like height restrictions and specific road classes into account. Assume speeds according to local laws for busses.

Link copied to clipboard
data class Car(val heightMeters: Double = 1600.0, val widthMeters: Double = 1850.0, val lengthMeters: Double = 4500.0, val weightKg: Double = 2500.0) : TransportMode

Assumes standard passenger vehicles. Considers general road laws and speed limits applicable to cars. Avoids restricted roads like pedestrian zones or roads prohibited for cars.

Link copied to clipboard

Allows navigation on footpaths and prohibits navigation along roads not meant for pedestrians.

Link copied to clipboard
data class Truck(val heightMeters: Double = 4.0, val widthMeters: Double = 2.55, val lengthMeters: Double = 12.0, val weightKg: Double = 440000.0, val trailerCount: Int) : TransportMode

Assumes large or heavy vehicles and doesn't navigate through places with weight or height restrictions. Assumes speeds according to local laws for trucks.