以純文字方式查看主題
- 緣生術數研究社 (http://leold.yuensang.com/cgi-bin/leobbs.cgi) |
-- 作者: 鳳翼
From: http://hubble.lamost.org/cpp.htm Break out of a frame
No programs are given, because different computers and calculators are programmed in different languages. It is easier to convert formulae to your favourite language than to translate a program from one programming language to another. Therefore formulae are presented instead. Each formula is accompanied with one numeric example - this will enable you to check your implementation of these formulae. Just remember that all numerical quantities contain rounding errors, therefore you may get slightly different results in your program compared to the numerical results presented here. When I checked these numerical values I used a HP-48SX pocket calculator, which uses 12 digits of accuracy.
The perihelion and aphelion are the points in the orbit when the planet is closest to and most distant from the Sun. A parabolic orbit only has a perihemium of course. The perigee and apogee are points in the Moon's orbit (or the orbit of an artificial Earth satellite) which are closest to and most distant from the Earth. The celestial sphere is an imaginary sphere around the observer, at an arbitrary distance. The celestial equator is the Earth's equatorial plane projected on the celestial sphere. The ecliptic is the plane of the Earth's orbit. This is also the plane of the Sun's yearly apparent motion. The ecliptic is inclined by approximately 23.4_deg to the celestial equator. The ecliptic intersects the celestial equator at two points: The Vernal Point (or "the first point of Aries"), and the Autumnal Point. The Vernal Point is the point of origin for two different commonly used celestial coordinates: equatorial coordinates and ecliptic coordinates. Right Ascension and Declination are equatorial coordinates using the celestial equator as a fundamental plane. At the Vernal Point both the Right Ascension and the Declination are zero. The Right Ascension is usually measured in hours and minutes, where one revolution is 24 hours (which means 1 hour equals 15 degrees). It's counted countersunwise along the celestial equator. The Declination goes from +90 to -90 degrees, and it's positive north of, and negative south of, the celestial equator. Longitude and Latitude are ecliptic coordinates, which use the ecliptic as a fundamental plane. Both are measured in degrees, and these coorinates too are both zero at the Vernal Point. The Longitude is counted countersunwise along the ecliptic. The Latitude is positive north of the ecliptic. Of course longitude and latitude are also used as terrestial coordinates, to measure a position of a point on the surface of the Earth. Heliocentric, Geocentric, Topocentric. A position relative to the Sun is heliocentric. If the position is relative to the center of the Earth, then it's geocentric. A topocentric position is relative to an observer on the surface of the Earth. Within the aim of our accuracy of 1-2 arc minutes, the difference between geocentric and topocentric position is negligible for all celestial bodies except the Moon (and some occasional asteroid which happens to pass very close to the Earth). The orbital elements consist of 6 quantities which completely define a circular, elliptic, parabolic or hyperbolic orbit. Three of these quantities describe the shape and size of the orbit, and the position of the planet in the orbit:
A cirular orbit has zero eccentricity. An elliptical orbit has an eccentricity between zero and one. A parabolic orbit has an eccentricity of exactly one. Finally, a hyperbolic orbit has an eccentricity larger than one. A parabolic orbit has an infinite semi-major axis, a, therefore one instead gives the perihelion distance, q, for a parabolic orbit:
It is customary to give q instead of a also for hyperbolic orbit, and for elliptical orbits with eccentricity close to one. The three remaining orbital elements define the orientation of the orbit in space:
N (usually written as "Capital Omega") Longitude of Ascending w (usually written as "small Omega") The angle from the Ascending These are the primary orbital elements. From these many secondary orbital elements can be computed:
Q Aphelion distance = a * (1 + e) P Orbital period = 365.256898326 * a**1.5/sqrt(1+m) days, n Daily motion = 360_deg / P degrees/day t Some epoch as a day count, e.g. Julian Day Number. The Time t - T Time since Perihelion, usually in days M Mean Anomaly = n * (t - T) = (t - T) * 360_deg / P L Mean Longitude = M + w + N E Eccentric anomaly, defined by Kepler's equation: M = E - e * sin(E) v True anomaly: the angle from perihelion to the planet, as seen r Heliocentric distance: the planet's distance from the Sun. This relation is valid for an elliptic orbit:
x,y,z Rectangular coordinates. Used e.g. when a heliocentric 2. Some useful functions On microcomputers the situation is worse. Let's start with the programming language Basic: there we can count on having sin/cos/tan and atn (=arctan) in radians, but nothing more. arcsin and arccos are missing, and the trig functions don't work in degrees. However one can add one's own function library, like e.g. this:
115 rem arcsin and arccos 135 rem Trig. functions in degrees 195 rem arctan in all four quadrants 215 rem Normalize an angle between 0 and 360 degrees 225 rem Cube Root (needed for parabolic orbits) The code above follows the convensions of traditional Microsoft Basic (MBASIC/BASICA/GWBASIC). If you use some other Basic dialect, you may want to modify this code. The code above gives you sin/cos/tan and their inverses, in radians and degrees. The functions fnatan2() and fnatan2d() may need some explanation: they take two arguments, x and y, and they compute arctan(y/x) but puts the angle in the correct quadrant from -180 to +180 degrees. This is really part of a conversion from rectangular to polar coordinates, where the angle is computed. The distance is then computed by:
The function fnrev# normalizes an angle to between 0 and 360 degrees, by adding or subtracting even mutiples of 360 degrees until the final value falls between 0 and 360. The # sign means that the function and its argument use double precision. It is essential that this function uses more than single precision. More about this later. One warning: some of these functions may divide by zero. If one tries to compute fnasin(1.0), it's computed as: atn(1/sqrt(1-1.0*1.0)) = atn(1/sqr(0)) = atn(1/0). This is not such a big problem, since in practice one rarely tries to compute the arc sine of exactly 1.0. Also, some dialects of Microsoft Basic then just print the warning message "Overflow", compute 1/0 as the highest possible floating-point number, and then continue the program. When computing the arctan of this very large number, one will get pi/2 (or 90 degrees), which is the correct result. However, if you have access to a more modern, structured, Basic, with the ability to define multi-line function, then by all means use this to write a better version of arcsin, which treats arcsin(1.0) as a special case. There's a similar problem with the fncbrt() function - it only works for positive values. With a multi-line function definition it can be rewritten to work for negative values and zero as well, if one follows these simple rules: the Cube Root of zero is of course zero. The Cube Root of a negative number is computed by making the number positive, taking the Cube Root of that positive number, and then negating the result. Two other popular programming language are C and C++. The standard library of these languages are better equipped with trigonometric functions. You'll find sin/cos/tan and their inverses, and even an atan2() function among the standard functions. All you need to do is to define some macros to get the trig functions in degrees (include all parentheses in these macro definitions), and to define a rev() function which reduces an angle to between 0 and 360 degrees, and a cbrt() function which computes the cube root.
In C++ the macros could preferably be defined as inline functions instead - this enables better type checking and also makes overloading of these function names possible. The good ol' programming langauge FORTRAN is also well equipped with standard library trig functions: we find sin/cos/tan + inverses, and also an atan2 but only for radians. Therefore we need several function definitions to get the trig functions in degrees too. Below I give code only for SIND, ATAND, ATAN2D, plus REV and CBRT. The remaining functions COSD, TAND, ASIND and ACOSD are written in a similar way:
FUNCTION ATAND(X) FUNCTION ATAN2D(Y,X) FUNCTION REV(X) FUNCTION CBRT(X) The programming language Pascal is not as well equipped with trig functions. We have sin, cos, tan and arctan but nothing more. Therefore we need to write our own arcsin, arccos and arctan2, plus all the trig functions in degrees, and also the functions rev and cbrt. The trig functions in degrees are trivial when the others are defined, therefore I only define arcsin, arccos, arctan2, rev and cbrt:
function arcsin( x : real ) : real; function arccos( x : real ) : real; function arctan2( y, x : real ) : real; function rev( x : real ) : real; function cbrt( x : real ) : real; It's well worth the effort to ensure that all these functions are available. Then you don't need to worry about these details which really don't have much to do with the problem of computing a planetary position.
Suppose a planet is situated at some RA, Decl and r, where RA is the Right Ascension, Decl the declination, and r the distance in some length unit. If r is unknown or irrelevant, set r = 1. Let's convert this to rectangular coordinates, x,y,z:
(before we compute the sine/cosine of RA, we must first convert RA from hours/minutes/seconds to hours + decimals. Then the hours are converted to degrees by multiplying by 15) If we know the rectangular coordinates, we can convert to spherical coordinates by the formulae below:
At the north and south celestial poles, both x and y are zero. Since atan2(0,0) is undefined, the RA is undefined too at the celestial poles. The simplest way to handle this is to assign RA some arbitrary value, e.g. zero. Close to the celestial poles the formula asin(z/r) to compute the declination becomes sensitive to round-off errors - here the formula atan2(z,sqrt(x*x+y*y)) is preferable. Not only equatorial coordinates can be converted between spherical and rectangular. These conversions can also be applied to ecliptic and horizontal coordinates. Just exchange RA,Decl with long,lat (ecliptic coordinates) or azimuth,altitude (horizontal coordinates). A coordinate system can be rotated. If a rectangular coordinate system is rotated around, say, the X axis, one can easily compute the new x,y,z coordinates. As an example, let's consider rotating an ecliptic x,y,z system to an equatorial x,y,z system. This rotation is done around the X axis (which points to the Vernal Point, the common point of origin in ecliptic and equatorial coordinates), through an angle of oblecl (the obliquity of the ecliptic, which is approximately 23.4 degrees):
Now the x,y,z system is equatorial. It's easily rotated back to ecliptic coordinates by simply switching sign on oblecl:
When computing sin and cos of -oblecl, one can use the identities:
Now let's put this together to convert directly from spherical ecliptic coordinates (long, lat) to spherical equatorial coordinates (RA, Decl). Since the distance r is irrelevant in this case, let's set r=1 for simplicity. Example: At the Summer Solstice the Sun's ecliptic longitude is 90 degrees. The Sun's ecliptic latitude is always very nearly zero. Suppose the obliquity of the ecliptic is 23.4 degrees:
Rotate through oblecl = 23.4_deg:
Our equatorial rectangular coordinates become:
The "distance", r, becomes: sqrt( 0.8423 + 0.1577 ) = 1.0000 i.e. unchanged
Alternatively:
Here we immediately see how simple it is to compute RA, thanks to the atan2() function: no need to consider in which quadrant it falls, the atan2() function handles this.
We call our day number d. It can be computed from a JD (Julian Day Number) or MJD (Modified Julian Day Number) like this:
We can also compute d directly from the calendar date like this:
Y is the year (all 4 digits!), M the month (1-12) and D the date. In this formula all divisions should be INTEGER divisions. Use "div" instead of "/" in Pascal, and "\" instead of "/" in Microsoft Basic. In C/C++ and FORTRAN it's sufficient to ensure that both operands to "/" are integers. This formula yields d as an integer, which is valid at the start (at midnight), in UT or TDT, of that calendar date. If you want d for some other time, add UT/24.0 (here the division is a floating-point division!) to the d obtained above. Example: compute d for 19 april 1990, at 0:00 UT : We can look up, or compute the JD for this moment, and we'll get: JD = 2448000.5 which yields d = -3543.0 Or we can compute d directly from the calendar date:
d = 730330 - (7*(1990 + (13/12)))/4 + 1100/9 + 19 - 730530 d = 730330 - (7*(1990 + 1))/4 + 122 + 19 - 730530 d = 730330 - (7*1991)/4 + 122 + 19 - 730530 d = 730330 - 13937/4 + 122 + 19 - 730530 d = 730330 - 3484 + 122 + 19 - 730530 = -3543 This moment, 1990 april 19, 0:00 UT/TDT, will be our test date for most numerical examples below. d is negative since our test date, 19 april 1990, is earlier than the "point of origin" of our day number, 31 dec 1999.
We also need the obliquity of the ecliptic, oblecl:
and the Sun's mean longitude, L:
By definition the Sun is (apparently) moving in the plane of the ecliptic. The inclination, i, is therefore zero, and the longitude of the ascending node, N, becomes undefined. For simplicity we'll assign the value zero to N, which means that w, the angle between acending node and perihelion, becomes equal to the longitude of the perihelion. Now let's compute the Sun's position for our test date 19 april 1990. Earlier we've computed d = -3543.0 which yields:
We immediately notice that the mean anomaly, M, will get a large negative value. We use our function rev() to reduce this value to between 0 and 360 degrees. To do this, rev() will need to add 9*360 = 3240 degrees to this angle:
We also compute:
oblecl = 23.4406_deg Let's go on computing an auxiliary angle, the eccentric anomaly. Since the eccentricity of the Sun's (i.e. the Earth's) orbit is so small, 0.017, a first approximation of E will be accurate enough. Below E and M are in degrees:
When we plug in M and e, we get:
Now we compute the Sun's rectangular coordinates in the plane of the ecliptic, where the X axis points towards the perihelion:
We plug in E and get:
Convert to distance and true anomaly:
Numerically we get:
Now we can compute the longitude of the Sun:
lon = 105.9134_deg + 282.7735_deg = 388.6869_deg = 28.6869_deg We're done! How close did we get to the correct values? Let's compare with the Astronomical Almanac:
lon 28.6869_deg 28.6813_deg +0.0056_deg = 20" The error in the Sun's longitude was 20 arc seconds, which is well below our aim of an accuracy of one arc minute. The error in the distance was about 1/3 Earth radius. Not bad! Finally we'll compute the Sun's ecliptic rectangular coordinates, rotate these to equatorial coordinates, and then compute the Sun's RA and Decl:
We plug in our longitude:
We use oblecl = 23.4406 degrees, and rotate these coordinates:
which yields:
Convert to RA and Decl:
The Astronomical Almanac says:
6. Sidereal time and hour angle. Altitude and azimuth
where SIDTIME, GMST0 and UT are given in hours + decimals. GMST0 is the Sidereal Time at the Greenwich meridian at 00:00 right now, and UT is the same as Greenwich time. LON is the terrestial longitude in degrees (western longitude is negative, eastern positive). To "convert" the longitude from degrees to hours we divide it by 15. If the Sidereal Time becomes negative, we add 24 hours, if it exceeds 24 hours we subtract 24 hours. Now, how do we compute GMST0? Simple - we add (or subtract) 180 degrees to (from) L, the Sun's mean longitude, which we've already computed earlier. Then we normalise the result to between 0 and 360 degrees, by applying the rev() function. Finally we divide by 15 to convert degrees to hours:
We've already computed L = 26.8388_deg, which yields:
Now let's compute the local Sidereal Time for the time meridian of Central Europe (at 15 deg east longitude = +15 degrees long) on 19 april 1990 at 00:00 UT:
SIDTIME = 14h 47m 21.3s To compute the altitude and azimuth we also need to know the Hour Angle, HA. The Hour Angle is zero when the clestial body is in the meridian i.e. in the south (or, from the southern heimsphere, in the north) - this is the moment when the celestial body is at its highest above the horizon. The Hour Angle increases with time (unless the object is moving faster than the Earth rotates; this is the case for most artificial satellites). It is computed from:
Here SIDTIME and RA must be expressed in the same unit, hours or degrees. We choose hours:
If the Hour Angle is 180_deg the celestial body can be seen (or not be seen, if it's below the horizon) in the north (or in the south, from the southern hemisphere). We get HA = 195_deg for the Sun, which seems OK since it's around 01:00 local time. Now we'll convert the Sun's HA = 195.1808_deg and Decl = +11.0084_deg to a rectangular (x,y,z) coordinate system where the X axis points to the celestial equator in the south, the Y axis to the horizon in the west, and the Z axis to the north celestial pole: The distance, r, is here irrelevant so we set r=1 for simplicity:
Now we'll rotate this x,y,z system along an axis going east-west, i.e. the Y axis, in such a way that the Z axis will point to the zenith. At the North Pole the angle of rotation will be zero since there the north celestial pole already is in the zenith. At other latitudes the angle of rotation becomes 90_deg - latitude. This yields:
Since sin(90_deg-lat) = cos(lat) (and reverse) we'll get:
Finally we compute our azimuth and altitude:
Why did we add 180_deg to the azimuth? To adapt to the most common way to specify azimuth: from North (0_deg) through East (90_deg), South (180_deg), West (270_deg) and back to North. If we didn't add 180_deg the azimuth would be counted from South through West/etc instead. If you want to use that kind of azimuth, then don't add 180_deg above. We select some place in central Scandinavia: the longitude is as before +15_deg (15_deg East), and the latitude is +60_deg (60_deg N):
Now we've computed the horizontal coordinates in rectangular form. To get azimuth and altitude we convert to spherical coordinates (r=1):
Let's round the final result to two decimals:
The Sun is thus 17.96_deg below the horizon at this moment and place. This is very close to astronomical twilight (18_deg below the horizon).
The orbital elements of the Moon are:
The Moon's ascending node is moving in a retrogade ("backwards") direction one revolution in about 18.6 years. The Moon's perigee (the point of the orbit closest to the Earth) moves in a "forwards" direction one revolution in about 8.8 years. The Moon itself moves one revolution in aboout 27.5 days. The mean distance, or semi-major axis, is expressed in Earth equatorial radii). Let's compute numerical values for the Moon's orbital elements on our test date 19 april 1990 (d = -3543):
Now the need for sufficient numerical accuracy becomes obvious. If we would compute M with normal single precision, i.e. only 7 decimal digits of accuracy, then the error in M would here be about 0.01 degrees. Had we selected a date around 1901 or 2099 then the error in M would have been about 0.1 degrees, which is definitely worse than our aim of a maximum error of one or two arc minutes. Therefore, when computing the Moon's mean anomaly, M, it's important to use at least 9 or 10 digits of accuracy. (This was a real problem around 1980, when microcomputers were a novelty. Around then, pocket calculators usually offered better precision than microcomputers. But these days are long gone: nowadays microcomputers routinely offer double precision (14-16 digits of accuracy) support in hardware; all you need to do is to select a compiler which really suports this.) All angular elements should be normalized to within 0-360 degrees, by calling the rev() function. We get:
To normalize M we had to add 129*360 = 46440 degrees. Next, we compute E, the eccentric anomaly. We start with a first approximation (E0 and M in degrees):
The eccentricity of the Moon's orbit is larger than of the Earth's orbit. This means that our first approximation will have a bigger error - it'll be close to the limit of what we can tolerate within our accuracy aim. If you want to be careful, you should therefore use the iteration formula below: set E0 to our first approximation, compute E1, then set E0 to E1 and compute a new E1, until the difference between E0 and E1 becomes small enough, i.e. smaller than about 0.005 degrees. Then use the last E1 as the final value. In the formula below, E0, E1 and M are in degrees:
On our test date, the first approximation of E becomes: E=262.9689_deg The iterations then yield: E = 262.9735_deg, 262.9735_deg ...... Now we've computed E - the next step is to compute the Moon's distance and true anomaly. First we compute rectangular (x,y) coordinates in the plane of the lunar orbit:
Our test date yields:
Then we convert this to distance and true anonaly:
Now we know the Moon's position in the plane of the lunar orbit. To compute the Moon's position in ecliptic coordinates, we apply these formulae:
Our test date yields:
Convert to ecliptic longitude, latitude, and distance:
According to the Astronomical Almanac, the Moon's position at this moment is 306.94_deg, and the latitude is -0.55_deg. This differs from our figures by 1.42_deg in longitude and 0.16_deg in latitude!!! This difference is much larger than our aim of an error of max 1-2 arc minutes. Why is this so?
First we need several fundamental arguments:
Let's plug in the figures for our test date:
Now it's time to compute and add up the 12 largest perturbation terms in longitude, the 5 largest in latitude, and the 2 largest in distance. These are all the perturbation terms with an amplitude larger than 0.01_deg in longitude resp latitude. In the lunar distance, only the perturbation terms larger than 0.1 Earth radii has been included: Perturbations in longitude (degrees):
Perturbations in latitude (degrees):
Perturbations in lunar distance (Earth radii):
Some of the largest perturbation terms in longitude even have received individual names! The largest perturbation, the Evection, was discovered already by Ptolemy (he made it one of the epicycles in his theory for the Moon's motion). The two next largest perturbations, the Variation and the Yearly equation, were discovered by Tycho Brahe. If you don't need 1-2 arcmin accuracy, you don't need to compute all these perturbation terms. If you only include the two largest terms in longitude and the largest in latitude, the error in longitude rarely becomes larger than 0.25_deg, and in latitude rarely larger than 0.15_deg. Let's compute these perturbation terms for our test date:
latitude: -0.0958 - 0.0414 - 0.0365 - 0.0200 + 0.0018 = -0.1919_deg distance: -0.3680 + 0.3745 = +0.0066 Earth radii Add this to the ecliptic positions we earlier computed:
Let's compare with the Astronomical Almanac:
Now the agreement is much better, right? Let's continue by converting these ecliptic coordinates to Right Ascension and Declination. We do as described earlier: convert the ecliptic longitude/latitude to rectangular (x,y,z) coordinates, rotate this x,y,z, system through an angle corresponding to the obliquity of the ecliptic, then convert back to spherical coordinates. The Moon's distance doesn't matter here, and one can therefore set r=1.0. We get:
According to the Astronomical Almanac:
9. The Moon's topocentric position. Let's start by computing the Moon's parallax, i.e. the apparent size of the (equatorial) radius of the Earth, as seen from the Moon:
where r is the Moon's distance in Earth radii. It's simplest to apply the correction in horizontal coordinates (azimuth and altitude): within our accuracy aim of 1-2 arc minutes, no correction need to be applied to the azimuth. One need only apply a correction to the altitude above the horizon:
Sometimes one needs to correct for topocentric position directly in equatorial coordinates though, e.g. if one wants to draw on a star map how the Moon passes in front of the Pleiades, as seen from some specific location. Then we need to know the Moon's geocentric Right Ascension and Declination (RA, Decl), the Local Sidereal Time (LST), and our latitude (lat). Our astronomical latitude (lat) must first be converted to a geocentric latitude (gclat) and distance from the center of the Earth (rho) in Earth equatorial radii. If we only want an approximate topocentric position, it's simplest to pretend that the Earth is a perfect sphere, and simply set:
However, if we do wish to account for the flattening of the Earth, we instead compute:
Next we compute the Moon's geocentric Hour Angle (HA):
We also need an auxiliary angle, g:
Now we're ready to convert the geocentric Right Ascention and Declination (RA, Decl) to their topocentric values (topRA, topDecl):
Let's do this correction for our test date and for the geographical position 15 deg E longitude (= +15_deg) and 60 deg N latitude (= +60_deg). Earlier we computed the Local Sidereal Time as LST = SIDTIME = 14.78925 hours. Multiply by 15 to get degrees: LST = 221.8388_deg The Moon's Hour Angle becomes:
Our latitude +60_deg yields the following geocentric latitude and distance from the Earth's center:
We've already computed the Moon's distance as 60.6779 Earth radii, which means the Moon's parallax is:
The auxiliary angle g becomes:
And finally the Moon's topocentric position becomes:
This correction to topocentric position can also be applied to the Sun and the planets. But since they're much farther away, the correction becomes much smaller. It's largest for Venus at inferior conjunction, when Venus' parallax is somewhat larger than 32 arc seconds. Within our aim of obtaining a final accuracy of 1-2 arc minutes, it might barely be justified to correct to topocentric position when Venus is close to inferior conjunction, and perhaps also when Mars is at a favourable opposition. But in all other cases this correction can safely be ignored within our accuracy aim. We only need to worry about the Moon in this case. If you want to compute topocentric coordinates for the planets anyway, you do it the same way as for the Moon, with one exception: the parallax of the planet (ppar) is computed from this formula:
where r is the distance of the planet from the Earth, in astronomical units.
Mercury:
Venus:
Mars:
Jupiter:
Saturn:
Uranus:
Neptune:
Let's compute all these elements for our test date, 19 april 1990 0h UT:
Mercury 48.2163 7.0045 29.0882 0.387098 0.205633 69.5153 Jupiter 100.3561 1.3036 273.8194 5.20256 0.048482 85.5238 11. The heliocentric positions of the planets Let's do this for Mercury on our test date: the first approximation of E is 81.3464_deg, and following iterations yield 81.1572_deg, 81.1572_deg .... From this we find:
Mercury's heliocentric ecliptic rectangular coordinates become:
Convert to spherical coordinates:
The Astronomical Almanac gives these figures:
The agreement is almost perfect! The discrepancy is only a few arc seconds. This is because it's quite easy to get an accurate position for Mercury: it's close to the Sun where the Sun's gravitational field is strongest, and therefore perturbations from the other planets will be smallest for Mercury. If we compute the heliocentric longitude, latitude and distance for the other planets from their orbital elements, we get:
Mercury 170.5709_deg +5.9255_deg 0.374862 For e.g. Saturn, the Astronomical Almanac says:
The difference is here much larger! For Mercury our discrepancy was only a few arc seconds, but for Saturn it's up to four arc minutes! And still we've been lucky, since sometimes the discrepancy can be up to one full degree for Saturn. This is the planet that's perturbed most severely, mostly by Jupiter.
First we need three fundamental arguments:
Then these terms should be added to Jupiter's heliocentric longitude:
For Saturn we must correct both the longitude and latitude. Add this to Saturn's heliocentric longitude:
and to Saturn's heliocentric latitude these terms should be added:
Finally, add this to Uranus heliocentric longitude:
The perturbation terms above are all terms having an amplitude of 0.01 degrees or more. We ignore all perturbations in the distances of the planets, since a modest perturbation in distance won't affect the apparent position very much. The largest perturbation term, "the grand Jupiter-Saturn term" is the perturbation in longitude with the largest amplitude in both Jupiter and Saturn. Its period is 918 years, and its amplitude is a large part of a degree for both Jupiter and Saturn. There is also a "grand Saturn-Uranus term", which has a period of 560 years and an amplitude of 0.035 degrees for Uranus, but less than 0.01 degrees for Saturn. Other included terms have periods between 14 and 100 years. Finally we should mention the "grand Uranus-Neptune term", which has a period if 4200 years and an amplitude of almost one degree. It's not included in our perturbation terms here, instead its effects have been included in the orbital elements for Uranus and Neptune. This is why the mean distances of Uranus and Neptune are varying. If we compute the perturbations for our test date, we get:
Perturbations in Jupiter's longitude:
Jupiter's heliocentric longitude, with perturbations: 105.2423_deg Perturbations in Saturn's longitude:
Perturbations in Saturn's latitude:
Saturns position, with perturbations: 289.3824_deg +0.1845_deg Perturbations in Uranus' longitude:
Uranus heliocentric longitude, with perturbations: 276.7672_deg 13. Precession We will simplify the precession correction further by doing it in eliptic coordinates: the correction is simply done by adding
to the ecliptic longitude. We ignore precession in ecliptic latitude. "epoch" is the epoch we wish to precess to, and "d" is the "day number" we used when computing our planetary positions. Example: if we wish to precess computations done at our test date 19 April 1990, when d = -3543, we add the quantity below (degrees) to the ecliptic longitude:
So we simply add 0.1355_deg to our ecliptic longitude to get the position at 2000.0.
Let's do this for Mercury on our test date - we add the x, y and z coordinates separately:
Now we have rectangular geocentric coordinates of Mercury. If we wish, we can convert this to spherical coordinates - then we get geocentric ecliptic longitude and latitude. This is useful if we want to precess the position to some other epoch: we then simply add the approproate precessional value to the longitude. Then we can convert back to rectangular coordinates. But for the moment we want the "epoch of the day": let's rotate the x,y,z, coordinates around the X axis, as described earlier. Then we'll get equatorial rectangular geocentric (whew!) coordinates:
We can convert these coordinates to spherical coordinates, and then we'll (finally!) get geocentric Right Ascension, Declination and distance for Mercury:
Note that the distance now is different. This is quite natural since the distance now is from the Earth and not, as earlier, from the Sun. Let's conclude by checking the values given by the Astronomical Almanac:
15. The elongation and physical ephemerides of the planets Let's start by computing the apparent diameter of the planet:
R is the planet's geocentric distance in astronomical units, and d is the planet's apparent diameter at a distance of 1 astronomical unit. d0 is of course different for each planet. The values below are given in seconds of arc. Some planets have different equatorial and polar diameters:
The Sun's apparent diameter at 1 astronomical unit is 1919.26". The Moon's apparent diameter is:
where r is the Moon's distance in Earth radii. Two other quantities we'd like to know are the phase angle and the elongation. The phase angle tells us the phase: if it's zero the planet appears "full", if it's 90 degrees it appears "half", and if it's 180 degrees it appears "new". Only the Moon and the inferior planets (i.e. Mercury and Venus) can have phase angles exceeding about 50 degrees. The elongation is the apparent angular distance of the planet from the Sun. If the elongation is smaller than ca 20 degrees, the planet is hard to observe, and if it's smaller than ca 10 degrees it's usually not possible to observe the planet. To compute phase angle and elongation we need to know the planet's heliocentric distance, r, its geocentric distance, R, and the distance to the Sun, s. Now we can compute the phase angle, FV, and the elongation, elong:
FV = acos( ( r*r + R*R - s*s ) / (2*r*R) ) When we know the phase angle, we can easily compute the phase:
hav(FV) is the "haversine" of the phase angle. The "haversine" (or "half versine") is an old and now obsolete trigonometric function; it's defined as:
As usual we must use a different procedure for the Moon. Since the Moon is so close to the Earth, the procedure above would introduce too big errors. Instead we use the Moon's ecliptic longitude and latitude, mlon and mlat, and the Sun's ecliptic longitude, mlon, to compute first the elongation, then the phase angle, of the Moon:
Finally we'll compute the magnitude (or brightness) of the planets. Here we need to use a formula that's different for each planet. The phase angle, FV, is in degrees:
** is the power operator, thus FV**6 is the phase angle (in degrees) raised to the sixth power. If FV is 150 degrees, then FV**6 becomes ca 1.14E+13, which is a quite large number. Saturn needs special treatment due to its rings: when Saturn's rings are "open" then Saturn will appear much brighter than when we view Saturn's rings edgewise. We'll compute ring_mang like this:
Here B is the tilt of Saturn's rings which we also need to compute. Then we start with Saturn's geocentric ecliptic longitude and latitude (los, las) which we've already computed. We also need the tilt of the rings to the ecliptic, ir, and the "ascending node" of the plane of the rings, Nr:
Here d is our "day number" which we've used so many times before. For our test date d = -3543. Now let's compute the tilt of the rings:
This concludes our computation of the magnitudes of the planets.
Comets will usually have a new set of orbital elements computed for each perihelion. The comets are perturbed most severely when they're close to aphelion, far away from the gravity of the Sun but maybe much closer to Jupiter, Saturn, Uranus or Neptune. When the comet is passing through the inner solar system, the perturbations are usually so small that the same set of orbital elements can be used for the entire apparition. Orbital elements for an asteroid should preferably not be more than about one year old. If your accuracy requirements are lower, you can of course use older elements. If you use orbital elements that are five years old for a main-belt asteroid, then your computed positions can be several degrees in error. If the orbital elements are less than one year old, the errors usually stay below approximately one arc minute, for a main-belt asteroid. If you have access to valid orbital elements for a comet or an asteroid, proceed as below to compute its position at some date: 1. If necessary, precess the angular elements N,w,i to the epoch of today. The simples way to do this is to add the precession angle to N, the longitude of the ascending node. This method is approximate, but it's good enough for our accuracy aim of 1-2 arc minutes. 2. Compute the day number for the time or perihelion, call it D. Then compute the number of days since perihelion, d - D (before perihelion this number is of course negative). 3. If the orbit is elliptical, compute the Mean Anomaly, M. Then compute r, the heliocentric distance, and v, the true anomaly. 4. If the orbit is a parabola, or close to a parabola (the eccentricity is 1.0 or nearly 1.0), then the algorithms for elliptical orbits will break down. Then use another algorithm, presented below, to compute r, the heliocentric distance, and v, the true anomaly, for near-parabolic orbits. 5. When you know r and v, proceed as with the planets: compute first the heliocentric, then the geocentric, position. 6. If needed, precess the final position to the desired epoch, e.g. 2000.0 A quantity we'll encounter here is Gauss' gravitational constant, k. This constant links the Sun's mass with our time unit (the day) and the length unit (the astronomical unit). The EXACT value of Gauss' gravitational constant k is:
If the orbit is elliptical, and if the perihelion distance, q, is given instead of the mean distance, a, we start by computing the mean distance a from the perihelion distance q and the eccentricity e:
Now we compute the Mean Anomaly, M:
a ** 1.5 is most easily computed as: sqrt(a*a*a) Now we know the Mean Anomaly, M. We proceed as for a planetary orbit by computing E, the eccentric anomaly. Since comet and asteroid orbits often have high eccentricities, we must use the iteration formula given earlier, and be sure to iterate until we get convergence for the value of E. The orbital period for a comet or an asteroid in elliptic orbit is (P in days):
If the comet's orbit is a parabola, the algorithm for elliptic orbits will break down: the semi-major axis and the orbital period will be infinite, and the Mean Anomaly will be zero. Then we must proceed in a different way. For a parabolic orbit we start by computing the quantities a, b and w (where a is not at all related to a for an elliptic orbit):
b = sqrt( 1 + a*a ) w = cbrt(b + a) - cbrt(b - a) cbrt is the Cubic Root function. Finally we compute the true anomaly, v, and the heliocentric distiance, r:
From here we can proceed as usual. Finally we have the case that's most common for newly discovered comets: the orbit isn't an exact parabola, but very nearly so. It's eccentricity is slightly below, or slightly above, one. The algorithm presented here can be used for eccentricities between about 0.98 and 1.02. If the eccentricity is smaller than 0.98 the elliptic algorithm should be used instead. No known comet has an eccentricity exceeding 1.02. As for the purely parabolic orbit, we start by computing the time since perihelion in days, d - D, and the perihelion distance, q. We also need to know the eccentricity, e. Then we can proceed as:
a1 = (2/3) + (2/5) * W*W w = W * ( 1 + g * c * ( a1 + a2*g + a3*g*g ) ) v = 2 * atan(w) This algorithm yields the true anomaly, v, and the heliocentric distance, r, for a nearly-parabolic orbit. Now it's time for a practical example. Let's select two of the comets that were seen in the autumn of 1990: Comet Encke, a well-known periodic comet, and comet Levy, which was easily seen towards a dark sky in the autumn of 1990. When passing the inner solar system, the orbit of comet Levy was slightly hyperbolic. According the the Handbook of the British Astronomical Association the orbital elements for comet Encke in 1990 are:
The orbital elements for comet Levy are (BAA Circular 704):
Let's also choose another test date, when both these comets were visible: 1990 Aug 22, 0t UT, which yields a "day number" d = -3418.0 Now we compute the day numbers at perihelion for these two comets. We get for comet Encke:
and for comet Levy:
We'll continue by computing the Mean Anomaly for comet Encke:
The first approximation plus successive approximation for the Eccentric anomaly, E, becomes (degrees):
Here we clearly see the great need for iteration: the initial approximation differs from the final value by 14 degrees. Finally we compute the true anomaly, v, and heliocentric distance, r, for comet Encke:
Now it's time for comet Levy: we'll compute the true anomaly, v, and the heliocentric distance, r, for Levy in two different ways. First we'll pretend that the orbit of Levy is an exact parabola. We get:
v = -71.8856_deg Then we repeat the computation but accounts for the fact that Levy's orbit deviates slightly from a parabola. We get:
v = -71.8863_deg The difference is small in this case - only 0.0007 degrees or 2.5 arc seconds in true anomaly, and 0.000112 a.u. in heliocentric distance. Here it would have been sufficient to treat Levy's orbit as an exact parabola. Now we know the true anomaly, v, and the heliocentric distance, r, for both Encke and Levy. Next we proceed by precessing N, the longitude of the ascending node, from 1950.0 to the "epoch of the day". Let's compute the precession angle from 1950.0 to 1990 Aug 22:
To precess from 1990 Aug 22 to 1950.0, we should add this angle to N. But now we want to do the opposite: precess from 1950.0 to 1990 Aug 22, therefore we must instead subtract this angle: For comet Encke we get:
and for comet Levy we get:
Using this modified value for N we proceed just like for the planets. I won't repeat the details, but merely state some intermediate and final results:
Heliocentric: Encke Levy x +1.195087 +1.169908 Geoc., eclipt.: Encke Levy x +0.331197 +0.306018 Geoc., equat.: Encke Levy x +0.331197 +0.306018 RA 71.6824_deg 313.1264_deg These positions are for the "epoch of the day". If you want positions for some standard epoch, e.g. 2000.0, these positions must be precessed to that epoch. Finally some notes about computing the magnitude of a comet. To accurately predict a comet's magnitude is usually hard and sometimes impossible. It's fairly common that a magnitude prediction is off by 1-2 magnitudes or even more. For comet Levy the magnitude formula looked like this:
where R is the geocentric distance and r the heliocentric distance. The general case is:
where H usually is around 10. If H is unknown, it's usually assumed to be 10. Each comet has it's own G and H. Some comets have a different magnitude formula. One good example is comet Encke, where the magnitude formula looks like this:
"m1" refers to the total magnitude of the comet. There is another cometary magnitude, "m2", which refers to the magnitude of the nucleus of the comet. The magnitude formula for Encke's m2 magnitude looks like this:
Here FV is the phase angle. This kind of magnitude formula looks very much like the magnitude formula of asteroids, for a very good reason: when a comet is far away form the Sun, no gases are evaporated from the surface of the comet. Then the comet has no tail (of course) and no coma, only a nucleus. Which means the comet then behaves much like an asteroid. During the last few years it's become increasingly obvious that comets and asteroids often are similar kinds of solar-system objects. The asteroid (2060) Chiron has displayed cometary activity and is now also considered a comet. And in some cases comets that have "disappeared" have been re-discovered as asteroids! Apparently they "ran out of gas" and what remains of the former comet is only rock, i.e. an asteroid.
|