Sie sind auf Seite 1von 18

Computing the Physical Ephemeris of Mars

Jeff Beish, (10-27-2013)


Association of Lunar and Planetary Observers (A.L.P.O.)

INTRODUCTION

What do we need to compute the Ephemeris of a planet? We may want to start


off by defining a few necessary bits of information, i.e., whats the date and time,
etc. What better place to start -- the date and time! Remember, if we do not
include the date and time on a report form even a great observation is useless.

Since astronomers seem to use a common mode of date and time, we will only
discuss the two date systems and the established time system commonly used.
We will begin with a brief discussion and methods to calculate the Leap Day,
Day of the Year, Day of the Week, and the Julian Day. Our topics later, Part 2
will include Local Standard Time (time), Coordinated Universal Time (UTC),
and Local Sidereal Time (LST). And, how to convert from one system to the
other? Once we have those "simple" methods and calculations out of the way, we
get into the real scary stuff.

Since this author writes mostly in Visual Basic programming examples will be
presented as they would by using Microsoft Visual Basic. We encourage others
to add to these routines as time goes by. It may seem odd to use computer
programming to explain this stuff. Hopefully, it will become clear after a while
why. Formatting commands for Visual Basic makes life easier in the fast lane of
computer programming. They actually are similar to some of the old FORTRAN
format commands with lot of flexibility. Since we will discuss dates and times, a
simpler routine using Visual Basic formatting will be included with each
discussion.

Internet URLs will be referred to when detailed explanations may be necessary to


save time. There are plenty of web pages on the Internet with gobs of information
relative to programming the Ephemerides. High brow theory may be out of place
here also, so, when necessary a reference to publications will point to detailed
discussions on the equations.

The following equations and their use can be found in the books by Jean Meeus.
Detailed discussion on these equations will not be given. However, program
techniques will be discussed.

PROGRAMMING TIPS

We may wish to start with come essential constants in the General section of our
Visual Basic form with:
Const PI = 3.14159265
Const rad = PI / 180

"rad" is necessary in Basic to convert trigonometric calculations from radians to


degrees and the reverse. Here are a couple function-calls for inverse sine and
cosine:

Function Arcsin(X)
X = Atn(X / Sqr(-X * X + 1)) / rad
End Function

Function Arccos(X)
X = (Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)) / rad
End Function

Many of the long equations result in angles of five digit angles, meaningless for
real world thinking. A good sub-routine can be formed in our program as a
Function Call. Much of the answers of the equations we will use results in angle
over 360 degrees. At times it is necessary to "normalize" the results to a value at
or below 360 degrees. A handy call is:

Function NORMALIZE(X)
X = ((X / 360) - Int(X / 360)) * 360
End Function

Function NORMTIM(X)
X = X / 24
X = 24 * (X - Int(X))
End Function

Some trigonometric functions may result in erroneous angles that will throw the
positions of a planet way out of bounds. First, when any equation contains the
tangent (TAN) it is possible to end up in the wrong quadrant of the circle. Once
this author printed a daily listing of the Ephemeris of Mars and was surprised to
find the right ascension changed from 23:59:59 to 12:00:00!!! A simple over sight
caused this. So, when a TAN shows up, say in the following equation:

X = Tan B / Cos LA

This may result in the wrong sign and quadrant, so to find the inverse tangent of
the denominator and numerator as this equation and the signs of each. Also, it
may be a good time to convert from radial measure to degrees. If the
denominator is negative then we add 180 to the result and find the correct
quadrant. Also, this is a good one for the Function Call routine. FORTRAN
incorporates a nice call ATN2 that accomplishes this for you. Basic does not! So
lets just emulate FORTRAN with a Function Call.
An example for equation X = Tan B / Cos LA, simply tag the numerator and
dominator as, RX = Tan B: RY = Cos LA, then:

Call Function ArcTan2(ArgY, ArgX)

Public Function ArcTan2(ArgY, ArgX)


Dim Q As Double
Q=1
If ArgY = 0 And ArgX >= 0 Then Q = 0
If ArgY > 0 And ArgX = 0 Then Q = 90
If ArgY = 0 And ArgX < 0 Then Q = 180
If ArgY < 0 And ArgX = 0 Then Q = 270
If Q = 1 Then
Q = 45 * Atn(ArgY / ArgX) / Atn(1)
If ArgX < 0 Then Q = Q + 180
If Q < 0 Then Q = Q + 360
End If
If Abs(Q) >= 360 Then Q = Q - 360 * Fix(Q / 360)
If Q < 0 Then Q = 360 + Q
ArcTan2 = Q

End Function

Time Zones in the USA

Time zones are measured from the 0 degrees meridian, somewhere in England,
and increases one hour for each 15 degrees of longitude around Earth. This is a
general rule. Governments in the various countries attempt to define nature and
make laws governing how our clocks will show time. After looking at a colored
map on the World Time Zones web page it is easy to see that the times zones
really follow more closely to country boundaries than to the 15-degree longitude
zones.

