OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post requests, images, descriptions and reports about work in progress here.
Avatar
Topic author
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post #1by Marco Klunder » 19.01.2013, 12:31

Inspired and educated by the tutorial thread "Add your own plugin for both Lua Plug-ins and Lua Edu Tools" by Jogad
(see: http://www.shatters.net/forum/viewtopic.php?f=21&t=17141),
The earlier available Sun Rise/Set and Moon Rise/Set addons have now their "Obects Rise/Set" follow-up :!: :idea: :!:

In this thread you'll find the v2.1 release of the Obects Rise/Set addon for download:

The official v2.1 release of this addon can now be downloaded from the Motherloade:
http://www.celestiamotherlode.net/catalog/show_addon_details.php?addon_id=1634

Besides enabling them as a Lua plugin, the scripts are now also localized. :!:
The currently supported locals are: de, fr, it, nl, ru and en.
Of course, I invite members on the forum to support these addons with more localized versions.

To do so, use the available English template files in the "locale" directories of the addon as a template and edit the template file with a text editor --> coding UTF-8 (without BOM). (The English files serve as a model for other locals) :!:
When you've done a translation, you can send the file to my email address (marco.klunder@hccnet.nl, see also my link in the signature below) and I'll integrate them in the new releases of these addons.

Both the scripts and the Plug-in of this Addon use their own configuration files.
You can edit these configuration files with a text editor to personalize your own implementation.
The configuration files contain the next entries that can be customized:
* Activation key for Lua_Plugins (not in script config);
* Color of the text and box on the screen (not in script config);
* Visibility at startup (not in script config);
* Show location (not in script config);
* Speed of the animation
* Enable/disable the preview on Earth during the animation
* Enable/disable the orbit rendering of Planets during the animation
* Brightness level of ambient light.
* Predefined static location
* Predefined static date
* Local time zone to be displayed (instead of UTC)
* Language localization (in script config)
* And more...

Find these entries in the configuration file and change them according your own wishes.

If you want to change the localization for Lua_Edu_Tools, that's handled in the own config of Lua_Edu_Tools.

If you want to change the localization for Lua_Plugins, the addon contains a separate file for this:
in the ..\extras\ObjectsRiseSet directory: ObjectsRiseSet_locale.lua
==> Change the lang = "en"; entry to one of the currently supported locals.

If you have comments regarding this v2.1 release, please feel free to contact.

Marco
Last edited by Marco Klunder on 12.04.2013, 12:35, edited 22 times in total.
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
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 3 months
Location: Thyrrenian sea

Re: Sun/Moon Rise/Set Lua Plug-in

Post #2by Fenerit » 19.01.2013, 23:33

Hi! Great work!
Never at rest.
Massimo

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

Re: Sun/Moon Rise/Set Lua Plug-in

Post #3by jogad » 20.01.2013, 09:24

Very neat and useful tools 8)

Thank you :D

:mrgreen:

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

Re: Sun/Moon Rise/Set Lua Plug-in

Post #4by Marco Klunder » 20.01.2013, 14:11

Beta2 for both Addons released in the first post of this thread.

==> Improved alignment of the variables in the boxes.

Knipsel.JPG

Also the alignment in the scripts is improved now and independant of the localazation.
So in the local files (see first post in this thread), no trailing spaces have to be added anymore to the translated strings.

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
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: Sun/Moon Rise/Set Lua Plug-in

Post #5by Marco Klunder » 21.01.2013, 22:37

Beta3a for both Addons released in the first post of this thread.

==> Improvement: The Lua boxes now contain a clickable button to run the script for the actual locaion.

[left-click] on the "Script" button in the Box an the corresponding rise/set, as seen from the surface of Earth will bee shown.

Knipsel3.JPG
Knipsel2.JPG


Smal fix beta3-->beta3a
Script does not select Sun/Moon anymore, but instead they are marked now.
That keeps the selection of a location active, so when running the script location based (e.g. Amsterdam is selected),
the plug-in boxes also keep displaying that location name now (instead of a blank line).


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
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: Sun/Moon Rise/Set Lua Plug-in

