LUAPLUGIN: Ephemerides 2.0

The home for finished/released addons.
Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 3 months
Location: Thyrrenian sea

LUAPLUGIN: Ephemerides 2.0

Post #1by Fenerit » 27.03.2013, 02:25

**************************************************************************************************************
This topic has been moved here

**************************************************************************************************************


Ephemerides 2.0 for lua_plugins only.

ephem20.jpg

INSTALLATION (lua_plugins only):
- Remove all previous version of ephemerides if any.
- Unzip the "ephemerides_2.0.zip" inside the main Celestia's root. While the "ephemPref.lua" file will be extract in there, a new folder named "ephemerides" will be created under the "..celestia/extras/" folder containing all the remains files. Such folder can be moved also as subfolder of "../extras/lua_plugins/" path whithout to affect its functionality. For the insertion within the lua_plugins see the "readme.txt".

INTERFACE:
The ephemerides bar, which caption moves on screen, shows four buttons. These buttons will be active as long as the observer is within a range of ten time the Earth's radius, otherwise all buttons will be deactivated. Ephemerides infos are thought to be shown only when the observer is near the Earth and not far away, being all infos now referred to Earth and no longer to the observer everywhere he is within the Solar System like was in the previous version. Each button, aside the button 4), performs a synchronous operation for the Earth and the observer. This synchronous Earth operation will not affect the reference frame for other objects whether the observer decides to fly elsewhere, being the plugin inactive beyond such Earth's radii distance, showing just the greyed-out buttons. However, one can always press the "f" key (follow) if he wish; but in such case the infos can varying as long as the Earth is rotating about its axis.

USAGE:
In the order, from left to right:
(button 1): a "goto home" button. Such button moves the observer perpendicular on an user-defined location at the default Celestia distance of 5 * earth's radius. The location's name and its coordinates are customizable through "ephemCfg.lua" file. The name of the location can be whatever, and will be displayed close to the pointer, even though the locaton is not set like .SSC location. This button is like an "utility" to aid the user in find its "return to home" operation after having played with ephemerides for other locations on Earth. The distance and the return delay are customizables too. Note that for distance > 10 the plugin will be inactive. Default distance = 5.0; default delay = 5.0, the default Celestia's distance and gotolonglat smooth moving. Click/unclick = move to home/hide the pointer.

button 2) Physical ephemerides button. It will show several physical ephemerides for all Celestia's objects. For deepsky objects and fictionals (diffuse), just their subEarth points will be displayed. Click/unclick = show/hide infos and pointer.

button 3) Visual ephemerides and rise/set times for all Celestia's object, deepsky, fictionals and spacecrafts objects too.
The rise/set times are referred to the ground perpendicular to the observer's orbit and to stay in orbit or at ground is the same for what concern the rise/set azimuths. The only difference is that at the ground will be displayed also the real time azimuths and altitudes measurements of the selected objects. Click/unclick = show/hide infos and pointer.

button 4) Color roulette button. It change the ephemerides color for text and pointer in pseudo-random manner. All colors will be randomized but the color-sequence will be same all the time. Useful for visual purposes. The random color can be printable on a txt file for helping to find a favorite main color settable through "ephemCfg.lua" file. The main color is now set like the default Celestia's HUD color. Random colors and main color are independent. Note that if the print option is active, while the click operation write on disc the random color, the unclick operation write on disc also the main color.
Click/unclick = random color/main color.

CREDITS:
To Marco Klunder, who have shared with me the knowledge of its ObjectsRiseSet plugin, and for having solved an "interpolation issue" for fast Sun-orbiting planets (mainly Mercury and comets). The visual ephemerides in the part of the rise/set times is basically due to him. My credits with Marco are shown like comments also in the code for the Moon rise/set, being its work with the fundamental arguments (Van Flandern & Pulkkinen, 1979) and their LUA port from SKY AND TELESCOPE BASIC Sun/Moon code, originally extended thereafter to all planets including Pluto, and in which the trigonometric series were compiled until the last(!) argument prior to be bypassed under the suggestion of using the Celestia's CELX/LUA scripting for get RA, Dec. I've left its work for the Moon like a legacy of its rigorous and time-consuming task.
To Jo?l (Jogad) for finding a manageable solution for the ephemerides' bar behaviour in windowed mode;
its code has been seamlessly nested within the "ephemerisBox.lua", bringing the plugin to a next step in enhancement.