For time calculations we define the times zones in the United States are as
follows: Puerto Rico and U.S. Virgin Islands (-4), Eastern; including eastern
Indiana (-5), Central and western Indiana (-6), Mountain (-7), Pacific (-8), Alaska
(-9), and Hawaii (-10) and American Samoa (-11).

Daylight Savings Time

Here is a function of time that is as unnatural as anything astronomers can use.


Daylight Savings Time (DST) is purely a government operation and is set by law
to change the clock in certain locations around the world. We either "spring
forward" one hour (even a half-hour in some countries) on a day in springtime
and "fall back" an hour during a day in autumn. Some like to call Daylight
Savings Time, "summertime." Daylight saving time began in the United States
during World War I, primarily to save fuel by reducing the need to use artificial
lighting but only became a nation ritual during World War II.

In the USA all states but Arizona, Hawaii, the eastern zone portion of Indiana,
Puerto Rico, the U.S. Virgin Islands and American Samoa practice this unnatural
act. That is, change over to DST, during the early hours (2 a.m.) of the second
Sunday of March and revert back to Standard Time during the early hours (2
a.m.) of the first Sunday in November. Funny, if you followed the letter of the law
you would get up at 2 a.m. the last Sunday morning of the year. Set your clock
back an hour to 1 a.m. then wait until the clock read 2 a.m. and then set your
clock back an hour -- AGAIN! This could conceivably go on until you reached the
first Sunday in April then go on for there. Just kidding. But, it gives some
indication of how government works!

The Daylight Saving Time Zones for the USA are: Eastern; including eastern
Indiana (-5), Central and western Indiana (-6), Mountain (-7), Pacific (-8), and
Alaska (-9).

For local civil time, VB format is Format(UT, "hh:nn" AM/PM)

Here are two subroutines to determine when daylight savings time begins and
ends:

Sub Saylight_Savings()
These values would be carried in from the location veriables.

TZ = -5 Local Time Zone, set here for Eastern USA.


Tzone = TZ
DST = 1 Daylight Savings Time, yes.
TK = 2 / 24 2 a.m. local time

CivilMonth = Month(Now)
CivilDay = Day(Now)
CivilYear = Year(Now)
CivilHour = Hour(Now)
CivilMin = Minute(Now) MarJulianDate = Int(365.25 * (Cyear + 4716)) +
Int(30.6001 * 4) + 0 + (2 - Int(Cyear / 100) + Int(Int(Cyear / 100) / 4)) -
1524.5
TDM = Cday + (HR + MN / 60 + SC / 3600) / 24
DS1 = 14 - Int((MarJulianDate + 1.5) - 7 * Int((MarJulianDate + 1.5) / 7)) +
TK
NovJulianDate = Int(365.25 * (Cyear + 4716)) + Int(30.6001 * 12) + 0 + (2
- Int(Cyear / 100) + Int(Int(Cyear / 100) / 4)) - 1524.5
DS2 = 7 - Int((NovJulianDate + 1.5) - 7 * Int((NovJulianDate + 1.5) / 7)) +
TK
If DS2 > 7.2 Then DS2 = 1 + TK
If Cmonth > 3 Or (Cmonth = 3 And TDM >= DS1) Then Tzone = TZ + 1
If Cmonth > 11 Or (Cmonth = 11 And TDM >= DS2) Then Tzone = TZ
If DST = 0 Then Tzone = TZ

Print "Daylight Savings Time begins at 2 a.m. March "; Int(DS1); "and ends
at 2 a.m. November "; Int(DS2)

Coordinated Universal Time

Coordinated Universal Time (UTC) is a system we astronomers use. Also, times


for us are usually converted to 24-hour time, i.e., 1 a.m. is 0100 hours, 1 p.m. is
1300 hours and so on. Mid-night or 12 a.m. is 0000 hours, not 2400. To find the
UTC for your time zone, simply add the Time Zone values (negative for us),
mentioned above, in Time Zones in the USA to your local 24-hour time and if it
goes over 24 hours then subtract 24 from that.

Example 1: March 08, 2009 at 3 a.m. the Universal Time (UT) would be [Note:
we have already passed into Eastern Daylight Savings Time (EDT) at 2 a.m. on
this day! So, time zone will be 4 hours instead of 5 hours]. The 24-hour clock
for 03:30 a.m. EDT = 0330.

