Interface PerceivedObject.Kinematics

All Known Implementing Classes:
PerceivedObject.Kinematics.Record
Enclosing interface:
PerceivedObject

public static interface PerceivedObject.Kinematics
Information on the kinematics of the perceived object.
  • Method Details

    • getDistance

      Length getDistance()
      Retrieve the strongly typed distance to the other object.
      Returns:
      the distance to the object
    • getSpeed

      Speed getSpeed()
      Returns speed.
      Returns:
      the (perceived) speed of the other object
    • getAcceleration

      Acceleration getAcceleration()
      Returns acceleration.
      Returns:
      the (perceived) acceleration of the other object
    • isFacingSameDirection

      boolean isFacingSameDirection()
      Returns whether the object is facing the same direction.
      Returns:
      whether the object is facing the same direction
    • getOverlap

      Returns information on the overlap for parallel objects. For objects fully ahead or behind that fact is provided, with null overlap values.
      Returns:
      information on the overlap for parallel objects
    • staticAhead

      static PerceivedObject.Kinematics staticAhead(Length distance)
      Return kinematics for a static object at given distance ahead. Overlap is considered non-existent. The object is considered to face the same direction, which might not mean much for a static object.
      Parameters:
      distance - distance to object
      Returns:
      kinematics for a static object at given distance
    • staticBehind

      static PerceivedObject.Kinematics staticBehind(Length distance)
      Return kinematics for a static object at given distance behind. Overlap is considered non-existent. The object is considered to face the same direction, which might not mean much for a static object.
      Parameters:
      distance - distance to object
      Returns:
      kinematics for a static object at given distance
    • dynamicAhead

      static PerceivedObject.Kinematics dynamicAhead(Length distance, Speed objectSpeed, Acceleration objectAcceleration, boolean facingSameDirection, Length objectLength, Length referenceLength)
      Return kinematics for a dynamic object ahead. The distance may be negative up to an absolute value equal to the object length plus the ego length.
      Parameters:
      distance - distance from ego front to object rear (or front when not facing the same direction)
      objectSpeed - speed of perceived object
      objectAcceleration - acceleration of perceived object
      facingSameDirection - whether the object is facing the same direction
      objectLength - object length
      referenceLength - length of reference object, usually the perceiving GTU
      Returns:
      kinematic for a dynamic object
      Throws:
      IllegalArgumentException - when the distance beyond the extent of object length plus reference length
    • dynamicBehind

      static PerceivedObject.Kinematics dynamicBehind(Length distance, Speed objectSpeed, Acceleration objectAcceleration, boolean facingSameDirection, Length objectLength, Length referenceLength)
      Return kinematics for a dynamic object behind. The distance may be negative up to an absolute value equal to the object length plus the ego length.
      Parameters:
      distance - distance from ego front to object rear (or front when not facing the same direction)
      objectSpeed - speed of perceived object
      objectAcceleration - acceleration of perceived object
      facingSameDirection - whether the object is facing the same direction
      objectLength - object length
      referenceLength - length of reference object, usually the perceiving GTU
      Returns:
      kinematic for a dynamic object
      Throws:
      IllegalArgumentException - when the distance beyond the extent of object length plus reference length