#include <JulianDate.h>
Public Methods | |
| JulianDate (int An, int Me, int Gio, double utc) | |
| Initialize from:. More... | |
| JulianDate (double jd) | |
| conversion constructor. More... | |
| operator double () const | |
| allow to be treated as a double, for arithmetic for example. More... | |
| double | seconds () const |
Public Attributes | |
| enum | secondsPerDay = 60*60*24 } |
Private Attributes | |
| double | m_JD |
Julian dates (abbreviated JD) are a continuous count of days and fractions since noon Universal Time on January 1, 4713 BCE (on the Julian calendar).
Definition at line 18 of file JulianDate.h.
|
||||||||||||||||||||
|
Initialize from:.
Definition at line 43 of file JulianDate.h. 00044 {
00045 if (Me > 2);
00046 else {
00047 An = An - 1;
00048 Me = Me + 12;
00049 }
00050 int A = (An / 100);
00051 int B = 2 - A + (A / 4);
00052 long int C = (long int)(365.25 * An);
00053 if (An < 0) C = C - 1;
00054 int D = (int)(30.6001 * (Me + 1));
00055 m_JD = B + C + D + Gio + 1720994.5+ utc / 24.;
00056 }
|
|
|
conversion constructor.
Definition at line 30 of file JulianDate.h. 00030 :m_JD(jd){} |
|
|
allow to be treated as a double, for arithmetic for example.
Definition at line 33 of file JulianDate.h. 00033 {return m_JD;}
|
|
|
Definition at line 35 of file JulianDate.h. 00035 { return m_JD* secondsPerDay;}
|
|
|
Definition at line 40 of file JulianDate.h. |
|
|
Definition at line 37 of file JulianDate.h. |
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001