Page 1 of 1
LUATOOLS: parsec addition
Posted: 22.12.2009, 23:51
by Fenerit
My little contribution for whom the distances in parsec wants. km to parsec value is as found in astro.h.
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
Re: LUATOOLS: parsec addition
Posted: 02.01.2010, 16:28
by fsgregs
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
Re: LUATOOLS: parsec addition
Posted: 02.01.2010, 21:09
by Fenerit
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.
Re: LUATOOLS: parsec addition
Posted: 03.01.2010, 00:44
by fsgregs
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
Re: LUATOOLS: parsec addition
Posted: 03.01.2010, 10:26
by Fenerit
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.
Re: LUATOOLS: parsec addition
Posted: 03.01.2010, 14:31
by Cham
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).
Re: LUATOOLS: parsec addition
Posted: 03.01.2010, 15:11
by Fenerit
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.