Lua Edu Tools : content and layout...

Discuss Celestia's features, adaptations and Addons for use in educational environments
Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #21by selden » 28.11.2006, 00:40

Yup, it's working for me, too!
Selden

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #22by chris » 28.11.2006, 16:51

It looks great Vincent! One suggestion: why not show the RA and declination for planets as well as stars?

--Chris

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #23by Vincent » 28.11.2006, 22:21

chris wrote:It looks great Vincent! One suggestion: why not show the RA and declination for planets as well as stars?

--Chris

Thanks Chris.
As for RA and dec, I've fixed the problem that made me first set a limit distance (1 ly) from which they were displayed. RA and dec value should be displayed with correct values now, for all objects, except Earth, of course.
Here's the updated file : http://vincent.gian.club.fr/celestia/lua_tools2.zip

Then, I'm currently facing two new problems :
1- The 'os.setlocale' Lua fonction doesn't return the user's local language with Lua5.1, whereas it was working with v5.0 : e.g., on a french system, the os.setlocale(nil, "collate") command was returning "France_French..." in Lua v5.0. Now, it only returns "C", which is the locale for the "numeric" category, not for the "collate" one. So the localization of the Lua Tools doesn't work anymore with Lua 5.1. This looks like a bug in Lua 5.1...

2- As for the Observer Mode, there's curently no way in Celx to get some information about the 'Tracked Object', whereas it is possible to know the reference object for the "Follow", "Sync Orbit",... modes :

Code: Select all

   local obsCoordSys = obs:getframe():getcoordinatesystem();
   local obj = obs:getframe():getrefobject();
   objname = obj:name();

An "observer:gettrackedobject" method would be very useful... :wink:
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Post #24by buggs_moran » 29.11.2006, 01:00

I don't know if this has been mentioned before Vincent, but when I go back in time quickly, the clock runs out, i.e. it disappears...
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #25by Vincent » 29.11.2006, 18:10

Hi,

Quite a few updates today, so let's start with a shot :

Image

1- I've added a slider to set the FOV. In order for the zoom to match the Shift+Mouse Left controls, the slider uses an exponential scale.
Image

2- The Observer Mode Window has been updated :
- Since the Frame Mode (Follow, Sync Orbit,...) is now displayed at the top of the Obs Mode Window, the standard display (Obs Mode Frame + FOV) has been disabled.
- The Tracked Object is now directly displayed within the Track Button Text.
Also, buttons that are activated remain highlighted (see the Track and Set Time buttons).
Image

3- The diaporama buttons are now included into the image frame, and the position of the image is set in relation to the height of the image and the height of the screen.
Image

The updated zip file can still be found at the same URL : http://vincent.gian.club.fr/celestia/lua_tools2.zip

buggs_moran wrote:I don't know if this has been mentioned before Vincent, but when I go back in time quickly, the clock runs out, i.e. it disappears...

Buggs,

There was a similar bugs in a former version, but I fixed it quite a few weeks ago... So please, try with the most recent version above. And if you can still reproduce the bug, please tell me whether it happens when you set the timerate with the slider or with the [L] key...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Joe
Posts: 162
Joined: 29.02.2004
With us: 20 years 8 months
Location: United Kingdom

Post #26by Joe » 30.11.2006, 14:02

Very NICE :D , It is great work! Thanks Vincent.
Joe
8O

Sui Ota
Posts: 75
Joined: 05.10.2005
With us: 19 years 1 month
Location: Saitama, Japan

Post #27by Sui Ota » 30.11.2006, 20:26

Yes, I tried new features... :D


Some reports:
1.
About FOV slidebar:
The value of amplification is different between Celestia-native and the tools. When it is 1.00x in the native, 0.99 in the tools. And, the value easily changes after resizing, while it is not happened in the native overlay. When I repeat shrinking and expanding the screen, the value varies from about 0.10x ~ . 8O On the other hand, the value keeps 1.00x in the native.

2.
2-1
Is it possible to show a object's name as a localized one? For now, the object's name is displayed in English.
For example: In French, it is displayed as [Suivre Earth], not [Suivre Terre].
It seems it is not a problem of the tools, but lua support of Celestia itself... (Similar phenomenon happens in tour-system.celx which is in CVS.)

2-2
The Greek alphabet of starname is shown as three letter(ALF, BET, GAM, ...), not as Greek alphabet itself in Bayer code(like [Follow ALF Cen]). This is a feature of celx script, I think, so some conversion function is needed in the tools...

3.
The size of overlay image is strange when the screen size is too small. FOV slidebar is too.
There is no choice against overlapping in the narrow screen, but the behavior has room for improvement...

Suggestion:
How about translation of "RA : " and "Dec : " in Measure?
like

