Class CachedTransformProvider

java.lang.Object
org.orekit.frames.CachedTransformProvider

public class CachedTransformProvider extends Object
Thread-safe cached provider for frame transforms.

This provider is based on a thread-safe Least Recently Used cache using date as it access key, hence saving computation time on transform building.

This class is thread-safe.

Since:
13.0.3
Author:
Luc Maisonobe
  • Constructor Details

    • CachedTransformProvider

      public CachedTransformProvider(Frame origin, Frame destination, Function<AbsoluteDate,Transform> fullGenerator, Function<AbsoluteDate,KinematicTransform> kinematicGenerator, Function<AbsoluteDate,StaticTransform> staticGenerator, int cacheSize)
      Simple constructor.
      Parameters:
      origin - origin frame
      destination - destination frame
      fullGenerator - generator for full transforms
      kinematicGenerator - generator for kinematic transforms
      staticGenerator - generator for static transforms
      cacheSize - number of transforms kept in the date-based cache
  • Method Details

    • getOrigin

      public Frame getOrigin()
      Get origin frame.
      Returns:
      origin frame
    • getDestination

      public Frame getDestination()
      Get destination frame.
      Returns:
      destination frame
    • getCacheSize

      public int getCacheSize()
      Get the nmber of transforms kept in the date-based cache.
      Returns:
      nmber of transforms kept in the date-based cache
    • getTransform

      public Transform getTransform(AbsoluteDate date)
      Get the Transform corresponding to specified date.
      Parameters:
      date - current date
      Returns:
      transform at specified date
    • getKinematicTransform

      public KinematicTransform getKinematicTransform(AbsoluteDate date)
      Get the Transform corresponding to specified date.
      Parameters:
      date - current date
      Returns:
      transform at specified date
    • getStaticTransform

      public StaticTransform getStaticTransform(AbsoluteDate date)
      Get the Transform corresponding to specified date.
      Parameters:
      date - current date
      Returns:
      transform at specified date