'****************************************************** '* This program caculates the absolute stellar * '* based on relative magintude and distance * '* -------------------------------------------------- * '* SAMPLE RUN: * '* * '* To calculate absolute stellar magnitude: * '* Give relative mag. and distance in parsecs: 10, 3 * '* * '* A star with relative magnitude 10 * '* at a distance of 3 parsecs * '* has an absolute magnitude of 12.61 * '* * '* -------------------------------------------------- * '* Ref.: "Problem Solving with Fortran 90 By David R. * '* Brooks, Springer-Verlag New York, 1997". * '* * '* Basic Release By J-P Moreau, Paris. * '* (www.jpmoreau.fr) * '****************************************************** ' Explanations; ' ------------ ' The absolute magnitude M of a star is related to its ' relative magnitude m and and the distance to a star r, ' measured in parsecs, where 1 parsec = 3.26 light years, ' by the equation: ' ' M = m + 5 - 5 log10(r) ' ' According to this equation, a star with a relative ' magnitude of +1 at a distance of 10 parsecs has an ' absolute magnitude of +1. The larger the magnitude, the ' dimmer the star. Sirius is a very bright star with a ' relative magnitude of -1.58. Stars visible to the naked ' eye range mostly from about +1 to +6 in relative magni- ' tude. ' The dimmest star that can be seen with the 200-inch ' Hale telescope has a magnitude of about +23. '-------------------------------------------------------- CLS PRINT PRINT " To calculate absolute stellar magnitude:" INPUT " Give relative mag. and distance in parsecs: ", relmag, parsecs absmag = relmag + 5! - 5! * LOG(parsecs) / 2.302585 F\$ = "###.##" PRINT PRINT " A star with relative magnitude "; relmag PRINT " at a distance of "; parsecs; " parsecs" PRINT " has an absolute magnitude of "; PRINT USING F\$; absmag PRINT END 'end of file starmag.bas