REMOVED DUE TO TROLLS

Kindly, Jo?l has fixed the bugs inadvertently introduced during the enhancement of the bar's management.
This version fix all bugs of the previous 2.3. This is the most stable version so far.

- Fixed bug concerning wrong enter in "ephemPrefs.lua". This file is no longer required to be shipped with the installation; it will be created at first start. Previous version of this file (within Celestia's root) must be deleted before to install this new pack;
- Fixed a bug which prevented to display the ephemerides bar whether the window was resized before to load the plugin;
- Fixed bug with the pointer. Now it hold the center of the screen for whatelse windowed mode.
- Modified the equinox/solstice code. Now the timezone for these latters are independent from the main timezone setting. Workaround for western Europe daylight saving time; being the equinoxes/solstice's prediction ranging the whole year, the June solstice and the September equinox would have uncorrected hours whether set with the main timezone (hope be clear the discourse). Countries without such european delirium can set them like own timezone. Default: "UTC".
- Added Dutch language (thanks to Marco Klunder).
- Minor fixes
Last edited by Fenerit on 11.08.2016, 08:11, edited 16 times in total.
Never at rest.
Massimo

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #2by Fenerit » 27.03.2013, 11:17

A thing that I've forgot to explain. For distant objects like fast revolving planetary moons or main planets theirselves, the physical ephemerides must be checked against the light travel delay LT ("_", underscore key) or the values will be shown for wrong positions; for example a moon will be shown before the planet when in real is behind. LT is not callable through CELX/LUA scripting language and thus it has been not accounted for.
Never at rest.
Massimo

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 15 years 9 months
Location: Paris France

Re: LUAPLUGIN: Ephemerides 2.0

Post #3by jogad » 28.03.2013, 17:31

Hello,

For me it is a good tool with a lot of work behind it! :)
It complements nicely the Kepler parameters and the coordinate boxes that come with Lua Plug-ins.

Just to be unpleasant :twisted: , I have two (little and very easy to fix) bugs to report:

    - The first bug is funny: just try to use your "go to home" button! You are propelled out of the Galaxy!

    - The second one is an old bug not yet fixed:
    If you downsize the Celestia window, the tool can't be moved anymore.
    And if you increase it after, you can't move the tool towards its right or bottom edges.


You are welcome to give a lot of credits to Marco: your plug-ins is indeed a serious competitor of his rise/set addon.

By the way I see with pleasure that your plug-in is localizable. :blue:
So here is the French version of the translation file.

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #4by Fenerit » 28.03.2013, 19:18

Hi, Jo?l; thanks for the French translation.
jogad wrote:It complements nicely the Kepler parameters and the coordinate boxes that come with Lua Plug-ins.
Hope a day we do assest a coherent LUA astro library for Celestia by collecting all the functions hiterto sparse here and there.

jogad wrote:Just to be unpleasant :twisted: , I have two (little and very easy to fix) bugs to report:

- The first bug is funny: just try to use your "go to home" button! You are propelled out of the Galaxy!

- The second one is an old bug not yet fixed:
If you downsize the Celestia window, the tool can't be moved anymore.
And if you increase it after, you can't move the tool towards its right or bottom edges.

The second bug I was aware even though I've forgot to mention (BTW, I've put in the pack the wrong "readme.txt" I prepared; it lack of the links and reference of the first version).
The first one instead I think is a misleading. The famous line "363 in celx_observer.cpp" like is said here is still present in the latest SVN version 5225, thus it has not been changed by the Development Team. Most probably you have change it by yourself, but the most of the users did not. I must rely on default hardcode otherwise one goes straight to center of the Earth :lol:

jogad wrote:You are welcome to give a lot of credits to Marco: your plug-ins is indeed a serious competitor of his rise/set addon.

Marco knows he is authorized to bring physical ephemerides into its ObjectsRiseSet plugin if he wish. As for is structured its plugin I cannot call its functions, otherwise I would use it like a library. The fact that I'm not in competition with Marco is that I never will port nor will be published the ephemerides for LUATOOLS. Feel free to do that by yourself for personal use only.
Never at rest.
Massimo

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 15 years 9 months
Location: Paris France

Re: LUAPLUGIN: Ephemerides 2.0

Post #5by jogad » 28.03.2013, 22:07

