Class Speed.Unit

All Implemented Interfaces:
UnitInterface<Speed.Unit,Speed>
Enclosing class:
Speed

public static class Speed.Unit extends AbstractUnit<Speed.Unit,Speed>
Speed.Unit encodes the units of the rate of change of a position over time.

Copyright (c) 2025-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.

Author:
Alexander Verbraeck
  • Field Details

    • SI_UNIT

      public static final SIUnit SI_UNIT
      The dimensions of Speed: m/s.
    • m_s

      public static final Speed.Unit m_s
      Meter per second.
    • SI

      public static final Speed.Unit SI
      The SI or BASE unit.
    • m_h

      public static final Speed.Unit m_h
      m/h.
    • km_s

      public static final Speed.Unit km_s
      km/s.
    • km_h

      public static final Speed.Unit km_h
      km/h.
    • in_s

      public static final Speed.Unit in_s
      in/s.
    • in_min

      public static final Speed.Unit in_min
      in/min.
    • in_h

      public static final Speed.Unit in_h
      in/h.
    • ft_s

      public static final Speed.Unit ft_s
      ft/s.
    • ft_min

      public static final Speed.Unit ft_min
      ft/min.
    • ft_h

      public static final Speed.Unit ft_h
      ft/h.
    • mi_s

      public static final Speed.Unit mi_s
      mi/s.
    • mi_min

      public static final Speed.Unit mi_min
      mi/min.
    • mi_h

      public static final Speed.Unit mi_h
      mi/h.
    • kt

      public static final Speed.Unit kt
      knot = Nautical Mile per hour.
  • Constructor Details

    • Unit

      public Unit(String id, String name, double scaleFactorToBaseUnit, UnitSystem unitSystem)
      Create a new Speed unit.
      Parameters:
      id - the id or main abbreviation of the unit
      name - the full name of the unit
      scaleFactorToBaseUnit - the scale factor of the unit to convert it TO the base (SI) unit
      unitSystem - the unit system such as SI or IMPERIAL
    • Unit

      public Unit(String textualAbbreviation, String displayAbbreviation, String name, Scale scale, UnitSystem unitSystem)
      Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
      Parameters:
      textualAbbreviation - the textual abbreviation of the unit, which doubles as the id
      displayAbbreviation - the display abbreviation of the unit
      name - the full name of the unit
      scale - the scale to use to convert between this unit and the standard (e.g., SI, BASE) unit
      unitSystem - unit system, e.g. SI or Imperial
  • Method Details

    • siUnit

      public SIUnit siUnit()
      Description copied from interface: UnitInterface
      Return the SI unit for this unit.
      Returns:
      the SI unit for this unit
    • getBaseUnit

      public Speed.Unit getBaseUnit()
      Description copied from interface: UnitInterface
      Return the base unit for this unit.
      Returns:
      the base unit for this unit
    • ofSi

      public Speed ofSi(double si)
      Description copied from interface: UnitInterface
      Return an SI-quantity for this unit with a value.
      Parameters:
      si - the value in SI or BASE units
      Returns:
      an SI-quantity for this unit with the given si-value
    • deriveUnit

      public Speed.Unit deriveUnit(String textualAbbreviation, String displayAbbreviation, String name, double scaleFactor, UnitSystem unitSystem)
      Description copied from class: AbstractUnit
      Return a linearly scaled derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
      Specified by:
      deriveUnit in class AbstractUnit<Speed.Unit,Speed>
      Parameters:
      textualAbbreviation - the textual abbreviation of the unit, which doubles as the id
      displayAbbreviation - the display abbreviation of the unit
      name - the full name of the unit
      scaleFactor - the (linear) scale factor to multiply with the current (linear) scale factor
      unitSystem - unit system, e.g. SI or Imperial
      Returns:
      a derived unit for this unit