Code: Select all

      textlayout:println(_("RA : ")..ra_str);
      textlayout:println(_("Dec : ")..dec_str);
-Suι

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #28by Vincent » 30.11.2006, 21:23

Hi Sui Ota,

Sui Ota wrote:About FOV slidebar:
The value of amplification is different between Celestia-native and the tools. When it is 1.00x in the native, 0.99 in the tools. And, the value easily changes after resizing, while it is not happened in the native overlay. When I repeat shrinking and expanding the screen, the value varies from about 0.10x ~ . 8O On the other hand, the value keeps 1.00x in the native.
Unfortunately, there's no way actually to get the standard zoom value from the Celestia core. So I've used the observer:getfov() command to get the FOV. Then, the formula used in Celestiacore.cpp to get the zoom from FOV can't be reproduced in Lua since several variables are not available. So I used a simplified formula. That's why you can notice a sensible difference between the standard and the Lua values of the zoom. But to me, this is a really slight difference : 1% when you resize the screen by half its size in a 1024*768 config...

Sui Ota wrote:2-1
Is it possible to show a object's name as a localized one? For now, the object's name is displayed in English.
For example: In French, it is displayed as [Suivre Earth], not [Suivre Terre].
It seems it is not a problem of the tools, but lua support of Celestia itself... (Similar phenomenon happens in tour-system.celx which is in CVS.)
Yes, I've had the same idea. This is already possible in my own test version since I've added an "object:getlocalname() command to celx.cpp. The code is ready. I sent the (short) patch to Chris a few hours ago...

Sui Ota wrote:2-2
The Greek alphabet of starname is shown as three letter(ALF, BET, GAM, ...), not as Greek alphabet itself in Bayer code(like [Follow ALF Cen]). This is a feature of celx script, I think, so some conversion function is needed in the tools...
I'll have a look at this.

Sui Ota wrote:3.
The size of overlay image is strange when the screen size is too small. FOV slidebar is too.
There is no choice against overlapping in the narrow screen, but the behavior has room for improvement...
I think that nobody would use the lua tools with a screen reduced to half its size. So maybe the best thing to do would be to stop drawing the whole overlay when the screen is too small, e.g., when it is smaller than half its optimized size.

Sui Ota wrote:Suggestion:
How about translation of "RA : " and "Dec : " in Measure?
like

Code: Select all

      textlayout:println(_("RA : ")..ra_str);
      textlayout:println(_("Dec : ")..dec_str);

Yes, I will add this to the tools.

Thanks.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 1 month
Location: Pordenone/Italy

Post #29by Paolo » 03.12.2006, 16:14

I've tested for a while with the new Chris pre-pre-release and it seems working well. :D

Kind regards
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #30by Vincent » 03.12.2006, 18:37

Paolo wrote:I've tested for a while with the new Chris pre-pre-release and it seems working well. :D

Kind regards


Thanks for the report Paolo. I'll upload an updated version soon, with a new layout for the compass and an extension of Selden's pointing_Hubble addon...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #31by Vincent » 06.12.2006, 17:30

Hi,

Here's a new updated version of the Lua Edu Tools :
http://vincent.gian.club.fr/celestia/lua_tools2.zip

1- As suggested by Sui Ota :
- The name of objects is now localized (= translated)
- The name of stars is displayed using Bayer code (with Greek Letters Abbreviation).
- The whole overlay is not drawn anymore when screenwidth < 790 or screenheight < 590 to avoid problems with the display of images/sliders/buttons in reduced screen sizes.

As for the Greek Letters Abbreviation, I prefered coding it in Lua rather than modifying the object:name() method in celx.cpp. This way, it is still possible to get the name of stars in ANSI characters in order to use control structures (if...then, while...do, ...) in Lua files :

Code: Select all

if object:name() == "PSI Tau" then
...

2- The Lua Tools now include an extension of Selden's Pointing Hubble addon, with Chris' script that makes Hubble point at the current selection. The "Go To POV" and "Track target" buttons now replace the compass window when the selection is a spacecraft with a .ssc POV/FOV definition.
Note that Hubble doesn't curretly point exactly at the selection. The issue is currently discussed in the following thread : http://celestiaproject.net/forum/viewtopic.php?t=10454

3- I've improved the compass layout :
- A "navigation mode" button is available (when in planetarium mode) to make the observer go back to a view with the reference/source object fitting the screen (GoToFit function). Selecting new Long/Lat values is now much easier.
- All buttons (planetarium/navigation mode) and values (Long/Lat, Az/Elev) are displayed on the left-hand side of the screen, with other buttons and values.
- The compass can be displayed whether on the left-hand side (shot n?°1) or at the bottom-center (shot n?°2) of the screen. User can switch between these two positions with a simple click on the compass.

Image

