This version of Celestia displays extra information about some bodies and allows mass reloads of dscs, star data files along with ssc files, the asterisms file and the boundaries file or all of those.
The zip file has a ssc file that adds extra information about bodies, the modified source files and a Windows executable. Diff can show where the code was changed.
http://www.rit.edu/~bjr5096/celestia/BCelestia.html
Things seem to work for me, but go ahead and test it if you want to.
Happy holidays.
Brendan
A version of Celestia that reloads files
-
Topic authorBrendan
- Posts: 296
- Joined: 15.07.2003
- With us: 21 years 4 months
- Location: Bellows Falls, VT
- Contact:
Now that I have done my xmas partying, I'll write about how I changed the source to get Celestia to reload files without needing to restart.
I took pieces of code out of celestiacore.cpp's initSimulation function and put them in several functions that each loaded different things. One loaded star and ssc files, one load dsc files and two more each loaded asterisms and boundaries. There is also a function that reloads all of those.
Each of them has a boolean value argument that is used to determine if celestia.cfg should be reloaded or not. If it is true, another function, loadConfig, is called to reload celestia.cfg.
The initSimulation function uses false for the arguments because it had already called loadConfig. There is code in winmain.cpp that calls these functions when the reload options in the file menu are selected. The argument true is used to cause celestia.cfg to be reloaded when those functions are called through the menu.
I toyed around with the parameters for a star. I made my K0 star into a O5 star and then a M9 supergiant without closing and reopening Celestia. When I made it a T9 body thousands of light years away with a very negative magnitude, it wasn't drawn because it ended up being almost a million light years in radius. It engulfed the entire galaxy! Celestia showed the surface temperature as 750 K and the temperatures calculated for the planets inside it was trillions and trillions K, as hot as the early universe.
Brendan
I took pieces of code out of celestiacore.cpp's initSimulation function and put them in several functions that each loaded different things. One loaded star and ssc files, one load dsc files and two more each loaded asterisms and boundaries. There is also a function that reloads all of those.
Each of them has a boolean value argument that is used to determine if celestia.cfg should be reloaded or not. If it is true, another function, loadConfig, is called to reload celestia.cfg.
The initSimulation function uses false for the arguments because it had already called loadConfig. There is code in winmain.cpp that calls these functions when the reload options in the file menu are selected. The argument true is used to cause celestia.cfg to be reloaded when those functions are called through the menu.
I toyed around with the parameters for a star. I made my K0 star into a O5 star and then a M9 supergiant without closing and reopening Celestia. When I made it a T9 body thousands of light years away with a very negative magnitude, it wasn't drawn because it ended up being almost a million light years in radius. It engulfed the entire galaxy! Celestia showed the surface temperature as 750 K and the temperatures calculated for the planets inside it was trillions and trillions K, as hot as the early universe.
Brendan
-
Topic authorBrendan
- Posts: 296
- Joined: 15.07.2003
- With us: 21 years 4 months
- Location: Bellows Falls, VT
- Contact:
I made a new BCelestia that uses the star flare texture specified by the FlareTexture option in celestia.cfg and can reload the flare texture. It's much quicker to compare different flares now.
The main changes were made in the render, celestiacore and configfile cpp files.
http://www.rit.edu/~bjr5096/celestia/BCelestia.html
Brendan
The main changes were made in the render, celestiacore and configfile cpp files.
http://www.rit.edu/~bjr5096/celestia/BCelestia.html
Brendan
This seems to be a very useful feature, specially when tweaking user-made trajectories, placing objects at specific positions, etc.
Since this is a trial and error procedure, having to close and reopen Celestia each time for the changes to take effect is tiresome.
Also, it could be the basis for activating/deactivating addon packages and sets of addons from inside the program (e.g. using a dialog box).
Since this is a trial and error procedure, having to close and reopen Celestia each time for the changes to take effect is tiresome.
Also, it could be the basis for activating/deactivating addon packages and sets of addons from inside the program (e.g. using a dialog box).