Display custom data

All about writing scripts for Celestia in Lua and the .cel system
Topic author
lastant
Posts: 2
Joined: 24.02.2019
With us: 5 years 2 months

Display custom data

Post #1by lastant » 24.02.2019, 13:57

Is it somehow possible to display somewhere custom data, for example object's current distance to Sun or its current velocity, acceleration etc? For instance in the top left or bottom left corner as text, or to color-code the orbit line.

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #2by onetwothree » 24.02.2019, 18:01

With CELX scripting this should be possible.

Topic author
lastant
Posts: 2
Joined: 24.02.2019
With us: 5 years 2 months

Post #3by lastant » 25.02.2019, 09:34

onetwothree, any sample code or at least a function name?

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

Post #4by Croc » 25.02.2019, 10:07

lastant,

in the Lua Universal Tools GUI (Lua Edu Tools) there is a KEPLERIAN PARAMETERS tool.
Perhaps there is some data in it. Examine the tool code (version of Lua Edu Tools). Create new algorithms for new parameters.

Neptune.jpg
Attachments
KeplerParamBox.zip
(3.84 KiB) Downloaded 210 times
Creator of the GUI "Lua Universal Tools"
25/V/1947 - 30/III/2019

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #5by onetwothree » 26.02.2019, 11:56

lastant wrote:any sample code or at least a function name?

Basically, celestia:print, but Croc provided a better variant with Lua Edu Tools.


Return to “Scripting”