Fenerit wrote:The second bug I was aware even though I've forgot to mention (BTW, I've put in the pack the wrong "readme.txt" I prepared; it lack of the links and reference of the first version).
The first one instead I think is a misleading. The famous line "363 in celx_observer.cpp" like is said here is still present in the latest SVN version 5225, thus it has not been changed by the Development Team. Most probably you have change it by yourself, but the most of the users did not. I must rely on default hardcode otherwise one goes straight to center of the Earth :lol:
- For the second bug, not only mention it but fix it! I think I Know what is wrong and I e-mail you to discuss of it.

- About the first one I think it is a misleading too!
I use the true legacy Celestia downloaded from the official Celestia download home page here:
http://www.celestiaproject.net/celestia/download.html

It is the Windows version.

Probably YOU do not use the legacy version!

Take care

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #6by Fenerit » 29.03.2013, 01:29

jogad wrote:- About the first one I think it is a misleading too!
I use the true legacy Celestia downloaded from the official Celestia download home page here:
http://www.celestiaproject.net/celestia/download.html

It is the Windows version.

Probably YOU do not use the legacy version!

All this is insane. I wish see what will happen when a new official version will be compiled. Anyway, in the new "ephemCfg.lua" there is the option for both versions: official and SVN gotolonglat.

jogad wrote:- For the second bug, not only mention it but fix it! I think I Know what is wrong and I e-mail you to discuss of it.

Oh, no; I do not fix that bug. For the following reasons:
1) In switching the window from iconized to maximized, from normal to maximize and from all these latters to full screen, the bar remains where one decides to put it. If I fix that bug, it is true that the bar is moving also in very small normal windows, but when the window is then switched to full screen the bar doesn't hold its position. If a crazy one is sure to taste Celestia within small window and wish to display the bar also there, simply should place the bar on the left position of the screen. (see the email).
ephemresize.jpg


For ephemerides 2.0.1 see first post.
Never at rest.
Massimo

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 15 years 9 months
Location: Paris France

Re: LUAPLUGIN: Ephemerides 2.0

Post #7by jogad » 29.03.2013, 18:52

Hi

Keep in mind that all that follows is only my point of view and in no way an attempt to impose it.

Fenerit wrote:Oh, no; I do not fix that bug.
,
For me a bug is a bug and every bug should be pursued everywhere in the Earth and beyond! :blue:

Fenerit wrote:In switching the window from iconized to maximized, from normal to maximize and from all these latters to full screen, the bar remains where one decides to put it.
Not absolutely true :oops:. In fact it keeps a constant distance between the tool and the upper left corner of the screen. It is appropriate if the tool bar is in the upper left quarter of the screen but not always if it elsewhere.
I must admit though that this behaviour is appropriate in many case and I approve your will to preserve it. (Only the behaviour, not the bug!)

Fenerit wrote:If I fix that bug, it is true that the bar is moving also in very small normal windows, but when the window is then switched to full screen the bar doesn't hold its position.
It depends how you fix the bug. As your plug-in was continuously saving the left and bottom margins I proposed to keep these margins unchanged when you resize the Celestia Window.
But it appears that this choice is not the best. It would have been wiser to choose to save the left and TOP margins instead of the left ant bottom ones. By doing that you preserve the way the tool moves when you resize the Celestia window.
There is pratically nothing to change and you have your favorite behaviour AND NO BUG!

In fact you can fix a bug the way you want. For example you can save the relative position of the tool in the Celestia windows instead of and absolute position respective to the margins.

Fenerit wrote:If a crazy one is sure to taste Celestia within small window and wish to display the bar also there, simply should place the bar on the left position of the screen.
I suppose I am this crazy one :lol: . I have a large big screen and Celestia is not often the only program running. So I have often to resize the Celestia's window, depending of what I am doing with the others program.
On the other hand, as there is now a lot of plugins available with their different boxes everywhere in the Celestia window, it is important to have the ability to move them so they don't hide each others. This is why I think that a bug that prevents to move the plug-in bar is a serious bug and must be fixed.

Note that if you are not convinced and you prefer to keep the plugin as it is, I will not be offended at all.
In this case I will be the crazy one with the only bug-free plug-in. :wink:

:mrgreen:

Avatar
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: LUAPLUGIN: Ephemerides 2.0

Post #8by Marco Klunder » 29.03.2013, 20:25

I don't get it at work at all :?
So for me, there is no competition :wink:

ephemerides.jpg


