|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.geo.GeometricObject
com.hedgehog.geo.threed.GeometricObject3D
com.hedgehog.geo.threed.shapes.Shape3D
com.hedgehog.geo.threed.shapes.Sphere3D
com.hedgehog.planets.AbstractPlanet
public abstract class AbstractPlanet
Title: AbstractPlanet - abstract base class for computing the position of a planet.
Description: Abstract base class of planet classes.
The calculations are based on J Meeus's excellent book "Astro Algos", 2nd ed, Willmann-Bell, 2005 and the tutorial documents by Paul Schlyter (www.stjarnhimlen.se).
AbstractPlanet extends Sphere3D and has subclasses Mercury, Venus, Mars, Jupiter, Saturn, Uranus and Neptune. Planet Earth extends from OblateSpheroid3D since more is known about the exact dimensions of Earth when compared to the other planets.
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software
| Field Summary |
|---|
| Fields inherited from class com.hedgehog.geo.threed.shapes.Sphere3D |
|---|
mCentre, mRadius |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
AbstractPlanet()
Default constructor. |
|
AbstractPlanet(AbstractPlanet object)
Copy constructor. |
|
AbstractPlanet(Point3D centre,
double radius)
Constructor. |
|
| Method Summary | |
|---|---|
static double |
angleBetweenCelestialEclipticPoles(double obliquityEclipticDegrees,
double eclipticLatitudeDegrees,
double eclipticLongitudeDegrees)
The angle between the direction of the northern celestial pole and the direction of the ecliptic of a star. |
static double |
angleBetweenGreatCircleOS1S3AndLineOS2(RightAscensionDeclination radec1,
RightAscensionDeclination radec2,
RightAscensionDeclination radec3)
Returns the angle between the great circle OS1S3 and line OS2. |
static double |
angleBetweenGreatCirclesOS1S3AndOS2S3(RightAscensionDeclination radec1,
RightAscensionDeclination radec2,
RightAscensionDeclination radec3)
Returns the angle between the two great circles OS1S3 and OS2S3. |
static double |
angularSeparationBetweenTwoBodies(HoursMinutesSeconds ra1,
DegreesMinutesSeconds dec1,
HoursMinutesSeconds ra2,
DegreesMinutesSeconds dec2)
Returns the angular separation (in degrees) between the two specified bodies. |
abstract double |
apparentEquatorialDiameter(double radialDistanceAU)
Returns the apparent diameter for the specified radial distance in AUs. |
static PairDouble |
azimuthAltitudeToEquatorial(double azimuth,
double altitude,
double latitude)
Calculates the equatorial coordinates. |
static double |
bodiesInStraightLine(RightAscensionDeclination radec1,
RightAscensionDeclination radec2,
RightAscensionDeclination radec3)
Tests whether or not 3 bodies are in a straight line; ie if they lie on the same great circle of the celestial sphere. |
double |
declination(int dayNumber)
Returns the declination (Dec) at the specified day number in degrees. |
static double |
diurnalAngle(double declinationDegrees,
double latitudeDegrees)
Returns the angle, J, of the diurnal path of a celestial body relative to the horizon at the time of its rising or setting. |
double |
eccentricAnomaly(int dayNumber,
boolean in360Interval)
Returns the eccentric anomaly in degrees, masked to [0:360] using normaliseDegrees(). |
abstract double |
eccentricity(int dayNumber)
Returns the eccentricity. |
static double |
eclipticHorizonAngle(double obliquityEclipticDegrees,
double latitudeDegrees,
HoursMinutesSeconds localSiderealTime)
Returns the angle I in degrees between the ecliptic and the horizon. |
static PairDouble |
eclipticLatLongToEquatorialRADec(double ecl,
double lat,
double lon)
Converts equatorial (lat,lon) coordinates to ecliptic (RA,Dec) coordinates. |
static PairDouble |
eclipticPoints180Apart(double obliquityEclipticDegrees,
double latitudeDegrees,
HoursMinutesSeconds localSiderealTime)
Returns the longitudes of two points of the ecliptic that are 180 degrees apart on the horizon. |
static double |
equationOfTheCentre(double e,
double M,
boolean degrees)
Returns the equation of the centre C, or the difference C=v-M, where v is the true anamoly and M is the mean anomaly. |
static PairDouble |
equatoralRADecToEclipticLatLong(double ecl,
double ra,
double dec)
Converts equatorial (RA,Dec) coordinates to ecliptic (lat,lon) coordinates. |
static PairDouble |
equatorialToAzimuthAltitude(double H,
double lat,
double dec)
Calculates the local horizontal coordinates. |
double |
geocentricDistance(int dayNumber)
Returns the radial distance from the planet to the Earth's centre. |
double |
geocentricTimeDays(int dayNumber)
Returns the time taken (in days) by light to reach Earth from the planet; ie 0.0057755183 * geocentricDistance(). |
LatitudeLongitude |
geoLatitudeLongitude(int dayNumber)
Converts the point returned by geoRectangularCoordinates() to geocentric (lat,lon) coordinates. |
Point3D |
geoRectangularCoordinates(int dayNumber)
Returns the position of a planet wrt geocentric coordinates. |
Point3D |
geoRectangularEclipticCoordinates(int dayNumber)
Converts the rectangular coordinates returned by geoRectangularCoordinates() to rectangular equatorial coordinates by rotating the (x,y,z) onto the yz-plane by the angle of the obliquity of the ecliptic. |
PairDouble |
helioLatLongPerturbations(int dayNumber)
Heliocentric perturbations. |
PairDouble |
helioLatLongPerturbationsJupiter(int dayNumber)
Heliocentric perturbations for Jupiter. |
PairDouble |
helioLatLongPerturbationsSaturn(int dayNumber)
Heliocentric perturbations for Saturn. |
PairDouble |
helioLatLongPerturbationsUranus(int dayNumber)
Heliocentric perturbations for Uranus. |
TripleDouble |
helioLatLongRadius(int dayNumber,
boolean perturbationCorrection)
Returns the heliocentric latitude(degrees), longitude(degrees) and radial distance(AU) of the planet at the specified day number. |
double |
helioRadialDistance(int dayNumber)
Returns the radial distance from the Sun to the planet for the specified day number. |
Point3D |
helioRectangularCoordinates(int dayNumber)
Returns the rectangular coordinates for the planet at the specified day number wrt heliocentric coordinate system. |
Point3D |
helioRectangularCoordinatesInEclipticCoordinates(int dayNumber)
Returns the rectangular coordinates of the planet wrt the heliocentric ecliptic coordinate plane for the specified day number. |
abstract double |
inclination(int dayNumber)
Returns the inclination (ie tilt) of the orbit relative to the ecliptic plane in degrees. |
abstract boolean |
isEarth()
Tests whether or not this planet is Earth. |
abstract boolean |
isJupiter()
Tests whether or not this planet is Jupiter. |
abstract boolean |
isMars()
Tests whether or not this planet is Mars. |
abstract boolean |
isMercury()
Tests whether or not this planet is Mercury. |
abstract boolean |
isNeptune()
Tests whether or not this planet is Neptune. |
abstract boolean |
isSaturn()
Tests whether or not this planet is Saturn. |
abstract boolean |
isUranus()
Tests whether or not this planet is Uranus. |
abstract boolean |
isVenus()
Tests whether or not this planet is Venus. |
static HoursMinutesSeconds |
localHourAngle(HoursMinutesSeconds siderealTimeMean,
double rightAscensionDegrees,
double longitudeDegrees)
Variant of localHourAngle() with the right ascension and longitude specified in degrees. |
static HoursMinutesSeconds |
localHourAngle(HoursMinutesSeconds siderealTimeMean,
HoursMinutesSeconds rightAscension,
HoursMinutesSeconds longitude)
Returns the local hour angle (H=theta-lon-ra) for the specified sidereal mean time (theta), right ascension (ra) and longitude (lon). |
abstract double |
longitudeOfAscendingNode(int dayNumber)
Returns the longitude of ascending node for the specified day number in degrees. |
abstract double |
longitudeOfPerihelion(int dayNumber)
Returns the longitude of perihelion in degrees. |
abstract double |
meanAnomaly(int dayNumber)
Returns the mean anomaly in degrees. |
abstract double |
meanDistanceToEarth(int dayNumber,
boolean au)
Returns the mean distance/semi-major-axis to Earth in aus or actual distance in metres. |
static double |
parallacticAngle(double latitudeDegrees,
double decDegrees,
double hourAngleDegrees)
Returns the parallactic angle (q), which is the angle between celestial north of a planet and zenith. |
static double |
radiusVector(double e,
double M,
double a,
boolean degrees)
Returns the radius vector centred at a foci for a given planet in terms of the specified eccentricity e and mean anomaly M. |
double |
rightAscension(int dayNumber)
Returns the Right Ascension (RA) at the specified day number in degrees. |
static HoursMinutesSeconds |
rightAscensionDegreesToTime(double raDegrees)
Converts the right ascension in degrees to time by dividing by 15; ie 360/24. |
static double |
rightAscensionTimeToDegrees(HoursMinutesSeconds raHMS)
Converts right ascension in terms of time to degrees. |
static TripleDouble |
riseTransitSetUT(HoursMinutesSeconds siderealTime,
HoursMinutesSeconds raDMinus1,
HoursMinutesSeconds raD,
HoursMinutesSeconds raDPlus1,
DegreesMinutesSeconds decDMinus1,
DegreesMinutesSeconds decD,
DegreesMinutesSeconds decDPlus1,
LatitudeLongitude observer,
double altitudeDegrees,
boolean approximate)
Computes the |
static double |
smallestCircleDiameter(HoursMinutesSeconds ra1,
DegreesMinutesSeconds dec1,
HoursMinutesSeconds ra2,
DegreesMinutesSeconds dec2,
HoursMinutesSeconds ra3,
DegreesMinutesSeconds dec3,
HInteger type)
Returns the diameter (in degrees) of te smallest enclosing circle of the 3 specified bodies. |
double |
trueAnomaly(int dayNumber,
boolean in360Interval)
Returns the true anomaly in degrees. |
static double |
velocityAtAphelion(double e,
double a)
Returns the velocity (km/s) at aphelion of a moving body in an unperturbed elliptic orbit. |
static double |
velocityAtPerihelion(double e,
double a)
Returns the velocity (km/s) at perihelion of a moving body in an unperturbed elliptic orbit. |
static double |
velocityInEllipticOrbit(double r,
double a)
Returns the velocity (km/s) of a moving body in an unperturbed elliptic orbit. |
| Methods inherited from class com.hedgehog.geo.threed.shapes.Shape3D |
|---|
is2D, is3D, isCurve, isGrid, isMesh, isPoint, isPointSet, isShape, isSurface |
| Methods inherited from class com.hedgehog.geo.GeometricObject |
|---|
objectDimension |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPlanet()
public AbstractPlanet(Point3D centre,
double radius)
centre - Planet centre.radius - Planet radius.public AbstractPlanet(AbstractPlanet object)
object - Object to copy.| Method Detail |
|---|
public double eccentricAnomaly(int dayNumber,
boolean in360Interval)
dayNumber - The day number.in360Interval - Specifies whether or not the returned angle is to be masked to the [0:360] range.
public Point3D helioRectangularCoordinates(int dayNumber)
dayNumber - The day number.
public double helioRadialDistance(int dayNumber)
dayNumber - The day number.
public double trueAnomaly(int dayNumber,
boolean in360Interval)
dayNumber - The day number.in360Interval - Specifies whether or not the returned angle is to be masked to the [0:360] interval.
public Point3D helioRectangularCoordinatesInEclipticCoordinates(int dayNumber)
dayNumber - The day number.
public TripleDouble helioLatLongRadius(int dayNumber,
boolean perturbationCorrection)
dayNumber - The day number.perturbationCorrection - Specifies whether or not perturbations are to be appended to
the calculated {latitude,longitude,radius} triple.
public PairDouble helioLatLongPerturbations(int dayNumber)
dayNumber - The day number.
public PairDouble helioLatLongPerturbationsJupiter(int dayNumber)
dayNumber - The day number.
public PairDouble helioLatLongPerturbationsSaturn(int dayNumber)
dayNumber - The day number.
public PairDouble helioLatLongPerturbationsUranus(int dayNumber)
dayNumber - The day number.
public Point3D geoRectangularCoordinates(int dayNumber)
dayNumber - The day number.
public Point3D geoRectangularEclipticCoordinates(int dayNumber)
dayNumber - The day number.
public LatitudeLongitude geoLatitudeLongitude(int dayNumber)
dayNumber - The day number.
public double rightAscension(int dayNumber)
dayNumber - The day number.
public double declination(int dayNumber)
dayNumber - The day number.
public double geocentricDistance(int dayNumber)
dayNumber - The day number.
public double geocentricTimeDays(int dayNumber)
dayNumber - The day number.
public static PairDouble equatoralRADecToEclipticLatLong(double ecl,
double ra,
double dec)
ecl - The obliquity of ecliptic angle in degrees; ie for Earth 23.4393 - 3.563e-07*dayNumber.ra - Right Ascension in degrees.dec - Declination in degrees
eclipticLatLongToEquatorialRADec(double, double, double)
public static PairDouble eclipticLatLongToEquatorialRADec(double ecl,
double lat,
double lon)
ecl - The obliquity of ecliptic angle in degrees; ie for Earth 23.4393 - 3.563e-07*dayNumber.lat - Latitude in degrees.lon - Longitude in dgerees.
equatoralRADecToEclipticLatLong(double, double, double)
public static PairDouble equatorialToAzimuthAltitude(double H,
double lat,
double dec)
H - Local hour angle in degrees.lat - Latitude in degrees.dec - Declination in degrees.
azimuthAltitudeToEquatorial(double, double, double)
public static PairDouble azimuthAltitudeToEquatorial(double azimuth,
double altitude,
double latitude)
azimuth - Azimuth in degrees.altitude - Altitude in degrees.latitude - Latitude in degrees.
equatorialToAzimuthAltitude(double, double, double)
public static HoursMinutesSeconds localHourAngle(HoursMinutesSeconds siderealTimeMean,
HoursMinutesSeconds rightAscension,
HoursMinutesSeconds longitude)
siderealTimeMean - Sidereal mean time.rightAscension - Right ascension.longitude - Longitude.
public static HoursMinutesSeconds localHourAngle(HoursMinutesSeconds siderealTimeMean,
double rightAscensionDegrees,
double longitudeDegrees)
siderealTimeMean - Sidereal mean time.rightAscensionDegrees - Right ascension in degrees.longitudeDegrees - Longitude in degrees.
public static HoursMinutesSeconds rightAscensionDegreesToTime(double raDegrees)
raDegrees - Right ascension in degrees.
rightAscensionTimeToDegrees(com.hedgehog.date_time.HoursMinutesSeconds)public static double rightAscensionTimeToDegrees(HoursMinutesSeconds raHMS)
raHMS - Right ascension in time.
rightAscensionDegreesToTime(double)
public static double parallacticAngle(double latitudeDegrees,
double decDegrees,
double hourAngleDegrees)
throws java.lang.IllegalArgumentException
latitudeDegrees - decDegrees - hourAngleDegrees -
java.lang.IllegalArgumentException - Thrown if the specified triple (lat,dec,h) do not define q, ie the celestial body
is exactly in the zenith.
public static PairDouble eclipticPoints180Apart(double obliquityEclipticDegrees,
double latitudeDegrees,
HoursMinutesSeconds localSiderealTime)
obliquityEclipticDegrees - Obliquity of the ecliptic, epsilon, in degrees.latitudeDegrees - Observer latitude in degrees.localSiderealTime - Local sidereal time in (h,m,s).
public static double eclipticHorizonAngle(double obliquityEclipticDegrees,
double latitudeDegrees,
HoursMinutesSeconds localSiderealTime)
obliquityEclipticDegrees - Obliquity of the ecliptic, epsilon, in degrees.latitudeDegrees - Observer latitude in degrees.localSiderealTime - Local sidereal time in (h,m,s).
public static double angleBetweenCelestialEclipticPoles(double obliquityEclipticDegrees,
double eclipticLatitudeDegrees,
double eclipticLongitudeDegrees)
obliquityEclipticDegrees - Obliquity of the ecliptic, epsilon, in degrees.eclipticLatitudeDegrees - Ecliptical latitude in degrees.eclipticLongitudeDegrees - Ecliptical longitude in degrees.
public static double diurnalAngle(double declinationDegrees,
double latitudeDegrees)
declinationDegrees - Declination in degrees.latitudeDegrees - Oberserver latitude in degrees.
public static TripleDouble riseTransitSetUT(HoursMinutesSeconds siderealTime,
HoursMinutesSeconds raDMinus1,
HoursMinutesSeconds raD,
HoursMinutesSeconds raDPlus1,
DegreesMinutesSeconds decDMinus1,
DegreesMinutesSeconds decD,
DegreesMinutesSeconds decDPlus1,
LatitudeLongitude observer,
double altitudeDegrees,
boolean approximate)
throws java.lang.IllegalArgumentException
siderealTime - Sidereal time.raDMinus1 - Right ascension before the key day.raD - Right ascension before on the key day.raDPlus1 - Right ascension after the key day.decDMinus1 - Declination before the key day.decD - Declination on the key day.decDPlus1 - Declination after the key day.observer - Observer's latitude and longitude.altitudeDegrees - The required altitude of the star/planet/sun; eg RiseSetAltitudes.STAR_PLANET_ALTITUDE.approximate - Specifies whether an approximate (true) or more exact (false) is returned.
java.lang.IllegalArgumentException - Thrown if the specified comibation of arguments means that the celestial body is either below or above
the horizon throuhgout the entire day.
public static double angularSeparationBetweenTwoBodies(HoursMinutesSeconds ra1,
DegreesMinutesSeconds dec1,
HoursMinutesSeconds ra2,
DegreesMinutesSeconds dec2)
ra1 - Right ascension of body 1.dec1 - Declination of body 1.ra2 - Right ascension of body 2.dec2 - Declination of body 2.
Earth.distanceBetweenTwoPointsAlongSurface(com.hedgehog.utility.LatitudeLongitude, com.hedgehog.utility.LatitudeLongitude, int)
public static double bodiesInStraightLine(RightAscensionDeclination radec1,
RightAscensionDeclination radec2,
RightAscensionDeclination radec3)
radec1 - Right ascension - declination of body 1.radec2 - Right ascension - declination of body 2.radec3 - Right ascension - declination of body 3.
public static double angleBetweenGreatCirclesOS1S3AndOS2S3(RightAscensionDeclination radec1,
RightAscensionDeclination radec2,
RightAscensionDeclination radec3)
throws java.lang.IllegalArgumentException
radec1 - Right ascension - declination of body 1.radec2 - Right ascension - declination of body 2.radec3 - Right ascension - declination of body 3.
java.lang.IllegalArgumentException - Thrown if any of the declinations of the 3 arguments are outside the range [-90:90] degrees.
public static double angleBetweenGreatCircleOS1S3AndLineOS2(RightAscensionDeclination radec1,
RightAscensionDeclination radec2,
RightAscensionDeclination radec3)
throws java.lang.IllegalArgumentException
radec1 - Right ascension - declination of body 1.radec2 - Right ascension - declination of body 2.radec3 - Right ascension - declination of body 3.
java.lang.IllegalArgumentException - Thrown if any of the declinations of the 3 arguments are outside the range [-90:90] degrees.
public static double smallestCircleDiameter(HoursMinutesSeconds ra1,
DegreesMinutesSeconds dec1,
HoursMinutesSeconds ra2,
DegreesMinutesSeconds dec2,
HoursMinutesSeconds ra3,
DegreesMinutesSeconds dec3,
HInteger type)
throws java.lang.IllegalArgumentException
ra1 - Right ascension of body 1.dec1 - Declination of body 1.ra2 - Right ascension of body 2.dec2 - Declination of body 2.ra3 - Right ascension of body 3.dec3 - Declination of body 3.type - Set upon return to the type of enclosing circle: 1(longest triangle side equal to the diameter) or 2(circle passing through through 3 points)
java.lang.IllegalArgumentException
public static double equationOfTheCentre(double e,
double M,
boolean degrees)
e - Eccentricity.M - Mean anomaly.degrees - Specifies whether or not M is in degrees or radians.
public static double radiusVector(double e,
double M,
double a,
boolean degrees)
e - Eccentricity.M - Mean anomaly.a - Semi-major orbit axis of the planet.degrees - Specifies whether or not M is in degrees or radians.
public static double velocityInEllipticOrbit(double r,
double a)
r - Distance of body to Sun. In Au units.a - Semi-major axais of the body orbit. In AU units.
public static double velocityAtPerihelion(double e,
double a)
e - Oribital eccentricity.a - Semi-major axais of the body orbit. In AU units.
public static double velocityAtAphelion(double e,
double a)
e - Oribital eccentricity.a - Semi-major axais of the body orbit. In AU units.
public abstract double eccentricity(int dayNumber)
dayNumber - The day number.
public abstract double inclination(int dayNumber)
dayNumber - The day number.
public abstract double longitudeOfAscendingNode(int dayNumber)
dayNumber - The day number.
public abstract double longitudeOfPerihelion(int dayNumber)
dayNumber - The day number.
public abstract double meanAnomaly(int dayNumber)
dayNumber - The day number.
public abstract double meanDistanceToEarth(int dayNumber,
boolean au)
dayNumber - The day number.au - Specifies whether the returned distance is in AUs or actual distance in metres.
public abstract double apparentEquatorialDiameter(double radialDistanceAU)
throws java.lang.IllegalArgumentException
radialDistanceAU - Radial distance in AUs.
java.lang.IllegalArgumentException - Thrown if radialDistanceAU<=0.public abstract boolean isMercury()
public abstract boolean isVenus()
public abstract boolean isEarth()
public abstract boolean isMars()
public abstract boolean isJupiter()
public abstract boolean isSaturn()
public abstract boolean isUranus()
public abstract boolean isNeptune()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||