Post #6by Marco Klunder » 23.01.2013, 21:03

Beta4 for both Addons released in the first post of this thread.

==> Bugfix: Script button was only working for Lua_edu_Tools and not for Lua_Plugins (corrected now).

Because the script shows better with a little higher level of ambient light, but the Plug-in prefers a lower level of ambient light to better see the teminator, there was a conflict between the Plug-in and the script. Because the Plug-in is continuously active, it "wins" from the script.
The Plug-in for beta4 is now able to "kind of" detect if the script is still running. If that's the case, it will not reset the level of ambient light anymore, till the script has ended. :idea:

The Frames now have a close button added in the upper right corner, as an alternative to close the Plug-in:
Knipsel.JPG


Reset of Celestia parameters when closing the plug-in, now only effect the changed parameters in the plug-in itself and not a general reset of renderflags and unmarking all objects.

Some minor scripts enhancements to work better together with the Plug-ins as well as stand-alone...

Knipsel4.JPG

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
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 3 months
Location: Thyrrenian sea

Re: Sun/Moon Rise/Set Lua Plug-in

Post #7by Fenerit » 24.01.2013, 01:29

Very well done plugin, Marco. Just a question, that I've still unclear and that I believe this is the right seat to discuss about: I think that the "1583 calendar reform" is already computed in celestia:gettime(), because I get correct events also for date before that without account for. I'm wrong or it is just fortune? (I do not believe this latter).
Never at rest.
Massimo

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

Re: Sun/Moon Rise/Set Lua Plug-in

Post #8by Marco Klunder » 26.01.2013, 21:09

Beta5 for both Addons released in the first post of this thread.

Fenerit wrote:I think that the "1583 calendar reform" is already computed in celestia:gettime(), because I get correct events also for date before that without account for.

Thanks Fenerit for pointing this one out. :idea:

It was a bug in the prior versions of this addon, including the previous beta's (1-4) in this thread :!:
Especially clear to watch when you test the old code (beta4 and earlier versions of the addon) with the Moon Rise/Set (and less clear, but also obvious in the Sun Rise/Set).
* When the date is 1-1-1583 the Moon Rise/Set with the old code showed correct in the script.
* But going 1 day earlier to 31-12-1582, the script shows really wrong Moon Rise/Set times as also can be seen on the screen of the script.

Beta5 Bugfix:
"1583 Calendar reform" removed from calculation and replaced by default Celestia functionality.
Dates prior to 1-1-1583 are calculated more accurate now in Celestia.

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
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: Sun/Moon Rise/Set Lua Plug-in

Post #9by Marco Klunder » 28.01.2013, 19:39

Beta6 for both Addons released in the first post of this thread.

Unfortunately, replacing the "1583 Calendar reform" code with standard Celestia functionality in beta5, introduced a new bug.
Although the scripts were working correct and the Plug-ins were working correct, the combination of both lead to an error.
When the script was activated by the Plug-in, the Time and Azimuth did change (incorrect) in the Plug-in boxes when the left view of the multiview scene in the script was active. When the right view of the multiview scene in the screen was active, the situation was correct again.
Now, the old beta4 code is partially restored again, but the "1583 Calendar reform" code is still left out, so the problem as mentioned in beta5 is also still fixed now in beta6.

Also in this beta6 another bugfix:
Since the release of these v20 beta versions, I accidentally used the same test variable for a boolean as well as for an integer, which sometimes led to an incorrect script view when run for the first time. (Especially visible in the MoonRiseMoonSet script).
Test variable names have now been changed, fixing this bug.

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
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: Sun/Moon Rise/Set Lua Plug-in

Post #10by Marco Klunder » 07.02.2013, 20:02

V2.0 of both addons now released and available in first post of this thread.
I also uploaded it to the Motherlode, where is will be available soon.

Latest update: Also the Russian translations are added including a printline for activation/deactivation of the plugin.

