[Kstars-devel] KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Sun Nov 20 09:12:14 CET 2005


SVN commit 481720 by harris:

Add comments explaining the light-travel delay in some solar-system classes

CCMAIL: kstars-devel at kde.org



 M  +2 -1      jupitermoons.cpp  
 M  +4 -1      ksplanet.cpp  
 M  +3 -1      kssun.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/jupitermoons.cpp #481719:481720
@@ -89,8 +89,9 @@
 	Zj = Jupiter->rsun() * sinJB;
 	
 	//Distance and light-travel delay time:
+	//0.0057755183 is the inverse of the speed of light, in days/AU
 	Rj = sqrt(Xj*Xj +Yj*Yj + Zj*Zj );
-	tdelay = 0.0057755183*Rj;
+	tdelay = 0.0057755183*Rj;  //light travel delay, in days
 	
 	LAMBDA = atan(Yj/Xj);
 	if (Xj < 0) LAMBDA += dms::PI; //resolve atan ambiguity
--- trunk/KDE/kdeedu/kstars/kstars/ksplanet.cpp #481719:481720
@@ -248,7 +248,10 @@
 
 			//distance from Earth
 			dst = sqrt(x*x + y*y + z*z);
-
+			
+			//The light-travel time delay, in millenia
+			//0.0057755183 is the inverse speed of light, 
+			//in days/AU
 			double delay = (.0057755183 * dst) / 365250.0;
 
 			jm = num->julianMillenia() - delay;
--- trunk/KDE/kdeedu/kstars/kstars/kssun.cpp #481719:481720
@@ -44,8 +44,10 @@
 		// So don't bother to iterate like KSPlanet does. Just subtract
 		// The current delay and recompute (once).
 		//
+	  
+		//The light-travel time delay, in millenia
+		//0.0057755183 is the inverse speed of light, in days/AU
 		double delay = (.0057755183 * Earth->rsun()) / 365250.0;
-
 		//
 		// MHH 2002-02-04 I don't like this. But it avoids code duplication.
 		// Maybe we can find a better way.


More information about the Kstars-devel mailing list