#!/opt/perl/bin/perl # Simple calculations for solar system $pi = 3.1415926532; $d2r = $pi/180.0; # to convert degrees to radians $c = 2.99792458E08; # light velocity $a = 0.5330555555; # angular size of Sun $sundia = 1392700; # absolute size of Sun km $x = sin(0.5*$a*$d2r)/cos(0.5*$a*$d2r); # tan(omega/2) $L = 0.5*$sundia/$x; # distance of Sun to Earth $l2r = 2.0*$L/$sundia; $t = 1000.0*$L/$c; # travelling time of the light from Sun to Earth $t2 = $t - 480.0; # 8 minutes plus t2 sec $w = 2.0*$pi*$L; # total length of orbit $w2 = $w/365.25; # the way travelled a day $w3 = $w2/24.0/3.6; # the average orbital tangential speed $ov = 360.0/365.25; # the angular speed degrees a day $v2 = 2.0*$w3*sin(0.5*$d2r*$ov); # the radial speed $accel = $v2/24.0/3600.0; $G = $accel*$l2r*$l2r; $g = 9.811; # The next page is necessary for CGI purpose to make it work: print "Content-type: text/plain\n\n"; print "The size of Sun and distance from Earth:\n"; print "Diameter of Sun $sundia km \n"; printf ("Angular diameter of Sun as seen from Earth, omega = %3.6f degr\n",$a); print "Distance of Sun from earth L = Sun radius". "/tan(omega/2)="; printf ("%10.0f km \n",$L); print "\nLight velocity = $c m/s\n"; printf("Light migrates in %5.1f sec = 8 minutes %2.1f sec from Sun to Earth\n",$t,$t2); print "\nWe calculate now the acceleration of Earth toward Sun:\n"; print "We assume a circular orbit with constant speed of Earth to make it easier to calculate.\n"; printf("Earth travels 2pi*L = %10.3E km around the Sun during a year\n",$w); printf("This is in average %10.3E km during a day\n",$w2); printf("This corresponds to an average velocity %6.0f m/s\n",$w3); printf("Earth travels a = %1.4f degrees a day around the Sun \n",$ov); print "Earth is falling with a constant speed v2 towards Sun.\n"; printf ("v2 = 2v1*sin(a/2) = %4.1f m/s\n",$v2); print "The speed v2 is caused by the acceleration a1 of Earth toward Sun \n"; printf ("a1 = v2/24 hours = %2.3E m/s^2\n",$accel); print "\nNext we calculate gravitation G on the surface of Sun:\n"; print "G is increasing in proportion to the square of the decreasing distance to Sun.\n"; printf ("Distance of Sun from Earth L = %4.2f x Sun radius \n",$l2r); printf ("G = a1*(L / Sun radius)^2 = %2.3E*%4.2f^2 = %4.3f m/s^2\n",$accel,$l2r,$G); printf ("G = %3.2f x g on Earth (%3.3f m/s^2)\n",$G/$g,$g);