.CEL "Planetarium Mode" Statements

All about writing scripts for Celestia in Lua and the .cel system
Topic author
jeffmack
Posts: 55
Joined: 10.01.2011
Age: 72
With us: 13 years 10 months
Location: Canasvieiras, Florianópolis, Santa Catarina, Brazil / 27° 25' 54.4" S; 48° 28' 15.9" W; 56 Ft AMSL
Contact:

.CEL "Planetarium Mode" Statements

Post #1by jeffmack » 21.02.2019, 03:04

Hello,

Am I correct in my understanding that there are no .CEL statements equivalent to any, or all, the following three interactive functions (for the purpose of scripting a "planetarium mode"):

1) GoTo ground.

2) Set Alt-Azimuth mode.

3) Point camera to a specified azimuth (and possibly altitude).

I realize that this functionality exists in LUA, but it would be nice to have it in .CEL as well.

Thanks!

Jeff
Last edited by jeffmack on 22.02.2019, 04:39, edited 1 time in total.
System: Dell Novo XPS 13 9370 Notebook; CPU: Intel Core i7-8550U 8th Gen @ 1.80 GHz 1.992 GHz; MB: Dell 0F6P3V
Chipset: Intel Kaby Lake Rev 08; RAM: 16 GB LPDDR3-2133MHz; Graphics: 128 MB Intel UHD Graphics 620; Storage: 512 GB Intel SSD
OS: Windows 10 Pro 64-bit; Celestia: 1.6.1
-Jeff MacKinnon

Avatar
Croc M
Forum Admin
Posts: 437
Joined: 10.08.2016
With us: 8 years 3 months
Location: Udomlya, Tver region, Russia

Post #2by Croc » 21.02.2019, 06:52

Example:
This example selects the Earth and positions the camera over Seattle, Washington, USA, at a distance of 12,000 km above the surface.

Code: Select all

earth = celestia:find("Sol/Earth")
celestia:select(earth)
obs = celestia:getobserver()
obs:synchronous(earth)
earthdistance = 12000 + earth:radius()
longitude = math.rad(-122.0)
latitude = math.rad(47.0)
obs:gotolonglat(earth, longitude, latitude, earthdistance, 5.0)
celestia:print("Traveling to Seattle, Washington, USA.", 5.0, -1, -1, 2, 4)
wait(5.0)
celestia:print("Hovering over Seattle, Washington, USA.", 5.0, -1, -1, 2, 4)
wait(5.0)


Celestia/Celx Scripting/CELX Lua Methods/Celx observer
https://en.wikibooks.org/wiki/Celestia/Celx_Scrip ... hods/Celx_observer#gotolonglat
Creator of the GUI "Lua Universal Tools"
25/V/1947 - 30/III/2019

Topic author
jeffmack
Posts: 55
Joined: 10.01.2011
Age: 72
With us: 13 years 10 months
Location: Canasvieiras, Florianópolis, Santa Catarina, Brazil / 27° 25' 54.4" S; 48° 28' 15.9" W; 56 Ft AMSL
Contact:

Post #3by jeffmack » 21.02.2019, 07:09

Sorry, but this is not at all what I asked about. :fie:

But thanks for replying.

Jeff
System: Dell Novo XPS 13 9370 Notebook; CPU: Intel Core i7-8550U 8th Gen @ 1.80 GHz 1.992 GHz; MB: Dell 0F6P3V
Chipset: Intel Kaby Lake Rev 08; RAM: 16 GB LPDDR3-2133MHz; Graphics: 128 MB Intel UHD Graphics 620; Storage: 512 GB Intel SSD
OS: Windows 10 Pro 64-bit; Celestia: 1.6.1
-Jeff MacKinnon

Avatar
Croc M
Forum Admin
Posts: 437
Joined: 10.08.2016
With us: 8 years 3 months
Location: Udomlya, Tver region, Russia

Post #4by Croc » 21.02.2019, 09:09

jeffmack,
......
1) GoTo ground.
......
The following functions are implemented in the graphical interface Lua Universal Tools:
  • planetarium mode
  • navigation mode

planetariumMode.jpg


navigationMode.jpg


Perhaps the answer to your question is in the compassBox.lua file (version of Lua Edu Tools)?
Attachments
compassBox.zip
(2.97 KiB) Downloaded 308 times
Creator of the GUI "Lua Universal Tools"
25/V/1947 - 30/III/2019

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

Post #5by selden » 21.02.2019, 15:58

My understanding is that Jeff is asking that certain functions which are available in the .CELX (Lua) interpreter also be made available in the .CEL interpreter, which currently does not have them.

Unfortunately, having them available in the LUA user interface or a Lua script doesn't make them available in a .CEL script.
Selden

Topic author
jeffmack
Posts: 55
Joined: 10.01.2011
Age: 72
With us: 13 years 10 months
Location: Canasvieiras, Florianópolis, Santa Catarina, Brazil / 27° 25' 54.4" S; 48° 28' 15.9" W; 56 Ft AMSL
Contact:

Post #6by jeffmack » 22.02.2019, 04:33

Yes, Selden. You are correct. I specifically asked about .CEL scripting - NOT LUA scripting. Thank you!

And you answered my question - these "planetarium mode" related functions do not currently exist in Celestia. It would be nice to see them implemented in Celestia version 1.7.0. They seem so basic to me.

Anyway, thanks again, Selden. :smile:
System: Dell Novo XPS 13 9370 Notebook; CPU: Intel Core i7-8550U 8th Gen @ 1.80 GHz 1.992 GHz; MB: Dell 0F6P3V
Chipset: Intel Kaby Lake Rev 08; RAM: 16 GB LPDDR3-2133MHz; Graphics: 128 MB Intel UHD Graphics 620; Storage: 512 GB Intel SSD
OS: Windows 10 Pro 64-bit; Celestia: 1.6.1
-Jeff MacKinnon


Return to “Scripting”