Even the Earth has gone and the Sun at startup is also weird.
Just leaving out "ephemerisBox", from the config.lua solves the problem, but leaves me NO ephemerides to test.



Another suggestion for localization: Please provide an English template.
Now I'm guessing between variable names and Italian.
It's much easier to see an English layout and translate from there.

Marco
Marco Klunder
email: marco.klunder@xs4all.nl
Windows10 PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9, Celestia160-ED and Celestia1621

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #9by Fenerit » 30.03.2013, 03:26

Hi there!

jogad wrote:Not absolutely true :oops:. In fact it keeps a constant distance between the tool and the upper left corner of the screen. It is appropriate if the tool bar is in the upper left quarter of the screen but not always if it elsewhere.
I must admit though that this behaviour is appropriate in many case and I approve your will to preserve it. (Only the behaviour, not the bug!)

Sorry, I do not recognized that behaviour. See below.

jogad wrote:It depends how you fix the bug. As your plug-in was continuously saving the left and bottom margins I proposed to keep these margins unchanged when you resize the Celestia Window.
But it appears that this choice is not the best. It would have been wiser to choose to save the left and TOP margins instead of the left ant bottom ones. By doing that you preserve the way the tool moves when you resize the Celestia window.
There is pratically nothing to change and you have your favorite behaviour AND NO BUG!

Saving left&top or saving left&bottom is the same in my configuration. The bar doesn't move either. Instead, by saving both left&top or left&bottom with your method do not change its behavior of unrest where has been put it during the windows' switching. I've prepared two videos showing the behavior. The first is made with your suggestion emailed me, and the second one with my original "bug". Note that being made sampling of the size of my screen (1024x768), there is no background reference: take the Celestia's HUD like window's reference.

celestiaMod.zip
320x240 Xvid
Here you can see how the games with the window doesn't fix the bar in whatelse positio, although the bar is moving in windowd mode.

celestiaEphem.zip
320x240 Xvid
Here instead you can see how the bar does rest where one put it, although unmoveable when the window is resized; and there is no distance between the line along theCelestia's time HUD in windowed mode and in full screen mode as well.


@Marco:

Marco Klunder wrote:I don't get it at work at all...
Even the Earth has gone and the Sun at startup is also weird.
Just leaving out "ephemerisBox", from the config.lua solves the problem, but leaves me NO ephemerides to test.

I do not got that error, of course. That error is due to the fact that in "CXBox.lua" a variable i named "il" like my "il" returning function for illuminated fraction, which BTW is returned "LOCAL". Is then "LOCAL" not so power?

Marco Klunder wrote:Another suggestion for localization: Please provide an English template.
Now I'm guessing between variable names and Italian.
It's much easier to see an English layout and translate from there.

The template is the same "ephemLang.lua" which is in English.

Please, do use a SVN version and you should see that the things are a bit changed... :wink: How can one develop upon the official whether then the new versions engages features which make obsolete the offial version itself? If the KM_PER_LY will be hold like is coded now, all your scripts/plugins which make use of gotolonglat will bring the observer to the center of the Earth.
Never at rest.
Massimo

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #10by Fenerit » 30.03.2013, 07:23

