Class TimedOrbitCoordinates

java.lang.Object
gaiasky.util.coord.TimedOrbitCoordinates
All Implemented Interfaces:
IBodyCoordinates

public class TimedOrbitCoordinates extends Object implements IBodyCoordinates
Composition of IBodyCoordinates that contains a start and end time of validity.
  • Field Details

    • logger

      protected static final Logger.Log logger
    • coordinates

      public AbstractOrbitCoordinates coordinates
    • start

      public Instant start
      Start and end times of these coordinates.
    • end

      public Instant end
      Start and end times of these coordinates.
    • parentName

      public String parentName
      Parent object for this orbit. This is useful when the new orbit changes the reference system.
    • parent

      public com.badlogic.ashley.core.Entity parent
      Parent entity for this orbit, if any.
  • Constructor Details

    • TimedOrbitCoordinates

      public TimedOrbitCoordinates()
  • Method Details

    • setParent

      public void setParent(String parent)
    • setStart

      public void setStart(String start)
    • setEnd

      public void setEnd(String end)
    • setCoordinates

      public void setCoordinates(IBodyCoordinates c)
    • isValid

      public boolean isValid(Instant t)
      Is this timed orbit coordinates instance in its validity period with regard to the given time?
      Parameters:
      t - The time to check.
      Returns:
      True if this timed coordinates object is valid, false otherwise.
    • doneLoading

      public void doneLoading(Object... params)
      Description copied from interface: IBodyCoordinates
      Initializes the coordinates object
      Specified by:
      doneLoading in interface IBodyCoordinates
      Parameters:
      params - The parameter objects.
    • getEclipticSphericalCoordinates

      public Vector3b getEclipticSphericalCoordinates(Instant instant, Vector3b out)
      Description copied from interface: IBodyCoordinates
      Returns the ecliptic coordinates of the body in the out vector for the given date.
      Specified by:
      getEclipticSphericalCoordinates in interface IBodyCoordinates
      Parameters:
      instant - The instant.
      out - The out vector with the ecliptic coordinates in internal units.
      Returns:
      The out vector for chaining.
    • getEclipticCartesianCoordinates

      public Vector3b getEclipticCartesianCoordinates(Instant instant, Vector3b out)
      Description copied from interface: IBodyCoordinates
      Gets ecliptic cartesian coordinates for the given date.
      Specified by:
      getEclipticCartesianCoordinates in interface IBodyCoordinates
      Parameters:
      instant - The instant.
      out - The out vector where the ecliptic cartesian coordinates will be.
      Returns:
      The out vector for chaining, or null if the date is out of range, in case of non-elliptical orbits such as Gaia.
    • getEquatorialCartesianCoordinates

      public Vector3b getEquatorialCartesianCoordinates(Instant instant, Vector3b out)
      Description copied from interface: IBodyCoordinates
      Gets equatorial cartesian coordinates for the given date.
      Specified by:
      getEquatorialCartesianCoordinates in interface IBodyCoordinates
      Parameters:
      instant - The instant.
      out - The out vector where the equatorial cartesian coordinates will be.
      Returns:
      The out vector for chaining, or null if the date is out of range, in case of non-elliptical orbits such as Gaia.
    • updateReferences

      public void updateReferences(Map<String,com.badlogic.ashley.core.Entity> index)
      Description copied from interface: IBodyCoordinates
      Update the references in this coordinates object with the given index.
      Specified by:
      updateReferences in interface IBodyCoordinates
      Parameters:
      index - The index to use.
    • getCopy

      public IBodyCoordinates getCopy()
      Description copied from interface: IBodyCoordinates
      Gets a copy of this coordinates object.
      Specified by:
      getCopy in interface IBodyCoordinates
      Returns:
      The copy.