Lines Matching defs:CalendarAstronomer
103 const double CalendarAstronomer::SYNODIC_MONTH = 29.530588853;
201 const double CalendarAstronomer::PI = 3.14159265358979323846;
203 #define CalendarAstronomer_PI2 (CalendarAstronomer::PI*2.0)
204 #define RAD_HOUR ( 12 / CalendarAstronomer::PI ) // radians -> hours
205 #define DEG_RAD ( CalendarAstronomer::PI / 180 ) // degrees -> radians
206 #define RAD_DEG ( 180 / CalendarAstronomer::PI ) // radians -> degrees
222 return normalize(angle, CalendarAstronomer::PI * 2.0);
229 return normalize(angle + CalendarAstronomer::PI, CalendarAstronomer::PI * 2.0) - CalendarAstronomer::PI;
237 * Construct a new <code>CalendarAstronomer</code> object that is initialized to
242 CalendarAstronomer::CalendarAstronomer():
248 * Construct a new <code>CalendarAstronomer</code> object that is initialized to
253 CalendarAstronomer::CalendarAstronomer(UDate d): fTime(d), fLongitude(0.0), fLatitude(0.0), fGmtOffset(0.0), moonPosition(0,0), moonPositionSet(FALSE) {
258 * Construct a new <code>CalendarAstronomer</code> object with the given
272 CalendarAstronomer::CalendarAstronomer(double longitude, double latitude) :
280 CalendarAstronomer::~CalendarAstronomer()
289 * Set the current date and time of this <code>CalendarAstronomer</code> object. All
300 void CalendarAstronomer::setTime(UDate aTime) {
307 * Set the current date and time of this <code>CalendarAstronomer</code> object. All
321 void CalendarAstronomer::setJulianDay(double jdn) {
328 * Get the current time of this <code>CalendarAstronomer</code> object,
337 UDate CalendarAstronomer::getTime() {
342 * Get the current time of this <code>CalendarAstronomer</code> object,
351 double CalendarAstronomer::getJulianDay() {
366 double CalendarAstronomer::getJulianCentury() {
378 double CalendarAstronomer::getGreenwichSidereal() {
390 double CalendarAstronomer::getSiderealOffset() {
405 double CalendarAstronomer::getLocalSidereal() {
418 double CalendarAstronomer::lstToUT(double lst) {
444 CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(CalendarAstronomer::Equatorial& result, const CalendarAstronomer::Ecliptic& ecliptic)
459 CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(CalendarAstronomer::Equatorial& result, double eclipLong, double eclipLat)
489 CalendarAstronomer::Equatorial& CalendarAstronomer::eclipticToEquatorial(CalendarAstronomer::Equatorial& result, double eclipLong)
498 CalendarAstronomer::Horizon& CalendarAstronomer::eclipticToHorizon(CalendarAstronomer::Horizon& result, double eclipLong)
503 double H = getLocalSidereal()*CalendarAstronomer::PI/12 - equatorial.ascension; // Hour-angle
526 // Angles are in radians (after multiplying by CalendarAstronomer::PI/180)
530 #define SUN_ETA_G (279.403303 * CalendarAstronomer::PI/180) // Ecliptic longitude at epoch
531 #define SUN_OMEGA_G (282.768422 * CalendarAstronomer::PI/180) // Ecliptic longitude of perigee
534 //double sunTheta0 (0.533128 * CalendarAstronomer::PI/180) // Angular diameter at R0
622 double CalendarAstronomer::getSunLongitude()
636 /*public*/ void CalendarAstronomer::getSunLongitude(double jDay, double &longitude, double &meanAnomaly)
664 CalendarAstronomer::Equatorial& CalendarAstronomer::getSunPosition(CalendarAstronomer::Equatorial& result) {
676 /*double CalendarAstronomer::VERNAL_EQUINOX() {
687 double CalendarAstronomer::SUMMER_SOLSTICE() {
688 return (CalendarAstronomer::PI/2);
698 /*double CalendarAstronomer::AUTUMN_EQUINOX() {
699 return (CalendarAstronomer::PI);
709 double CalendarAstronomer::WINTER_SOLSTICE() {
710 return ((CalendarAstronomer::PI*3)/2);
713 CalendarAstronomer::AngleFunc::~AngleFunc() {}
721 class SunTimeAngleFunc : public CalendarAstronomer::AngleFunc {
724 virtual double eval(CalendarAstronomer& a) { return a.getSunLongitude(); }
729 UDate CalendarAstronomer::getSunTime(double desired, UBool next)
739 CalendarAstronomer::CoordFunc::~CoordFunc() {}
741 class RiseSetCoordFunc : public CalendarAstronomer::CoordFunc {
744 virtual void eval(CalendarAstronomer::Equatorial& result, CalendarAstronomer&a) { a.getSunPosition(result); }
749 UDate CalendarAstronomer::getSunRiseSet(UBool rise)
1047 #define moonL0 (318.351648 * CalendarAstronomer::PI/180 ) // Mean long. at epoch
1048 #define moonP0 ( 36.340410 * CalendarAstronomer::PI/180 ) // Mean long. of perigee
1049 #define moonN0 ( 318.510107 * CalendarAstronomer::PI/180 ) // Mean long. of node
1050 #define moonI ( 5.145366 * CalendarAstronomer::PI/180 ) // Inclination of orbit
1055 #define moonT0 ( 0.5181 * CalendarAstronomer::PI/180 ) // Angular size at distance A
1056 #define moonPi ( 0.9507 * CalendarAstronomer::PI/180 ) // Parallax at distance A
1064 const CalendarAstronomer::Equatorial& CalendarAstronomer::getMoonPosition()
1117 double variation = 0.6583*CalendarAstronomer::PI/180 * ::sin(2*(moonLongitude - sunLongitude));
1154 double CalendarAstronomer::getMoonAge() {
1181 double CalendarAstronomer::getMoonPhase() {
1193 const CalendarAstronomer::MoonAge CalendarAstronomer::NEW_MOON() {
1194 return CalendarAstronomer::MoonAge(0);
1203 /*const CalendarAstronomer::MoonAge CalendarAstronomer::FIRST_QUARTER() {
1204 return CalendarAstronomer::MoonAge(CalendarAstronomer::PI/2);
1213 const CalendarAstronomer::MoonAge CalendarAstronomer::FULL_MOON() {
1214 return CalendarAstronomer::MoonAge(CalendarAstronomer::PI);
1223 class MoonTimeAngleFunc : public CalendarAstronomer::AngleFunc {
1226 virtual double eval(CalendarAstronomer&a) { return a.getMoonAge(); }
1231 /*const CalendarAstronomer::MoonAge CalendarAstronomer::LAST_QUARTER() {
1232 return CalendarAstronomer::MoonAge((CalendarAstronomer::PI*3)/2);
1245 UDate CalendarAstronomer::getMoonTime(double desired, UBool next)
1265 UDate CalendarAstronomer::getMoonTime(const CalendarAstronomer::MoonAge& desired, UBool next) {
1269 class MoonRiseSetCoordFunc : public CalendarAstronomer::CoordFunc {
1272 virtual void eval(CalendarAstronomer::Equatorial& result, CalendarAstronomer&a) { result = a.getMoonPosition(); }
1283 UDate CalendarAstronomer::getMoonRiseSet(UBool rise)
1297 UDate CalendarAstronomer::timeOfAngle(AngleFunc& func, double desired,
1340 // CalendarAstronomer.timeOfAngle() diverging: 1.348508727575625E9 ->
1365 UDate CalendarAstronomer
1414 double CalendarAstronomer::eclipticObliquity() {
1434 void CalendarAstronomer::clearCache() {
1466 /*UDate CalendarAstronomer::local(UDate localMillis) {
1478 UnicodeString CalendarAstronomer::Ecliptic::toString() const
1489 UnicodeString CalendarAstronomer::Equatorial::toString() const
1501 UnicodeString CalendarAstronomer::Horizon::toString() const