lodgy wrote:Guys,
Given the number of problems with it :( ,
it would have been better to first go through the topic "add-on development" right ?
it reminds me the launch of Vista and we know more ... :(

This plugin is already present in that forum being started 3 years ago. It as been pretty overlooked until now either in crashes and GUI. On my system it doesn't crash at all, while for the GUI I was in search of a method to stick it on screen where one want to stick it like the OS's windows are sticked on screen, whitout that all the time by switching windowed -> full screen and viceversa one must repositioning the GUI where it was. Below a screenshot showing the selection of c Puppis and the ephemerides+ObjectsRiseSet+Distance_calc+HRdiagram altogether loaded and lots of pointer/marker and LUA library calls. No crashes for me.

allplug.jpg
Never at rest.
Massimo

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 15 years 9 months
Location: Paris France

Re: LUAPLUGIN: Ephemerides 2.0

Post #11by jogad » 31.03.2013, 13:04

Fenerit wrote:Sorry, I do not recognized that behaviour. See below.
...
Saving left&top or saving left&bottom is the same in my configuration.
Hum..!
I am very surprised. 8O

In fact this is not important!
What is important is to define what we want and strive to obtain the desired result without bug.

It is not possible to keep the all the margins unchanged as the celestia window is resized.
For example if you enlarge this window, as the tool has a constant size, at least one margin will be greater than before.
So there is not a perfect solution... :?

If you don't like the previous behaviour, I propose this one:
when the Celestia window is resized, instead of keeping constant one horizontal and one vertical margin we can adjust all the four margins to keep the position of the tool as much as possible at its relative place in the window.
i.e.
if it is near the left margin, it remains near the left margin
if it is near the center of the screen it remains near the center after resizing
and so on...

I have done this modif for myself and I am very happy with it :!:
But several solutions are always possible...

I had also the same bug as Marco for a time and then it has disappeared mysteriously.
I have nethertheless and idea of what it is.

I send you my file with some explanations and you will see if it is right for you.

:mrgreen:

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #12by Fenerit » 01.04.2013, 15:48

replacebox!!!

Thanks to Jo?l a definitive solution for the bar's behaviour in windowed mode has been found! Its "magick" box code is seamlessly nested within the "ephemerisBox.lua" without changing the buttons/labels' ergonomics. Thus a 2.2 version is ready (see first post).

Changes:
- fixed the forementioned bug in windowed mode;
- changed CELESTIA_SVN to IS_SVN declaration option in "ephemCfg.lua" file (mind at this);
- added equinoxes/solstices date (day, hour, min) for year 0 to 3000 AC.
- added annual aberration option for R.A. Dec concerning stars and deepsky objects ("ephemCfg.lua" default: AnnualAberration = true);
- updated EN, IT and FR translations for new features;
Never at rest.
Massimo

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #13by Fenerit » 02.04.2013, 08:19

Ephemerides_2.3 (see first post)

- Fixed a bug which prevented the bar to be displayed whether the option for "ephemerisBox = true" wasn't set within "config.lua" of the lua_plugin. Now the option for display the bar at start or not is moved within "ephemCfg.lua". Default = false.
- Changed "IS_SVN = true" to "IS_SVN = false", for standardization (mind at this yet);
- An asterisk before R.A./Dec. will be displayed whether the annual aberration option is set "true";
- Minor fixes
Never at rest.
Massimo

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #14by Fenerit » 03.04.2013, 21:52

Ephemerides 2.4 (see first post)

Kindly, Jo?l has fix the bugs inadvertently introduced during the enhancement of the bar's management.
This version fix all bugs of the previous 2.3. This is the most stable version so far.

- Fixed bug concerning wrong enter in "ephemPrefs.lua". This file is no longer required to be shipped with the installation; it will be created at first start. Previous version of this file (within Celestia's root) must be deleted before to install this new pack;
- Fixed a bug which prevented to display the ephemerides bar whether the window was resized before to load the plugin;
- Fixed bug with the pointer. Now it hold the center of the screen for whatelse windowed mode.
- Modified the equinox/solstice code. Now the timezone for these latters are independent from the main timezone setting. Workaround for western Europe daylight saving time; being the equinoxes/solstice's prediction ranging the whole year, the June solstice and the September equinox would have uncorrected hours whether set with the main timezone (hope be clear the discourse). Default: "UTC".
- Added Dutch language (thanks to Marco Klunder).
Never at rest.
Massimo

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

Re: LUAPLUGIN: Ephemerides 2.0

Post #15by Fenerit » 04.04.2013, 10:01

lodgy wrote:
Fenerit wrote:Ephemerides 2.4 ... This version fix all bugs of the previous 2.3. This is the most stable version so far...

AGAIN ?
Given the number of problems with it, this plugin is not finished !!! :(
it would have been better to first go through the topic "add-on development" right ?

1) A software is finished as long as it work on the system of its developer, like your mind is working onto your brain; and a bug could be that of displaying info in another language respect to the proper. For you a completely working software displaying infos in another language should be buggy because its language; for the other language not. For me are 3 years that ephemerides works.
2) Are Firefox, Google Chrome and whatever other program finished? Seem to me that they does updates their programs very often; and not for eye-candy, but after having corrected bugs that users neither sees, like you did nor have seen this add-on and for which a help should be feedbacking just right bugs, like other does, without complains.
3) The "add-on development" is the place for the first design of the kind of the add-on. Here is the starting thread for this plugin. Note that was already on screen and with other feature which has been removed just to simplify the things.
Never at rest.
Massimo


Return to “Add-on releases”