com.mhuss.AstroLib
Class PlanetData
- java.lang.Object
-
- com.mhuss.AstroLib.PlanetData
-
public class PlanetData extends java.lang.ObjectThis class handles planetary motion calculations and conversions.
-
-
Field Summary
Fields Modifier and Type Field and Description static doubleAU
-
Constructor Summary
Constructors Constructor and Description PlanetData()Default constructor.PlanetData(int planet, double jd, double deltaT, ObsInfo oi)Explicit (all parameters) constructor.PlanetData(int planet, double jd, ObsInfo oi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcalc(int planet, double jd, double deltaT, ObsInfo oi)Calculate the data for a given planet, julian day, and location.voidcalc(int planet, double jd, double deltaT, ObsInfo oi, boolean topoc_Corr, boolean lightT_Corr)Calculate the data for a given planet, julian day, and location.voidcalc(int planet, double jd, ObsInfo oi)doublecalcLon(int planet, double jd, ObsInfo oi)This calculates all LocationElements, then returns the longitude.doublegetAltAzLat()Get the Alt-Az latitude.doublegetAltAzLon()Get the Alt-Az longitude.doublegetAltAzRadius()Get the Alt-Az radius.doublegetDeclination()Get the declination in radians.doublegetEclipticLat()Get the ecliptic latitude.doublegetEclipticLon()Get the ecliptic longitude.doublegetEclipticRadius()Get the ecliptic radius.LocationElementsgetEclipticXYZ()Get the geocentric ecliptic cartesian Coords x, y, z.doublegetEquatorialLat()Get the equatorial latitude (y).doublegetEquatorialLon()Get the equatorial longitude (x).doublegetEquatorialRadius()Get the equatorial radius (z).doublegetPolarLat()Get the polar latitude.doublegetPolarLon()Get the polar longitude.doublegetPolarRadius()Get the polar radius.doublegetRightAscension()Get the right ascension in radians.doublegetSolarLat()Get the Solar ecliptic latitude in radians (Geocentric ecliptical coordinates of the Sun, usually close to zero)doublegetSolarLon()Get the geocentric ecliptic longitude of the Sun in radiansdoublegetSolarRadius()Get the solar radius of the Earth.doublehourAngle()Get the hour angle.doublejd()Get the Julian day number.intplanet()Get the Planets number.
-
-
-
Field Detail
-
AU
public static final double AU
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PlanetData
public PlanetData()
Default constructor.
-
PlanetData
public PlanetData(int planet, double jd, double deltaT, ObsInfo oi)Explicit (all parameters) constructor.- Parameters:
planet- Planet number (from Planets class)jd- Julian day numberoi- Observer location
-
PlanetData
public PlanetData(int planet, double jd, ObsInfo oi)
-
-
Method Detail
-
calcLon
public double calcLon(int planet, double jd, ObsInfo oi)This calculates all LocationElements, then returns the longitude.
Longitude is split out because it gets used most often.- Parameters:
planet- Planet number (from Planets class)jd- Julian day numberoi- Observer location
-
calc
public void calc(int planet, double jd, double deltaT, ObsInfo oi)Calculate the data for a given planet, julian day, and location.
This function must be called (directly or via constructor) before calling any of the other functions in this class.- Parameters:
planet- Planet number (from Planets class)jd- Julian day numberoi- Observer location
-
calc
public void calc(int planet, double jd, ObsInfo oi)
-
calc
public void calc(int planet, double jd, double deltaT, ObsInfo oi, boolean topoc_Corr, boolean lightT_Corr)Calculate the data for a given planet, julian day, and location.
This function must be called (directly or via constructor) before calling any of the other functions in this class.- Parameters:
planet- Planet number (from Planets class)jd- Julian day number (tdt)deltaT- (in Days)oi- Observer locationtopoc_Corr- correct topocentriclightT_Corr- correct light time
-
planet
public int planet()
Get the Planets number. Example: Planets.MERCURY
-
jd
public double jd() throws NoInitExceptionGet the Julian day number.- Throws:
NoInitException
-
hourAngle
public double hourAngle() throws NoInitExceptionGet the hour angle.- Throws:
NoInitException
-
getPolarLat
public double getPolarLat() throws NoInitExceptionGet the polar latitude. (Heliocentric polar coordinates)- Throws:
NoInitException
-
getPolarLon
public double getPolarLon() throws NoInitExceptionGet the polar longitude. (Heliocentric polar coordinates)- Throws:
NoInitException
-
getPolarRadius
public double getPolarRadius() throws NoInitExceptionGet the polar radius. (Distance to sun)- Throws:
NoInitException
-
getSolarLat
public double getSolarLat() throws NoInitExceptionGet the Solar ecliptic latitude in radians (Geocentric ecliptical coordinates of the Sun, usually close to zero)- Throws:
NoInitException
-
getSolarLon
public double getSolarLon() throws NoInitExceptionGet the geocentric ecliptic longitude of the Sun in radians- Throws:
NoInitException
-
getSolarRadius
public double getSolarRadius() throws NoInitExceptionGet the solar radius of the Earth. (Distance Earth to Sun)- Throws:
NoInitException
-
getEclipticXYZ
public LocationElements getEclipticXYZ() throws NoInitException
Get the geocentric ecliptic cartesian Coords x, y, z. Add. by Strickling- Throws:
NoInitException
-
getEclipticLat
public double getEclipticLat() throws NoInitExceptionGet the ecliptic latitude. Mod. by Strickling, geocentric polar coordinates- Throws:
NoInitException
-
getEclipticLon
public double getEclipticLon() throws NoInitExceptionGet the ecliptic longitude. Mod. by Strickling, geocentric polar coordinates in radians- Throws:
NoInitException
-
getEclipticRadius
public double getEclipticRadius() throws NoInitExceptionGet the ecliptic radius. Mod. by Strickling, Distance to Earth- Throws:
NoInitException
-
getEquatorialLat
public double getEquatorialLat() throws NoInitExceptionGet the equatorial latitude (y). Cartesian Coord-System- Throws:
NoInitException
-
getEquatorialLon
public double getEquatorialLon() throws NoInitExceptionGet the equatorial longitude (x). Cartesian Coord-System- Throws:
NoInitException
-
getEquatorialRadius
public double getEquatorialRadius() throws NoInitExceptionGet the equatorial radius (z). Cartesian Coord-System- Throws:
NoInitException
-
getAltAzLat
public double getAltAzLat() throws NoInitExceptionGet the Alt-Az latitude. (Converted into polar coordinates)- Throws:
NoInitException
-
getAltAzLon
public double getAltAzLon() throws NoInitExceptionGet the Alt-Az longitude. Radians, south is 0 deg (Converted into polar coordinates)- Throws:
NoInitException
-
getAltAzRadius
public double getAltAzRadius() throws NoInitExceptionGet the Alt-Az radius. (Converted into polar coordinates)- Throws:
NoInitException
-
getRightAscension
public double getRightAscension() throws NoInitExceptionGet the right ascension in radians.- Throws:
NoInitException
-
getDeclination
public double getDeclination() throws NoInitExceptionGet the declination in radians.- Throws:
NoInitException
-
-
DMelt 3.0 © DataMelt by jWork.ORG