Record Class ParticleKepler

java.lang.Object
java.lang.Record
gaiasky.scene.record.ParticleKepler
Record Components:
id - The particle identifier.
name - The name or designation.
epoch - The epoch in JD.
meanAnomaly - The mean anomaly, in degrees.
semiMajorAxis - The semi-major axis, in km.
eccentricity - The eccentricity.
argOfPericenter - The argument of pericenter, in degrees.
ascendingNode - The ascending node, in degrees.
inclination - The inclination, in degrees.
period - The orbital period, in days.
extra - Map with extra attributes.
All Implemented Interfaces:
IParticleRecord

public record ParticleKepler(long id, String name, double epoch, double meanAnomaly, double semiMajorAxis, double eccentricity, double argOfPericenter, double ascendingNode, double inclination, double period, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra) extends Record implements IParticleRecord
Record class to store particles of all kinds.
  • Constructor Details

    • ParticleKepler

      public ParticleKepler(long id, String name, double epoch, double meanAnomaly, double semiMajorAxis, double eccentricity, double argOfPericenter, double ascendingNode, double inclination, double period, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
      Creates an instance of a ParticleKepler record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      epoch - the value for the epoch record component
      meanAnomaly - the value for the meanAnomaly record component
      semiMajorAxis - the value for the semiMajorAxis record component
      eccentricity - the value for the eccentricity record component
      argOfPericenter - the value for the argOfPericenter record component
      ascendingNode - the value for the ascendingNode record component
      inclination - the value for the inclination record component
      period - the value for the period record component
      extra - the value for the extra record component
  • Method Details

    • x

      public double x()
      Specified by:
      x in interface IParticleRecord
    • y

      public double y()
      Specified by:
      y in interface IParticleRecord
    • z

      public double z()
      Specified by:
      z in interface IParticleRecord
    • getType

      public ParticleType getType()
      Description copied from interface: IParticleRecord
      Returns the particle record type.
      Specified by:
      getType in interface IParticleRecord
      Returns:
      The type.
    • pos

      public Vector3D pos(Vector3D aux)
      Specified by:
      pos in interface IParticleRecord
    • hasProperMotion

      public boolean hasProperMotion()
      Specified by:
      hasProperMotion in interface IParticleRecord
    • vx

      public float vx()
      Specified by:
      vx in interface IParticleRecord
    • vy

      public float vy()
      Specified by:
      vy in interface IParticleRecord
    • vz

      public float vz()
      Specified by:
      vz in interface IParticleRecord
    • names

      public String[] names()
      Specified by:
      names in interface IParticleRecord
    • namesConcat

      public String namesConcat()
      Specified by:
      namesConcat in interface IParticleRecord
    • hasName

      public boolean hasName(String candidate)
      Specified by:
      hasName in interface IParticleRecord
    • hasName

      public boolean hasName(String candidate, boolean matchCase)
      Specified by:
      hasName in interface IParticleRecord
    • distance

      public double distance()
      Distance in internal units. Beware, does the computation on the fly.
      Specified by:
      distance in interface IParticleRecord
      Returns:
      The distance, in internal units
    • ra

      public double ra()
      Declination in degrees. Beware, does the conversion on the fly.
      Specified by:
      ra in interface IParticleRecord
      Returns:
      The declination, in degrees
    • dec

      public double dec()
      Specified by:
      dec in interface IParticleRecord
      Returns:
      The declination, in degrees.
    • setExtraAttributes

      public void setExtraAttributes(com.badlogic.gdx.utils.ObjectMap<UCD,Object> e)
      Specified by:
      setExtraAttributes in interface IParticleRecord
    • hasExtra

      public boolean hasExtra()
      Specified by:
      hasExtra in interface IParticleRecord
    • hasExtra

      public boolean hasExtra(String name)
      Specified by:
      hasExtra in interface IParticleRecord
    • hasExtra

      public boolean hasExtra(UCD ucd)
      Specified by:
      hasExtra in interface IParticleRecord
    • getExtra

      public com.badlogic.gdx.utils.ObjectMap<UCD,Object> getExtra()
      Description copied from interface: IParticleRecord
      Gets the extra attributes map.
      Specified by:
      getExtra in interface IParticleRecord
      Returns:
      The map.
    • getExtra

      public Object getExtra(String name)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given name.
      Specified by:
      getExtra in interface IParticleRecord
      Parameters:
      name - The name of the data filed to get.
      Returns:
      The data field, or null if it does not exist.
    • getExtra

      public Object getExtra(UCD ucd)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given UCD.
      Specified by:
      getExtra in interface IParticleRecord
      Parameters:
      ucd - The UCD of the data filed to get.
      Returns:
      The data field, or null if it does not exist.
    • getExtraNumber

      public double getExtraNumber(String name)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given name, as a double number.
      Specified by:
      getExtraNumber in interface IParticleRecord
      Parameters:
      name - The name of the data filed to get.
      Returns:
      The data field as a double, or NaN if it does not exist or is not a number.
    • getExtraNumber

      public double getExtraNumber(UCD ucd)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given UCD, as a double number.
      Specified by:
      getExtraNumber in interface IParticleRecord
      Parameters:
      ucd - The UCD of the data filed to get.
      Returns:
      The data field as a double, or NaN if it does not exist or is not a number.
    • extraKeys

      public com.badlogic.gdx.utils.ObjectMap.Keys<UCD> extraKeys()
      Specified by:
      extraKeys in interface IParticleRecord
    • appMag

      public float appMag()
      Specified by:
      appMag in interface IParticleRecord
    • absMag

      public float absMag()
      Specified by:
      absMag in interface IParticleRecord
    • hasColor

      public boolean hasColor()
      Specified by:
      hasColor in interface IParticleRecord
    • color

      public float color()
      Specified by:
      color in interface IParticleRecord
    • rgb

      public double[] rgb()
      Specified by:
      rgb in interface IParticleRecord
    • hasSize

      public boolean hasSize()
      Specified by:
      hasSize in interface IParticleRecord
    • size

      public float size()
      Specified by:
      size in interface IParticleRecord
    • radius

      public double radius()
      Specified by:
      radius in interface IParticleRecord
    • id

      public long id()
      Returns the value of the id record component.
      Specified by:
      id in interface IParticleRecord
      Returns:
      the value of the id record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • epoch

      public double epoch()
      Returns the value of the epoch record component.
      Specified by:
      epoch in interface IParticleRecord
      Returns:
      the value of the epoch record component
    • meanAnomaly

      public double meanAnomaly()
      Returns the value of the meanAnomaly record component.
      Specified by:
      meanAnomaly in interface IParticleRecord
      Returns:
      the value of the meanAnomaly record component
    • semiMajorAxis

      public double semiMajorAxis()
      Returns the value of the semiMajorAxis record component.
      Specified by:
      semiMajorAxis in interface IParticleRecord
      Returns:
      the value of the semiMajorAxis record component
    • eccentricity

      public double eccentricity()
      Returns the value of the eccentricity record component.
      Specified by:
      eccentricity in interface IParticleRecord
      Returns:
      the value of the eccentricity record component
    • argOfPericenter

      public double argOfPericenter()
      Returns the value of the argOfPericenter record component.
      Specified by:
      argOfPericenter in interface IParticleRecord
      Returns:
      the value of the argOfPericenter record component
    • ascendingNode

      public double ascendingNode()
      Returns the value of the ascendingNode record component.
      Specified by:
      ascendingNode in interface IParticleRecord
      Returns:
      the value of the ascendingNode record component
    • inclination

      public double inclination()
      Returns the value of the inclination record component.
      Specified by:
      inclination in interface IParticleRecord
      Returns:
      the value of the inclination record component
    • period

      public double period()
      Returns the value of the period record component.
      Specified by:
      period in interface IParticleRecord
      Returns:
      the value of the period record component
    • extra

      public com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra()
      Returns the value of the extra record component.
      Returns:
      the value of the extra record component