LUATOOLS: parsec addition

Discuss Celestia's features, adaptations and Addons for use in educational environments
Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

LUATOOLS: parsec addition

Post #1by Fenerit » 22.12.2009, 23:51

My little contribution for whom the distances in parsec wants. km to parsec value is as found in astro.h.


Image
Image
Image

Require LUATOOLS 1.2 b 7. Two files only: celutil.lua and coordinatesBox.lua; just ADDED a bit of code, nothing else. No preesistent functions have been manipulated. Backup the extant first.
http://marauder.webng.com/files/lua_parsec.zip
Never at rest.
Massimo

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years
Location: Manassas, VA

Re: LUATOOLS: parsec addition

Post #2by fsgregs » 02.01.2010, 16:28

Massimo:

Thank you for the addon. I would love to use it in my Astronomy classes. However, would you be able to add a code line to the proper file to round the Kpc or pc value to 2 or 3 decimal places only? For high school kids, having the parsec distance string out to 11 significant figures is not needed.

Frank

Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: LUATOOLS: parsec addition

Post #3by Fenerit » 02.01.2010, 21:09

Hey Frank, previous link has been updated. Digits are now rounded to 4, because at least in the case of distance planets something appear; if you wish more or less, change where is "%.4f" in coordinatesBox. lua by increase of decrease the number.
Never at rest.
Massimo

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years
Location: Manassas, VA

Re: LUATOOLS: parsec addition

Post #4by fsgregs » 03.01.2010, 00:44

Hey Frank, previous link has been updated. Digits are now rounded to 4, because at least in the case of distance planets something appear; if you wish more or less, change where is "%.4f" in coordinatesBox. lua by increase of decrease the number.

Massimo, I just downloaded the prior download link and the addon is not yet updated. I'm still getting 11 significant digits, and the coordinatesBox,.lua file does not contain a string of "%.4f".

:?

Frank

Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: LUATOOLS: parsec addition

Post #5by Fenerit » 03.01.2010, 10:26

fsgregs wrote:
Hey Frank, previous link has been updated. Digits are now rounded to 4, because at least in the case of distance planets something appear; if you wish more or less, change where is "%.4f" in coordinatesBox. lua by increase of decrease the number.

Massimo, I just downloaded the prior download link and the addon is not yet updated. I'm still getting 11 significant digits, and the coordinatesBox,.lua file does not contain a string of "%.4f".

:?

Frank

Sorry Frank, my ftp loader was madness yesterday; now is really updated. I apologize.
Never at rest.
Massimo

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Re: LUATOOLS: parsec addition

Post #6by Cham » 03.01.2010, 14:31

What's the point of showing the distance, while it's already there in the HUD ? In the case of the pictures above, the distance is exactly the same on the HUD (upper left position), and below the coordinates. At least, make them in various units (sec-light, minute-light, days-light, ... to LY, and also in km in scientific notation). And add a small text saying it's the distance relative to Earth, and not to the observer (or else it would be confusing).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

Re: LUATOOLS: parsec addition

Post #7by Fenerit » 03.01.2010, 15:11

Cham wrote:What's the point of showing the distance, while it's already there in the HUD ? In the case of the pictures above, the distance is exactly the same on the HUD (upper left position), and below the coordinates. At least, make them in various units (sec-light, minute-light, days-light, ... to LY, and also in km in scientific notation). And add a small text saying it's the distance relative to Earth, and not to the observer (or else it would be confusing).

The only purpose of this small add, and that is an add is just to show that it work, was the insertion within the celutil.lua of the routine for having the distances in parsec, being this file a "collection" of astronomical functions. By these, one could find the distance in LY for clusters and galaxies, since in the HUD lack the distances in parsec for stars. Moreover parsec are referrings to the observer and not to Earth.
Never at rest.
Massimo


Return to “Celestia in Education”