although I have promised to go to christmas parties and to my family (they are shopping at the moment) I started last week this little exercise for (perhaps) a new module with some sense to use it for science. this first issue is hold very, very simple for using.
Astronimical Units (Astronomische Einheit: ae) is a fixed value. but it's easy to make some calculations for it. the glossary about astronomical units (au) you find in the thinbasic script file and some links too.
have fun with it. for next month I will check to make a gui for it with chance for user inputs.
'test module for astronomische einheit (astronomical unit) by largo_winch, 21.12.2011
'http://de.wikipedia.org/wiki/Astronomische_Einheit
'http://neo.jpl.nasa.gov/glossary/au.html
'
'1 Astronomical Unit = 149 598 000 kilometers / 149.597.870.691 Meter.
'
'-------------->
Uses "AstroUnit"
MyFunction()
Function MyFunction()
Dim ae1 As AstroUnit
Dim ae2 As AstroUnit
Dim ae3 As AstroUnit
Dim ae4 As AstroUnit
ae1 = New AstroUnit(1,1,1)
ae2 = New AstroUnit(2,2,2)
ae3 = New AstroUnit(3,3,3)
ae4 = New AstroUnit(4,4,4)
MsgBox 0, ae1.ToString
MsgBox 0, ae2.ToString
MsgBox 0, ae3.ToString
MsgBox 0, ae4.ToString
End Function
'
'Glossary:
'
'--------->
'English:
'--------->
'ASTRONOMICAL UNIT (AU)
' 1 AU = 149,597,870.691 kilometers
'Definition: An Astronomical Unit is approximately the mean distance Between
'the Earth And the Sun. It is a derived constant And used To
'indicate distances within the solar system.
'Its formal definition is the radius of an unperturbed
'circular orbit a massless body would revolve about
'the sun In 2*(Pi)/k days (i.e., 365.2568983.... days),
'where k is defined As the Gaussian constant
'exactly equal To 0.01720209895.
'Since an AU is based On radius of a circular orbit,
'one AU is actually slightly less than the average distance
'Between the Earth And the Sun (approximately 150 million km Or 93 million miles).
'Historical Background: Tycho Brahe estimated the distance Between the
'Sun And the Earth At 8 million kilometers (5 million miles).
'Later, Johannes Kepler estimated the AU was At 24 million
'kilometers (15 million miles). In 1672, Giovanni Cassini made a much
'better estimate by Using Mars. By observing Mars from Paris
'And having a colleague, Jean Richer, also observe Mars At the
'same time In French Guiana In South America, Cassini determined
'the parallax of Mars. From that Cassini was able To calculate the
'distance from Earth To Mars, And Then the distance from Earth To the Sun.
'Cassini calculated the AU To be At 140 million kilometers (87 million miles),
'which is lower, but very close To the modern day Number.
'-------->
'GERMAN:
'-------->
'Die AE war ursprünglich definiert als die Länge der
'großen Halbachse der Erdbahn.
'Seit 1976 definiert die Internationale Astronomische Union (IAU)
'die AE als den Radius einer kreisförmigen Umlaufbahn,
'auf der ein Objekt mit vernachlässigbarer Masse und frei von Störungen
'die Sonne In 2? / k Tagen (also In etwa einem Jahr) umläuft.
'[1] Dabei ist k die Gaußsche Gravitationskonstante, deren Wert
'In Astronomischen Maßeinheiten definitionsgemäß exakt k = 0,017 202 098 95 beträgt.
'Die AE beträgt 149.597.870.691 Meter.
'Der moderne Wert wurde mittels Radar- und anderen Distanzmessungen
'von der Erde zu den Nachbarplaneten und zu Raumsonden bestimmt.
'Früher wurde die AE hauptsächlich aus feinsten Winkelmessungen (Parallaxen)
'abgeleitet, die zwischen weit entfernten Sternwarten zum Planeten Venus
'und zu erdnahen Asteroiden gemessen wurden.
'----------------------------------------------> FINE
new edit: in zip file you will find a german and an english version and source code of powerbasic "thinbasic_astroUnit.bas" example
2) @eros/petr/developer guys
in "thincore.inc" file there is a declaration like
DECLARE FUNCTION thinBasic_Parse1Number LIB "thinCore.DLL" ALIAS "thinBasic_Parse1Number" () AS EXT
DECLARE FUNCTION thinBasic_Parse2Numbers LIB "thinCore.DLL" ALIAS "thinBasic_Parse2Numbers" (Num1 AS EXT, Num2 AS EXT) AS EXT
but for "thinbasic_Parse1Number" (this function I wanted to choose, but didn't work as expected) it's better to use for future
thinBasic_Parse1Numbers (Num1 AS EXT) AS EXT
so you can use and parse this number. in "thincore.inc" I guess it's not correct. without using one parsing number that's line is correct I am thinking:
thinBasic_ParseNumber () AS EXT
bye, largo
Bookmarks