Thanks for local translations / validations:
* fr - Jogad
* it - Fenerit
* de - Ulrich Adirondack
* ru - Alexell

But additional translations are still WELCOME :D


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
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 10 months

Re: Sun/Moon Rise/Set Lua Plug-in

Post #11by John Van Vliet » 08.02.2013, 01:03

--- edit----
Last edited by John Van Vliet on 18.10.2013, 11:34, edited 1 time in total.

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 4 months

Re: Sun/Moon Rise/Set Lua Plug-in

Post #12by Adirondack » 08.02.2013, 16:28

John,

just test the (old) ones in your folder.
The new ones are the same but with russion translation.

-- Ulrich
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)
The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

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

Re: OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post #13by Marco Klunder » 20.03.2013, 19:51

The Sun Rise/Set and Moon Rise/Set addons have meanwhile be more improved :!: :idea: :!:

Instead of using Fundamental parameters, the addon now uses internal Celestia functionality.
That also cleared the road to calculate the Rise/Set times on Earth of all Space objects available in Celestia.
So there is now one new integrated "Object Rise/Set" Addon available for download in the first thread of this post for testing.
This also is the reason why I renamed the title of this thread.

So there are no separate Sun Rise/Set and Moon Rise/Set addons needed anymore, they are integrated in the new addon.
Calculate the Rises/Set of the (dwarf)Planets of our Solar System from any place on Earth, or the Rise/Set of Galaxies, Stars, Moons, .... :blue:
For Each Rise/Set, click on the Animation button, and a script shows the Rise/Set of the object as seen from the surface on Earth.

Please read the "Read-me" for all the installation instructions and the possibilities to personalize the Addon.

The addon is localized in:
French (Thx Jogad)
German (Thx Ulrich)
Italian (Thx Fenerit)
Russian (Thx Alexell)
Dutch
English

Of course localization for more languages will be supported, when translation files are delivered to me by volunteeers on the forum.
Look for the English translation template in the "Locale" directories of this addon for an example and feel free to contact me when needed.

Antares RiseSet.jpg


Have fun testing.
When stable for a period, I'll also upload the Addon to the Motherlode for a definit release.

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
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 10 months

Re: OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post #14by John Van Vliet » 20.03.2013, 20:55

--- edit----
Last edited by John Van Vliet on 18.10.2013, 11:34, edited 1 time in total.

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

Re: OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post #15by Marco Klunder » 23.03.2013, 20:08

Thanks John for the compliments :D
I'll continue to keep the addon quality according the very much appreciated guidelines :!: :!: :!:
Hope I'll not fail :wink:

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
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post #16by Marco Klunder » 23.03.2013, 20:08

Because of a few modifications, I've uploaded a revised V2.1 of the ObjectsRiseSet addon.

The main reason for this modification is the following:
Because the Objects selected can now be any object, the object name can differ very much in length.
That was not a problem for the Sun, Moon, Pluto and the Solar System Planets, because they all have short names.
Now eg. we can select a star: “Al Dhanab al Dulfim” to calculate the rise/set.
However, the name of this star is that long, that it crosses the line of the variables area in the box on the screen, causing characters printed through each other.
The same problem existed in the animation script for Objects, especially for the text in the left view, crossing the line of the right view and text strongly not aligned.

The revised version can now be downloaded in the first thread of this post.

Enjoy, 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
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 61
With us: 16 years 4 months
Location: The Netherlands

Re: OBJECT Rise/Set Addon (Lua Plug-in + Animation scripts)

Post #17by Marco Klunder » 24.03.2013, 12:28

Small bug-fix repaired regarding the animation scripts and the length of Object names.
Further I discovered in some supported languages, that the length of the text fields regarding the planets can sometimes also be a bit too long.
So the adjustments regarding the length of object names in the Objects animation script is now also implemented for all other animation scripts (Sun, Planets, Moon, Pluto).

v2.1 beta2 is available for download in the first thread of this post.

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


Return to “Add-on development”