Class SpeedStepScaleSpeedMatcher

    • Method Detail

      • validate

        protected boolean validate()
        Validates the speed matcher's configuration
        Specified by:
        validate in class SpeedMatcher
        Returns:
        true if the configuration is valid, false otherwise
      • getSpeedStepScaleSpeedInKPH

        protected float getSpeedStepScaleSpeedInKPH​(int speedStep)
        Gets the speed in KPH for a given speed step for a speed step scale speed matcher
        Parameters:
        speedStep - the int speed step to get the speed for
        Returns:
        speed for the given speedStep in KPH
      • getSpeedStepLinearValue

        protected int getSpeedStepLinearValue​(int speedStep)
        Gets the speed step value for a linear speed table
        Parameters:
        speedStep - the inst speed step to get the value for
        Returns:
        value for the speed step
      • getSpeedForSpeedTableStep

        public static float getSpeedForSpeedTableStep​(int speedStep)
        Gets the 128 speed step mode speed for a speed table step
        Parameters:
        speedStep - the int speed table step to get the 128 speed step mode speed for
        Returns:
        the 128 speed step mode speed for the given speedStep
      • getNextLowestSpeedTableStepForSpeed

        public static int getNextLowestSpeedTableStepForSpeed​(float speed)
        Gets the next lowest speed table step for the given speed
        Parameters:
        speed - float speed in the user facing unit
        Returns:
        the next lowest int speed table step for the given speed