Find: UT for 0330 EDT add 4 hours: UT = 0330 +0400 = 0730. VB format is
Format(UT, "hh:nn) = 0730.

Example 2: November 01 2009, at 9 p.m. or 2100 hours (Note: we have already


passed into Eastern Standard Time (EST) at 2 a.m. this day! So, time zone will
be 5 hours instead of 4 hours).

Find: UT for 2100 in the EST add 5 hours: UT = 2100 + 0500 = 2600.
Normalize by subtracting 2400, then UT = 2600 - 2400 = 0200.
VB format is Format(UT, "hh:nn:ss) = 02:00:00

There are several sources for setting your astronomical clocks. Since this author
works for the U.S. Naval Observatory it is recommended that observers call into
1-202-762-1594 if you have a computer time setting program such as TimeSet
(DOS) or Atomic.exe (Atomic Clock for Windows) and so on. You can find
Timeset on the Rightime web page (http://www.rightime.com/) or the Atomic
Clock at Parsons Technology (1-800-223-6925).

Julian Day

Routine 1:
Sub JulDay(Yr, Mo, Da, JulianDate)
If Mo <= 2 Then
Y1 = Yr - 1
Mo1 = Mo + 12
Else
Y1 = Yr
Mo1 = Mo
End If
JulianDate = Int(365.25 * (Y1 + 4716)) + Int(30.6001 * (Mo1 + 1)) + Da +
(2 - Int(Y1 / 100) + Int(Int(Y1 / 100) / 4)) - 1524.5 End Sub

Example 1: April 1, 1999 at 0 hour UT. Since Month 2 then Y1 = 1999.

JulianDay = Int(365.25 * (1999 + 4716)) + Int(30.6001 * (4 + 1)) + 1 + (2 -


Int(1999 / 100) + Int(Int(1999 / 100) / 4)) - 1524.5
= 2452653 + 153 + 1 - 13 - 1524.5
= 2451269.5

Add the time of day divided by 24 to establish the exact Julian day number i.e., if
the UT is 1500 hours then: 1500 / 24 = 0.625. Corrected Julian day = 2451269.5
+ 0.625 = 2451270.125

Modified Julian Date (MJD) = JulianDay - 2400000.5

Example 1: April 1, 1999 at 1500 hour UT: MJD = JulianDay - 2400000.5 =


2451270.125 - 2400000.5 = 51269.625

The Julian date can be further adjusted to include the time of day by dividing the
Universal Time by 24 and adding it to the Julian date:

txtJulian.Text = Format(JulianDate + UnivTime / 24, "#########.###")

Many of the equations in our Ephemeris calculations require the fractional parts
of the Julian Century:

T = (JulianDate - 2415020) / 36525


T2 = T * T
T3 = T * T * T

Local Sidereal Time

Routine 1: GST = 6.6460656 + 2400.0512617 * (JulianDate - 2415020) / 36525+


1.002737908 * UT

Find: Greenwich Sidereal Time (GST)


Find: Local Mean Sidereal Time (Lmst) = GST + Longitude / 15
Example 1: Lmst for March 11, 1999 at 11:30 a.m. at longitude 77:18:41.

Find UT for 11:30 a.m.: UT = 1130 + 5 = 1630 or 16.5 hours

GST = 6.6460656 + 2400.0512617 (JulianDate - 2415020) / 36525 +


1.002737908 * 16.5
= 6.6460656 + 2380.56829937025 + 16.545175482
= 2403.75954045225

Normalize GST < 24 hours:


GST = 2403.75954045225 / 24
= 100.15664751884375

GST = 24 * (100.15664751884375 - Int(100.15664751884375))


= 3.75954045225183
Correct for longitude: First, convert longitude to decimal: 77 + 18/60 + 41/3600
= 77.311389. Since the longitude is to the west it is negative (-): longitude = -
77.311389

Lst = GST + Longitude / 15


= 3.75954045225183 + (- 77.311389 / 15)
= -1.39455214774817
Normalize Lst
If Lst< 0 then Lst = Lst + 24
Lst = Lst + 24
= 22.6054478596592

Convert Lmst to Hours, minutes, and seconds: 22.6054478596592 = 22 : 36 :


19

Delta T

Because the Solar System doesnt conform to our time measuring systems a
brief note on Delta Time (T) is in order. Delta Time the difference between
Universal Time and the time of our Solar System as determined by the U.S.
Naval Observatory and is not readily available until they compute it each year.
Here is an approximation of the value from the Polynomial Expressions for Delta
T ( T); Adapted from "Five Millennium Canon of Solar Eclipses [ Espenak and
Meeus ] found at URL: http://eclipse.gsfc.nasa.gov/SEhelp/deltatpoly2004.html

Sub DeltaT (UnivYear, DT)

If UnivYear >= 1900 And UnivYear < 1920 Then


tDT = UnivYear - 1900
DT = -2.79 + 1.494119 * tDT - 0.0598939 * tDT ^ 2 + 0.0061966 *
tDT ^ 3 - 0.000197 * tDT ^ 4
End If
If UnivYear >= 1920 And UnivYear < 1941 Then
tDT = UnivYear - 1920
DT = 21.2 + 0.84493 * tDT - 0.0761 * tDT ^ 2 + 0.0020936 * tDT ^ 3

End If
If UnivYear >= 1941 And UnivYear < 1961 Then
tDT = UnivYear - 1950
DT = 29.07 + 0.407 * tDT - tDT ^ 2 / 233 + tDT ^ 3 / 2547
End If
If UnivYear >= 1961 And UnivYear < 1986 Then
tDT = UnivYear - 1975
DT = 45.45 + 1.067 * tDT - tDT ^ 2 / 260 - tDT ^ 3 / 718
End If
If UnivYear >= 1986 And UnivYear < 2005 Then
tDT = UnivYear - 2000
DT = 63.86 + 0.3345 * tDT - 0.060374 * tDT ^ 2 + 0.0017275 * tDT
^ 3 + 0.000651814 * tDT ^ 4 + 0.00002373599 * tDT ^ 5
End If
If UnivYear >= 2005 And UnivYear < 2050 Then
tDT = UnivYear - 2000
DT = 62.92 + 0.32217 * tDT + 0.005589 * tDT ^ 2
End If
If UnivYear >= 2050 And UnivYear < 2150 Then
DT = -20 + 32 * ((UnivYear - 1820) / 100) ^ 2 - 0.5628 * (2150 -
UnivYear)
End If
If UnivYear >= 2150 Then
u = (UnivYear - 1820) / 100
DT = -20 + 32 * u ^ 2
End If
End Sub

Before getting started on the primary equations for the Ephemeris lets discuss
some pesky transform routines. To correct a previous problem with the year 2000
leap day a new routine for Julian date is discussed.

Leap Day

Leap Year Rule: Every year that is exactly divisible by 4 is a leap year, except for
years that are exactly divisible by 100; these centurial years are leap years only if
they are exactly divisible by 400. The break out the leap day, a good computer
program routine would be:

Two routines for finding the Leap day for any year. The first can be found in many
"professional" programming manuals, college classes, and so on. The second
works exactly the same, however, is faster and a bit less complex. The last, a
short statement in Visual Basic, is very fast:

Routine 1: IF Year MOD 4 = 0 AND Year MOD 100 = 0 THEN

IF Year MOD 400 = 0 THEN


LEAP = 1
ELSE
LEAP = 0
ELSEIF Year MOD 4 = 0 THEN
LEAP = 1
ELSE
LEAP = 0
END IF

Routine 2: Leap = ABS((Year MOD 4 = 0 AND Year MOD 100 < 0) OR (Year
MOD 400 = 0))

Example 1: Is the year 1999 a leap year?

Find: ABS((1999 MOD 4 = 0 AND 1999 MOD 100 < 0) OR (1999 MOD 400 = 0)),

where 1999 MOD 4 = 3 and 1999 MOD 100 = 99, so the answer is ABS (0) or 0

Example 2: Is the year 2000 a leap year

Find: ABS((2000 MOD 4 = 0 AND 2000 MOD 100 < 0) OR (2000 MOD 400 = 0))

where 2000 MOD 4 = 0 and 2000 MOD 100 = 0, so the answer is ABS (-1) or 1

Routine 3: Format (Now, "yyyy") = 1999. Visual Basic (VB) takes care of leap
days. No need for complex coding to accomplish this.

Day of the Year

Routine 1: Dnum = INT((275 * Month) / 9) - K * INT((Month + 9) / 12) + Day - 30,

if Leap then K = 1 else K = 2

Example 1: March 01, 1999, Leap = 0, so K=2

Find: Dnum = INT((275 * 3) / 9) - 2 * INT((3 + 9) / 12) + 1 - 30 = 91-2+1-30 = 60

Routine 2: Find the JD for 0 hour of January 1st. then subtract this from the JD
for the day of the year.
Example 2 : March 01, 1999, JD = 2451239.5

January 01, 1999, JD = 2451179.5

Dnum = 2451239.5 - 2451179.5 = 60

Routine 3: Format(Now, "y") if Now = March 01, 1999, Dnum = 60 [VB method]

Day of the Week

We may even need to know the day of the week. Not that is necessary to
calculate the Ephemeris of a planet, its just nice to have around in case.

Routine 1: WkDay$ = MID$("SunMonTueWedThuFriSat", 1 + 3 * (z - 7 * INT(z /


7)), 3)

where z = Day + INT(30.6001 * (Month + 1 - 12 * (Month < 3))) + INT(365.25 *


(Year - 1900 + (Month < 3)))

Example 1: April 01, 1999

z = 1 + INT(30.6001 * (4 + 1 - 12 * (4 < 3))) + INT(365.25 * (1999 - 1900 + (4 <


3)))
= 1 + INT(30.6001 * (4 + 1 - 0) + INT(365.25 * (1999 - 1900 + 0))
= 1 + 153 +36159 = 36313

WkDay$ = MID$("SunMonTueWedThuFriSat", 1 + 3 * (36313 - 7 * INT(36313 /


7)), 3)
= MID$("SunMonTueWedThuFriSat", 1 + 3 * (36313 - 36309), 3)
= MID$("SunMonTueWedThuFriSat", 13, 3)
= Thu

If you were to want the week day spelled out completely, the change the "3 *" to
9*" and modify the line "SunMonTueWedThuFriSat" to "Sunday Monday
Tuesday WednesdayThursday Friday Saturday " where each week day contains
at 9 characters, spaces included.

Routine 2: There is an interesting method in Jean Meeus, Astronomical


Calculations, Ch. 7. " Julian Day, " page 65 that is a bit confusing. He states "the
day of the week corresponding to a given date can be obtained as follows.
Compute the JD for that date at 0 hour, add 1.5, and divide the result by 7. The
remainder will indicate the weekday....," where 0 = Sunday, and so on, then 6 =
Saturday. Well, dont try this on a calculator or computer program without first
doing some magical math. His example of 2434925 / 7 the remainder = 3, but
without dividing it long hand the answer will equal 347846.4286286. However, if
you multiplied the value right of the decimal point it would yield the correct result
of 3. To reconcile this method we can write code as follows:

Wkday= 7 * (JD / 7 - INT(JD / 7))

Example: JD for April 01, 1999 = 2451270.5 + 1.5 = 2451272

so, 7* (2451272 / 7 - INT(2451272 / 7)) = 7* 0.4286286 =3 or Wednesday

This method requires an indexed table or a bunch of if statements. Your choice.

Routine 3: Format(Now, "ddd")= Wed [VB method]

Some Interesting Web Sites:

U.S Naval Observatorys web page http://tycho.usno.navy.mil/time.html


Systems of Time: http://tycho.usno.navy.mil/systime.html
Converting from Universal Time: http://tycho.usno.navy.mil/zones.html
Compute Local Apparent Sidereal Time: http://tycho.usno.navy.mil/sidereal.html
Calendars: http://astro.nmsu.edu/~lhuber/leaphist.html
World Time Zones: http://www.worldtimezone.com/
Another World Time Zones: http://time.greenwich2000.com/info/timezone.htm
The Ephemeris of Mars
The following equations and their use can be found in the books by Jean Meeus. Tests were
created to compare the algorithms published in both editions of Astronomical Formulas for
Calculators , 2nd edition and Astronomical Algorithms, 1st edition. Ephemeris programs using
the older methods: "Elements of the Planetary Orbits" was coded to represent the "Elements for
the Mean Equinox of the Date" and then coded for the VSOP87 equations; the differences were
found to be quite close and changing to the more rigorous VSOP87 method has been determined
to be not worth the time and effort. The sacrifice in speed and ease of programming code, as well
as the increased file size does not justify changing methods.

1: Lets make a couple essential constants, (pi) and radian (rad) then set the variable
dimension statements to make room in the memory for program variable array storage:

Const PI = 3.14159265
Const rad = PI/180

Dim DT
Dim Leap As Integer
Dim Leap As Integer
Dim Pass As Integer
Dim UnivMonth As Variant
Dim UnivDay As Variant
Dim UnivYear As Variant

2: several short sub-routines for routine jobs:

Function Arccos(X)
X = (Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)) / rad
End Function

Function Arcsin(X)
X = Atn(X / Sqr(-X * X + 1)) / rad
End Function

Function NORM(X)
X = ((X / 360) - Int(X / 360)) * 360
End Function

Public Function ArcTan2(ArgY, ArgX)


Dim Q As Double
Q=1
If ArgY = 0 And ArgX >= 0 Then Q = 0
If ArgY > 0 And ArgX = 0 Then Q = 90
If ArgY = 0 And ArgX < 0 Then Q = 180
If ArgY < 0 And ArgX = 0 Then Q = 270
If Q = 1 Then
Q = 45 * Atn(ArgY / ArgX) / Atn(1)
If ArgX < 0 Then Q = Q + 180
If Q < 0 Then Q = Q + 360
End If
If Abs(Q) >= 360 Then Q = Q - 360 * Fix(Q / 360)
If Q < 0 Then Q = 360 + Q
ArcTan2 = Q

End Function

3: Compute the Julian Date or Day and the fraction of a Julian Century.

If UnivMonth <= 2 Then


Y1 = UnivYear - 1
UnivMonth1 = UnivMonth + 12
Else
Y1 = UnivYear
UnivMonth1 = UnivMonth
End If
JulianDate = Int(365.25 * (Y1 + 4716)) + Int(30.6001 * (UnivMonth1 + 1))
+ UnivDay + (2 - Int(Y1 / 100) + Int(Int(Y1 / 100) / 4)) - 1524.5
JuDt = JulianDate + UT / 24 + DT / 86400
T = (JulianDate - 2415020) / 36525
T2 = T * T
T3 = T * T * T

4. Begin with some elements of Earth:

Eearth = 0.01675104 - 0.0000418 * T - 0.000000126 * T2


EPearth = 23.452294 - 0.0130125 * T - 0.00000164 * T2 + 0.000000503 * T3
MEarth = 358.475845 + 35999.04975 * T - 0.00015 * T2 - 0.0000033 * T3
Call NORM(MEarth)
Cearth = (1.91946 - 0.004789 * T - 0.000014 * T2) * Sin(rad * MEarth) + (0.020094 - 0.0001 * T)
* Sin(rad * 2 * MEarth)
+ 0.000293 * Sin(rad * 3 * MEarth)
AH = 153.23 + 22518.7541 * T
BH = 216.57 + 45037.5082 * T
CH = 312.69 + 32964.3577 * T
DH = 350.74 + 445267.1142 * T - 0.00144 * T2
EH = 231.19 + 20.2 * T
HH = 353.4 + 65928.7155 * T
Learth = 279.6966778 + 36000.768925 * T + 0.0003025 * T2
Call NORM(Learth)
TH = Learth + Cearth
TH = TH + 0.00134 * Cos(rad * AH) + 0.00154 * Cos(rad * BH) + 0.002 * Cos(rad * CH) +
0.00179 * Sin(rad * DH) + 0.00178 * Sin(rad * EH)
Call NORM(TH)
NU = MEarth + Cearth
Call NORM(NU)
Rearth = 1.00000023 * (1 - Eearth * Eearth) / (1 + Eearth * Cos(rad * NU))
Rearth = Rearth + 0.00000543 * Sin(rad * AH) + 0.00001575 * Sin(rad * BH) + 0.00001627 *
Sin(rad * CH)
+ 0.00003076 * Cos(rad * DH) + 0.00000927 * Sin(rad * HH)

5: We begin with computing the mean anomalies for Earth, Mars and Jupiter, a correction
for Mars, and Venus:

Emars = 0.09331289 + 0.000092064 * T - 0.000000077 * T2


Imars = 1.850333 - 0.000675 * T + 0.0000126 * T2
Omars = 48.786442 + 0.77099177 * T - 0.0000014 * T2 - 0.00000533 * T3
Mvenus = 212.60322 + 58517.80387 * T + 0.001286 * T2
Call NORM(Mvenus)
Mmars = 319.51913 + 19139.85475 * T + 0.000181 * T2
Call NORM(Mmars)
Mjupiter = 225.32833 + 3034.69202 * T - 0.0007220001 * T2
Call NORM(Mjupiter)

6: equations for heliocentric longitude etc.

DM = rad * (3 * Mjupiter - 8 * Mmars + 4 * MEarth)


Mmars = Mmars - 0.01133 * Sin(DM) - 0.00933 * Cos(DM)
Lmars = 293.737333 + 19141.69551 * T + 0.0003107 * T2
Call NORM(Lmars)
E = Mmars + ((Emars / rad) * Sin(rad * Mmars)) / (1 - Emars *Cos(rad * Mmars))
NV = (2 / rad) * Atn(Tan(rad * E / 2) * Sqr((1 + Emars) / (1 - Emars)))

7: Calculate the distance to Mars from Sun:

Rmars = 1.5236833 * (1 - Emars * Cos(rad * E))


Rmars = Rmars + 0.000053227 * Cos(rad * (Mjupiter - Mmars + 41.1306))
Rmars = Rmars + 0.000050989 * Cos(rad * (2 * Mjupiter - 2 * Mmars - 101.9847))
Rmars = Rmars + 0.000038278 * Cos(rad * (2 * Mjupiter - Mmars - 98.3292))
Rmars = Rmars + 0.000015996 * Cos(rad * (Mearth - Mmars - 55.555))
Rmars = Rmars + 0.000014764 * Cos(rad * (2 * Mearth - 3 * Mmars + 68.622))
Rmars = Rmars + 0.000008966 * Cos(rad * (Mjupiter - 2 * Mmars + 43.615))
Rmars = Rmars + 0.000007914 * Cos(rad * (3 * Mjupiter - 2 * Mmars - 139.737))
Rmars = Rmars + 0.000007004 * Cos(rad * (2 * Mjupiter - 3 * Mmars - 102.888))
Rmars = Rmars + 0.00000662 * Cos(rad * (Mearth - 2 * Mmars + 113.202))
Rmars = Rmars + 0.00000493 * Cos(rad * (3 * Mjupiter - 3 * Mmars - 76.243))
Rmars = Rmars + 0.000004693 * Cos(rad * (3 * Mearth - 5 * Mmars + 190.603))
Rmars = Rmars + 0.000004571 * Cos(rad * (2 * Mearth - 4 * Mmars + 244.702))
Rmars = Rmars + 0.000004409 * Cos(rad * (3 * Mjupiter - Mmars - 115.828))

8: Heliocentric longitude and latitude.

u = Lmars + NV - Mmars - Omars


Call NORM(u)
b = Sin(rad * u) * Sin(rad * Imars)
Call Arcsin(b)
LO = ArcTan2(Cos(rad * Imars) * Sin(rad * u), Cos(rad * u))
LM = LO
LO = LO + Omars
LO = LO + 0.00705 * Cos(rad * (Mjupiter - Mmars - 48.958))
LO = LO + 0.00607 * Cos(rad * (2 * Mjupiter - Mmars - 188.35))
LO = LO + 0.00445 * Cos(rad * (2 * Mjupiter - 2 * Mmars - 191.897))
LO = LO + 0.00388 * Cos(rad * (Mearth - 2 * Mmars + 20.495))
LO = LO + 0.00238 * Cos(rad * (Mearth - Mmars + 35.097))
LO = LO + 0.00204 * Cos(rad * (2 * Mearth - 3 * Mmars + 158.638))
LO = LO + 0.00177 * Cos(rad * (3 * Mmars - Mvenus - 57.602))
LO = LO + 0.00136 * Cos(rad * (2 * Mearth - 4 * Mmars + 154.093))
LO = LO + 0.00104 * Cos(rad * (Mjupiter + 17.618))
Call NORM(LO)
9: The Distance from Earth to Mars, apparent diameter, phase angle (I2),phase (phase) and
visual magnitude:

DA = Sqr(Rearth * Rearth + Rmars * Rmars + (2 * Rmars * Rearth) * Cos(rad * B) * Cos(rad * (LO


- TH)))
DI = 9.366 / DA
I2 = (Rmars * Rmars + DA * DA - Rearth * Rearth) / (2 * Rmars * DA)
Call Arccos(I2)
MG = -1.52 + 2.171472 * Log(Rmars * DA) + 0.01486 * I2

10: These equations find the elongation, right ascension and declination of Mars:

If TH < LO And TH > (LO - 180) Or TH > (LO + 180) Then cc = "E" Else cc = "W"
LT = ArcTan2(Rmars * Cos(rad * b) * Sin(rad * (LO - TH)), Rmars * Cos(rad * b) * Cos(rad * (LO -
TH)) + Rearth)
LA = LT + TH
Call NORM(LA)
BA = Rmars * Sin(rad * B) / DA
Call Arcsin(BA)
EL = Cos(rad * BA) * Cos(rad * LT)
Call Arccos(EL)
RA = ArcTan2(Sin(rad * LA) * Cos(rad * EPearth) - Tan(rad * BA) * Sin(rad * EPearth), Cos(rad *
LA))
RH = Int(RA / 15)
RM = 4 * (RA - 15 * RH)
RS = (RM - Int(RM)) * 60
RM = Int(RM): RS = Int(RS)
RightAsc = Format(TimeSerial(RH, RM, RS), " hh:nn")
DC = Sin(rad * BA) * Cos(rad * EPearth) + Cos(rad * BA) * Sin(rad * EPearth) * Sin(rad * LA)
Call Arcsin(DC)

11. Equations for physical ephemeris of Mars:

N0 = ArcTan2(Sin(rad * Imars) * Sin(rad * Omars), Cos(rad * Imars) * Sin(rad * EPearth) + Sin(rad


* Imars) * Cos(rad * EPearth) * Cos(rad * Omars))
J = Cos(rad * Imars) * Cos(rad * EPearth) - Sin(rad * Imars) * Sin(rad * EPearth) * Cos(rad *
Omars)
Call Arccos(J)
O6 = ArcTan2(Sin(rad * EPearth) * Sin(rad * Omars), Sin(rad * Imars) * Cos(rad * EPearth) +
Cos(rad * Imars) * Sin(rad * EPearth) * Cos(rad * Omars))
TT = UnivYear - 1905
A0 = 316.55 + 0.00675 * TT
D0 = 52.85 + 0.003479 * TT

Alternate method for J2000 and VSOP87:


A0 = 317.68143 + 0.6833865 * T
D0 = 52.8865 + 0.3580977 * T

O9 = ArcTan2(Cos(rad * D0) * Cos(rad * (N0 - A0)), -Sin(rad * D0) * Sin(rad * J) + Cos(rad * D0) *
Cos(rad * J) * Sin(rad * (N0 - A0)))
Ls = LM - O9 + O6
Call NORM(Ls)

Alternate method for Longitude of the Sun (Ls) [J1900]:


MJD = JuDt 2415020
Ls = 209.8815 + 0.5240384 * MJD
Ls = Ls + (10.6912 + 0.00000037 * MJD) * Sin(rad * Mmars)
Ls = Ls + 0.6228 * Sin(rad * (2 * Mmars))
Ls = Ls + 0.0503 * Sin(rad * (3 * Mmars))
Ls = Ls + 0.0046 * Sin(rad * (4 * Mmars))
Ls = Ls + 0.0005 * Sin(rad * (5 * Mmars))
Call NORM(Ls)

De = -Sin(rad * D0) * Sin(rad * DC) - Cos(rad * D0) * Cos(rad * DC) * Cos(rad * (A0 - RA))
Call Arcsin(De)
D6 = ArcTan2(Sin(rad * J) * Cos(rad * (N0 - A0)), Cos(rad * D0) * Cos(rad * J) - Sin(rad * D0) *
Sin(rad * J) * Sin(rad * (N0 - A0)))
A3 = ArcTan2((Cos(rad * D0) * Sin(rad * DC) - Sin(rad * D0) * Cos(rad * DC) * Cos(rad * (A0 -
RA))) / Cos(rad * De), -Cos(rad * DC) * Sin(rad * (A0 - RA)) / Cos(rad * De))
A4 = A3 - D6
Call NORM(A4)
A8 = ArcTan2(Cos(rad * EPearth) * Sin(rad * TH), Cos(rad * TH))
P8 = ArcTan2(Cos(rad * D0) * Sin(rad * (A0 - RA)), Sin(rad * D0) * Cos(rad * DC) - Cos(rad * D0)
* Sin(rad * DC) * Cos(rad * (A0 - RA)))
S2 = ArcTan2(Sin(rad * TH) * Cos(rad * EPearth), Cos(rad * TH))
S3 = Sin(rad * EPearth) * Sin(rad * TH)
Call Arcsin(S3)
T8 = ArcTan2(Cos(rad * S3) * Sin(rad * (S2 - RA)) / Sin(rad * EL), (Sin(rad * S3) * Cos(rad * DC) -
Cos(rad * S3) * Sin(rad * DC) * Cos(rad * (S2 - RA))) / Sin(rad * EL))
Q = T8 + 180
Call NORM(Q)

12. Find Central Meridian of Mars:

MCM = 350.891962 / 86400!


V1 = 329.499 + 350.891962 * (JuDt - 2418322)
Call NORM(V1)
CM = V1 - A4 - 180 - 2.026612 * DA + (DT * MCM)
Call NORM(CM)

13. Printout formats to file:

txtEL = Format$(Format$(EL, "##0.0"), "@@@@@@@") + CC


txtRA = RightAsc
txtDC = Format$(Format$(DC, "0.0"), "@@@@@@")
txtDA = Format(DA, " 0.000")
txtLs = Format$(Format$(Ls, "###.0"), "@@@@@@@")
txtDe = Format$(Format$(De, "0.0"), "@@@@@@")
txtDs = Format$(Format$(Ds, "0.0"), "@@@@@@")
txtPD = Format$(Format$(phase, "0.000"), "@@@@@@@")
txtPhAngle = Format$(Format$(I2, "0.0"), "@@@@@@")
txtQ = Format$(Format$(Q, "##0.0"), "@@@@@@@")
txtP8 = Format$(Format$(P8, "##0.0"), "@@@@@@@")
txtDI = Format$(Format$(DI, "0.0"), "@@@@@@")
If MG < 0 Then MGGN = " -" Else MGGN = " "
txtMG = MGGN + Format(Abs(MG), "0.0")
txtCM = Format$(Format$(CM, "##0.0"), "@@@@@@@")
If PASS = 0 Then
Print #1, " " + txtUnivDate + txtEL + txtRA + txtDC + txtDA + txtLs + txtDe + txtDs + txtPD +
txtPhAngle + txtQ + txtP8 + txtDI + txtMG + txtCM
Else
Print #1, " "
Print #1, " Date Elong R.A. Dec Dist Ls De Ds --Phase-- Defect Axis
Size Mag CM"
Print #1, " yyyy-mmm-dd o hh:mm o A.U. o o o k i o o ,, (v)
o"
Print #1, " " + txtUnivDate + txtEL + txtRA + txtDC + txtDA + txtLs + txtDe + txtDs + txtPD +
txtPhAngle + txtQ + txtP8 + txtDI + txtMG + txtCM
PASS = 0
End If

Printout as desired.

Elongation (EL), phase angle (I2) and phase (phase): Mars to Sun distance (Rmars), Earth
to Mars distance (DA), and Earth to the Sun distance (Rearth):

EL = (Rearth * Rearth + DA * DA - Rmars * Rmars) / (2 * DA * Rearth) Call Arccos(EL)


I2 = (Rmars * Rmars + DA * DA - Rearth * Rearth) / (2 * Rmars * DA) Call Arccos(I2)
phase = ((Rmars + DA) ^ 2 - Rearth ^ 2) / (4 * Rmars * DA)

Alternate method #1 for Longitude of the Sun (Ls) [J2000]:

MJD = JuDt - 2451545


Mmars = 19.41 + 0.5240212 * MJD
Ls = 270.3863 + 0.5240384 * MJD
Ls = Ls + (10.691 + 0.00000037 * MJD) * Sin(rad * Mmars)
Ls = Ls + 0.6228 * Sin(rad * 2 * Mmars)
Ls = Ls + 0.0503 * Sin(rad * 3 * Mmars)
Ls = Ls + 0.0046 * Sin(rad * 4 * Mmars)
Ls = Ls + 0.0005 * Sin(rad * 5 * Mmars)
Call NORM(Ls)

Alternate method #2 for Longitude of the Sun (Ls) [J2000]:

MJD = JuDt - 2451545


Mmars = 19.373 + 0.52402068 * MJD
Cmars = (10.6912 + 0.00000037 * MJD) * Sin(rad * Mmars)
Cmars = Cmars + 0.6228 * Sin(rad * 2 * Mmars)
Cmars = Cmars + 0.0503 * Sin(rad * 3 * Mmars)
Cmars = Cmars + 0.0046 * Sin(rad * 4 * Mmars)
Cmars = Cmars + 0.0005 * Sin(rad * 5 * Mmars)
vmars = Cmars + Mmars
Call NORM(vmars)
Ls = vmars + 70.9812 + 180
Call NORM(Ls)

Alternate method for Central Meridian (CM) [J2000]:

ro = 0.0057755183 * DA)
W = 11.504 + 350.89200025 * (JulianDate + UT / 24 - ro - 2433282.5))
Call NORM(W)
k = ArcTan2(Sin(rad * D0) * Cos(rad * DC) * Cos(rad * (A0 - RA)) - Sin(rad * DC) * Cos(rad *
D0), Cos(rad * DC) * Sin(rad * (A0 - RA)))
CM = W - k
Call NORM(CM)

NOTE: Above equations D6, A3 and A4 not needed with this method.

Das könnte Ihnen auch gefallen