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.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionParticleKepler(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 aParticleKeplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatabsMag()floatappMag()doubleReturns the value of theargOfPericenterrecord component.doubleReturns the value of theascendingNoderecord component.floatcolor()doubledec()doubledistance()Distance in internal units.doubleReturns the value of theeccentricityrecord component.doubleepoch()Returns the value of theepochrecord component.final booleanIndicates whether some other object is "equal to" this one.extra()Returns the value of theextrarecord component.com.badlogic.gdx.utils.ObjectMap.Keys<UCD> getExtra()Gets the extra attributes map.Gets the extra data filed with the given UCD.Gets the extra data filed with the given name.doublegetExtraNumber(UCD ucd) Gets the extra data filed with the given UCD, as a double number.doublegetExtraNumber(String name) Gets the extra data filed with the given name, as a double number.getType()Returns the particle record type.booleanhasColor()booleanhasExtra()booleanbooleanfinal inthashCode()Returns a hash code value for this object.booleanbooleanbooleanbooleanhasSize()longid()Returns the value of theidrecord component.doubleReturns the value of theinclinationrecord component.doubleReturns the value of themeanAnomalyrecord component.name()Returns the value of thenamerecord component.String[]names()doubleperiod()Returns the value of theperiodrecord component.doublera()Declination in degrees.doubleradius()double[]rgb()doubleReturns the value of thesemiMajorAxisrecord component.voidsetExtraAttributes(com.badlogic.gdx.utils.ObjectMap<UCD, Object> e) floatsize()final StringtoString()Returns a string representation of this record class.floatvx()floatvy()floatvz()doublex()doubley()doublez()Methods inherited from interface IParticleRecord
b, beta, hip, isVariable, l, lambda, muAlpha, muDelta, nVari, parallax, radVel, tEff, variMags, variTimesModifier and TypeMethodDescriptiondefault doubleb()default doublebeta()default inthip()default booleanReturns whether this particle record has aVariableattached, making it a variable star.default doublel()default doublelambda()default floatmuAlpha()default floatmuDelta()default intnVari()default doubleparallax()default floatradVel()default floattEff()default float[]variMags()default double[]
-
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 aParticleKeplerrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentepoch- the value for theepochrecord componentmeanAnomaly- the value for themeanAnomalyrecord componentsemiMajorAxis- the value for thesemiMajorAxisrecord componenteccentricity- the value for theeccentricityrecord componentargOfPericenter- the value for theargOfPericenterrecord componentascendingNode- the value for theascendingNoderecord componentinclination- the value for theinclinationrecord componentperiod- the value for theperiodrecord componentextra- the value for theextrarecord component
-
-
Method Details
-
x
public double x()- Specified by:
xin interfaceIParticleRecord
-
y
public double y()- Specified by:
yin interfaceIParticleRecord
-
z
public double z()- Specified by:
zin interfaceIParticleRecord
-
getType
Description copied from interface:IParticleRecordReturns the particle record type.- Specified by:
getTypein interfaceIParticleRecord- Returns:
- The type.
-
pos
- Specified by:
posin interfaceIParticleRecord
-
hasProperMotion
public boolean hasProperMotion()- Specified by:
hasProperMotionin interfaceIParticleRecord
-
vx
public float vx()- Specified by:
vxin interfaceIParticleRecord
-
vy
public float vy()- Specified by:
vyin interfaceIParticleRecord
-
vz
public float vz()- Specified by:
vzin interfaceIParticleRecord
-
names
- Specified by:
namesin interfaceIParticleRecord
-
namesConcat
- Specified by:
namesConcatin interfaceIParticleRecord
-
hasName
- Specified by:
hasNamein interfaceIParticleRecord
-
hasName
- Specified by:
hasNamein interfaceIParticleRecord
-
distance
public double distance()Distance in internal units. Beware, does the computation on the fly.- Specified by:
distancein interfaceIParticleRecord- Returns:
- The distance, in internal units
-
ra
public double ra()Declination in degrees. Beware, does the conversion on the fly.- Specified by:
rain interfaceIParticleRecord- Returns:
- The declination, in degrees
-
dec
public double dec()- Specified by:
decin interfaceIParticleRecord- Returns:
- The declination, in degrees.
-
setExtraAttributes
- Specified by:
setExtraAttributesin interfaceIParticleRecord
-
hasExtra
public boolean hasExtra()- Specified by:
hasExtrain interfaceIParticleRecord
-
hasExtra
- Specified by:
hasExtrain interfaceIParticleRecord
-
hasExtra
- Specified by:
hasExtrain interfaceIParticleRecord
-
getExtra
Description copied from interface:IParticleRecordGets the extra attributes map.- Specified by:
getExtrain interfaceIParticleRecord- Returns:
- The map.
-
getExtra
Description copied from interface:IParticleRecordGets the extra data filed with the given name.- Specified by:
getExtrain interfaceIParticleRecord- Parameters:
name- The name of the data filed to get.- Returns:
- The data field, or null if it does not exist.
-
getExtra
Description copied from interface:IParticleRecordGets the extra data filed with the given UCD.- Specified by:
getExtrain interfaceIParticleRecord- Parameters:
ucd- The UCD of the data filed to get.- Returns:
- The data field, or null if it does not exist.
-
getExtraNumber
Description copied from interface:IParticleRecordGets the extra data filed with the given name, as a double number.- Specified by:
getExtraNumberin interfaceIParticleRecord- 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
Description copied from interface:IParticleRecordGets the extra data filed with the given UCD, as a double number.- Specified by:
getExtraNumberin interfaceIParticleRecord- 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
- Specified by:
extraKeysin interfaceIParticleRecord
-
appMag
public float appMag()- Specified by:
appMagin interfaceIParticleRecord
-
absMag
public float absMag()- Specified by:
absMagin interfaceIParticleRecord
-
hasColor
public boolean hasColor()- Specified by:
hasColorin interfaceIParticleRecord
-
color
public float color()- Specified by:
colorin interfaceIParticleRecord
-
rgb
public double[] rgb()- Specified by:
rgbin interfaceIParticleRecord
-
hasSize
public boolean hasSize()- Specified by:
hasSizein interfaceIParticleRecord
-
size
public float size()- Specified by:
sizein interfaceIParticleRecord
-
radius
public double radius()- Specified by:
radiusin interfaceIParticleRecord
-
id
public long id()Returns the value of theidrecord component.- Specified by:
idin interfaceIParticleRecord- Returns:
- the value of the
idrecord component
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
-
epoch
public double epoch()Returns the value of theepochrecord component.- Specified by:
epochin interfaceIParticleRecord- Returns:
- the value of the
epochrecord component
-
meanAnomaly
public double meanAnomaly()Returns the value of themeanAnomalyrecord component.- Specified by:
meanAnomalyin interfaceIParticleRecord- Returns:
- the value of the
meanAnomalyrecord component
-
semiMajorAxis
public double semiMajorAxis()Returns the value of thesemiMajorAxisrecord component.- Specified by:
semiMajorAxisin interfaceIParticleRecord- Returns:
- the value of the
semiMajorAxisrecord component
-
eccentricity
public double eccentricity()Returns the value of theeccentricityrecord component.- Specified by:
eccentricityin interfaceIParticleRecord- Returns:
- the value of the
eccentricityrecord component
-
argOfPericenter
public double argOfPericenter()Returns the value of theargOfPericenterrecord component.- Specified by:
argOfPericenterin interfaceIParticleRecord- Returns:
- the value of the
argOfPericenterrecord component
-
ascendingNode
public double ascendingNode()Returns the value of theascendingNoderecord component.- Specified by:
ascendingNodein interfaceIParticleRecord- Returns:
- the value of the
ascendingNoderecord component
-
inclination
public double inclination()Returns the value of theinclinationrecord component.- Specified by:
inclinationin interfaceIParticleRecord- Returns:
- the value of the
inclinationrecord component
-
period
public double period()Returns the value of theperiodrecord component.- Specified by:
periodin interfaceIParticleRecord- Returns:
- the value of the
periodrecord component
-
extra
-