Image
Last edited by Vincent on 07.12.2006, 11:57, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #32by Vincent » 06.12.2006, 22:32

Star names like 'Tau5 Eri' (greek letter followed by a key number) were not displayed correctly. This is fixed now.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Sui Ota
Posts: 75
Joined: 05.10.2005
With us: 19 years 1 month
Location: Saitama, Japan

Post #33by Sui Ota » 08.12.2006, 08:17

OH 8O
It became more useful than before!
Thanks for adding my request :D

Vincent wrote:- A "navigation mode" button is available (when in planetarium mode) to make the observer go back to a view with the reference/source object fitting the screen (GoToFit function). Selecting new Long/Lat values is now much easier.

When I click "navigation mode" button to swith the mode, the observer goes to "selected" object, not to reference/source.
For example, if I selected a star, I am whisked to very far position 8O
-Suι

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #34by Vincent » 08.12.2006, 11:59

Sui Ota wrote:OH 8O
It became more useful than before!
Thanks for adding my request :D

Vincent wrote:- A "navigation mode" button is available (when in planetarium mode) to make the observer go back to a view with the reference/source object fitting the screen (GoToFit function). Selecting new Long/Lat values is now much easier.
When I click "navigation mode" button to swith the mode, the observer goes to "selected" object, not to reference/source.
For example, if I selected a star, I am whisked to very far position 8O

You're right. The problem should be fixed now... I've added an optional argument to the gotoToFit() function to be able to specify the object the observer has to go to [> gotoToFit(obj) ]. If this object is not specified, the observer will go to the current selection. In the case of the "Navigation Mode" button, the object passed as argument is the source.

I've also added a new model for hubble-fov made by ElChristou.

> http://vincent.gian.club.fr/celestia/lua_tools2.zip

Well, you've reported just one problem this time. This is good sign ! :)
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #35by selden » 08.12.2006, 12:29

Vincent,

I think more documentation needs to be included with the Lua Edu addon so that people know what to expect.

On my screen, for example, it isn't obvious which fields in the upper right are commands and which are status displays.

Trying to click on some of what I think are supposed to be commands changes the Selected object instead. I think outlines are needed for the active command areas to eliminate this frustration.

Also, the readme for Pointing Hubble needs to be updated or deleted and the appropriate information included with the Lua Edu docs. What it says is wrong now. (You have my permission to make the necessary changes.)
Selden

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #36by Vincent » 08.12.2006, 18:01

selden wrote:Vincent,

I think more documentation needs to be included with the Lua Edu addon so that people know what to expect.

On my screen, for example, it isn't obvious which fields in the upper right are commands and which are status displays.

Trying to click on some of what I think are supposed to be commands changes the Selected object instead. I think outlines are needed for the active command areas to eliminate this frustration.

Also, the readme for Pointing Hubble needs to be updated or deleted and the appropriate information included with the Lua Edu docs. What it says is wrong now. (You have my permission to make the necessary changes.)

Selden,

All the active fields (text, buttons) are displayed in blue color (or red when activated). Information text and status displays are displayed in plain white. Do you think accentuating the difference between these two sets of color will be necessary/sufficent to avoid such a confusion ?

Also, to prevent from changing the selection, inopportune clicks will be blocked off in the whole Tools window. Christophe already suggested this to me, so this is on my TODO list...

Then, I've not added some documentation because I want the use of the Tools to be very instinctive. They were build precisely to avoid users having to read a long documentation and to learn shorcuts, etc... That's why I would prefer modifying the layout to make the Tools more handy and their use more obvious, rather than adding a documentation. But of course, I will eventually add a short documentation if it appears to be essential.

Finally, I will include the main updated information about your Pointing Hubble addon in the Lua Tools readme. Thanks for giving me the permission to do so.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #37by selden » 08.12.2006, 18:54

Vincent wrote:All the active fields (text, buttons) are displayed in blue color (or red when activated). Information text and status displays are displayed in plain white. Do you think accentuating the difference between these two sets of color will be necessary/sufficent to avoid such a confusion ?
On poorly calibrated monitors, the lettering is smeared out slightly: the thin "white" letters look grey and the color of the blue letters is only slightly different from that. Also, the eye does not focus blue as well as it focuses other colors. [edit]Some other pair of colors might be better (yellow?) but don't forget that some people are color blind: red and green both look like what might be called "brown". [/edit]
Also, to prevent from changing the selection, inopportune clicks will be blocked off in the whole Tools window. Christophe already suggested this to me, so this is on my TODO list...
great!
Then, I've not added some documentation because I want the use of the Tools to be very instinctive. They were build precisely to avoid users having to read a long documentation and to learn shorcuts, etc... That's why I would prefer modifying the layout to make the Tools more handy and their use more obvious, rather than adding a documentation.
What I think is needed (what I need, for example) is a description of what the Lua Edu pack is supposed to be able to do.

