[Kstars-devel] kdeedu/kstars/kstars

Pablo de Vicente pvicentea at wanadoo.es
Wed Sep 3 11:51:28 CEST 2003


CVS commit by pvicente: 

The atmospheric refraction at the horizon shifts altitude by
- 34 arcmin = 0.5667 degrees. This value changes if the observer
is above the horizon, or if the weather conditions change.

For the sun we have to add half the angular sie of the body, since
the sunset is the time the upper limb of the sun disappears below
the horizon, and dawn, when the upper part of the limb appears
over the horizon. The angular size of the sun = angular size of the
moon = 31' 59''.

So for the sun the correction is = -34 - 16 = 50 arcmin = -0.8333

This same correction should be applied to the Moon however parallax
is important here. Meeus states that the correction should be
0.7275 P - 34 arcmin, where P is the moon's horizontal parallax.
He proposes a mean value of +0.125 degrees if no great accuracy
is needed.

 Changed "if" condition, because I had exchanged the Sun and the stellar 
cases and added a bigger comment explaining why we use these values.

CCMAIL:kstars-devel at kde.org


  M +25 -5     skyobject.cpp   1.32
  M +5 -3      skyobject.h   1.30


--- kdeedu/kstars/kstars/skyobject.cpp  #1.31:1.32
@@ -227,5 +227,5 @@ dms SkyObject::transitAltitude( long dou
 double SkyObject::approxHourAngle ( const dms *h0, const dms *gLat, const dms *dec ) {
 
-        double sh0 = - sin ( h0->radians() );
+        double sh0 = sin ( h0->radians() );
         double r = (sh0 - sin( gLat->radians() ) * sin(dec->radians() ))
                  / (cos( gLat->radians() ) * cos( dec->radians() ) );
@@ -237,10 +237,30 @@ double SkyObject::approxHourAngle ( cons
 
 dms SkyObject::elevationCorrection(void) {
+
+        /* The atmospheric refraction at the horizon shifts altitude by 
+         * - 34 arcmin = 0.5667 degrees. This value changes if the observer
+         * is above the horizon, or if the weather conditions change much.
+         *
+         * For the sun we have to add half the angular sie of the body, since
+         * the sunset is the time the upper limb of the sun disappears below
+         * the horizon, and dawn, when the upper part of the limb appears 
+         * over the horizon. The angular size of the sun = angular size of the
+         * moon = 31' 59''. 
+         *
+         * So for the sun the correction is = -34 - 16 = 50 arcmin = -0.8333
+         *
+         * This same correction should be applied to the moon however parallax
+         * is important here. Meeus states that the correction should be 
+         * 0.7275 P - 34 arcmin, where P is the moon's horizontal parallax. 
+         * He proposes a mean value of 0.125 degrees if no great accuracy 
+         * is needed.
+         */
+
         if ( name() == "Sun"  )
-                return dms(0.5667);
+                return dms(-0.8333);
         else if ( name() == "Moon" )
-                return dms(0.125); // a rough approximation
-        else
-                return dms(0.8333);
+                return dms(0.125);       
+        else                             // All sources point-like.
+                return dms(-0.5667);
 }
 

--- kdeedu/kstars/kstars/skyobject.h  #1.29:1.30
@@ -252,9 +252,11 @@ private:
 /**Correct for the geometric altitude of the center of the body at the
         *time of rising or setting. This is due to refraction at the horizon
-        *and to the size of the body. The moon correction is only a rough
-        *approximation.
+        *and to the size of the body. The moon correction has also to take into
+        *account parallax. The value we use here is a rough approximation
+        *suggeted by J. Meeus.
         *
         *Weather status (temperature and pressure basically) is not taken
-        *into account.
+        *into account although change of conditions between summer and 
+        *winter could shift the times of sunrise and sunset by 20 seconds.
         *
         *This function is only used by auxRiseSetTimeLST().




More information about the Kstars-devel mailing list