DefaultSpeedInfoViewModel

class DefaultSpeedInfoViewModel(navigationManager: NavigationManager) : SpeedInfoViewModel

Default implementation of SpeedInfoViewModel that observes navigation state and provides real-time speed information during navigation.

This ViewModel:

  • Tracks current speed from GPS

  • Monitors speed limits for the current road segment

  • Detects speed limit violations

  • Provides camera proximity warnings and progress

Parameters

navigationManager

The navigation manager providing route and location data

Constructors

Link copied to clipboard
constructor(navigationManager: NavigationManager)

Properties

Link copied to clipboard
open override val speedInfoState: StateFlow<SpeedInfoState>

Observable state containing current speed information. Emits updates when speed, speed limit, or camera proximity changes.

Functions

Link copied to clipboard
open override fun onCleared()

Cleans up resources when the ViewModel is destroyed.