For the user:
Why should anyone bother to use it?
What features does it add to Celestia?
Where does one encounter features that aren't on the screen when Celestia starts up?

e.g. How does one simulate a telescope view?
How does one control a simulated telescope?

For someone adding features:
How do you add on-screen overlays?
How do you add controls for simulating different telescopes?

Right now the initial screen looks like it only provides a few conveniences to replace controls that Celestia's GUI already provides.

But of course, I will eventually add a short documentation if it appears to be essential.

Finally, I will include the main updated information about your Pointing Hubble addon in the Lua Tools readme. Thanks for giving me the permission to do so.
You're very welcome.
Selden

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #38by Vincent » 08.12.2006, 20:45

selden wrote:On poorly calibrated monitors, the lettering is smeared out slightly: the thin "white" letters look grey and the color of the blue letters is only slightly different from that. Also, the eye does not focus blue as well as it focuses other colors. [edit]Some other pair of colors might be better (yellow?) but don't forget that some people are color blind: red and green both look like what might be called "brown". [/edit]
Thanks for the information. I will make some further testing on the color set. Then, note that the whole color set can be easily customizable by editing the following lines at the beginning of the utils/textlayout.lua file :

Code: Select all

cbutextoff = {0.8, 0.8, 1, 0.8}; -- unactivated button text color
cbutexton = {0.8, 0, 0, 0.6}; -- activated button text color
cbubordoff = {0.2, 0.2 , 0.6, 0.6}; -- unactivated button border color
cbubordon = {0.6, 0, 0, 0.4}; -- activated button border color
ctext = {1, 1, 1, 0.9}; -- main text color
ctextalert = {1, 0, 0, 0.7}; -- text color for alert messages
cslidefrbord = {0.8, 0.8, 1, 0.6}; -- slider frame border color
cslidebobord = {0.3, 0.3 , 0.7, 0.9}; -- slider box border color
cslidebofill = {0.2, 0.2, 0.6, 0.3} -- slider box filling color

So, if someone comes with better settings, please don't hesitate to post it here... :wink:

Selden wrote:What I think is needed (what I need, for example) is a description of what the Lua Edu pack is supposed to be able to do.

For the user:
Why should anyone bother to use it?
What features does it add to Celestia?
Where does one encounter features that aren't on the screen when Celestia starts up?

e.g. How does one simulate a telescope view?
How does one control a simulated telescope?

For someone adding features:
How do you add on-screen overlays?
How do you add controls for simulating different telescopes?

Right now the initial screen looks like it only provides a few conveniences to replace controls that Celestia's GUI already provides.

To me, the main purpose of the Lua Edu Tools is :
1- Simplifying access to the main commands with a graphic interface to allow people who won't spend so much time using Celestia(pupils/students/... ) to use it in autonomy.
2- Offering new features that are not available /yet/ in the official distribution (compass, InfoText/Image, Ra/Dec display, etc...).

I agree with you on adding a short documentation, especially for features that belong to the second category.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Sui Ota
Posts: 75
Joined: 05.10.2005
With us: 19 years 1 month
Location: Saitama, Japan

Post #39by Sui Ota » 09.12.2006, 12:52

I'm sorry, but I found another problem :wink::
Using "Lock" mode, second object name is not translated.

And it would be useful if these are added ...
* How about translatability of "Lock" and "Chase"...?
* Showing time rate when the time is stop; It is not displayed when I stopped simulation time unlike current native Celestia overlay. It is inconvenient in case of varying the time rate.
-Suι

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #40by Vincent » 10.12.2006, 15:47

Sui Ota wrote:I'm sorry, but I found another problem :wink::
Using "Lock" mode, second object name is not translated.
Fixed.

Sui Ota wrote:* How about translatability of "Lock" and "Chase"...?
Done.

Sui Ota wrote:* Showing time rate when the time is stop; It is not displayed when I stopped simulation time unlike current native Celestia overlay. It is inconvenient in case of varying the time rate.

I'm afraid this can't be done because AFAIK, there's no way for the Lua code to get the timescale value from the Core when Celestia was paused using the spacebar... The celestia:gettimescale() Celx command then returns 0, which is the value from simulation.cpp, not from celestiacore.cpp . As a consequence, the timescale slider is set back to zero.
The timescale value can be known though, since it is displayed for a second when the [J], [K], [L] keys are pressed...

[edit]
I've disabled the 1x timerate button and the slider when Celestia is paused to prevent the Lua clock from starting running again in paused mode. I've also prevented the slider to be set back to 0 when the spacebar is pressed, although the timescale value is still set back to 0.
[/edit]

> http://vincent.gian.club.fr/celestia/lua_tools2.zip
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3


Return to “Celestia in Education”