WxPython Front-end for Celestia!

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
RocketMan@JSC
Posts: 43
Joined: 29.01.2005
With us: 19 years 8 months

WxPython Front-end for Celestia!

Post #1by RocketMan@JSC » 02.12.2006, 06:06

I've been tinkering around with wxPython and have found it pretty easy to implement new GUI features for Celestia. At my job we use alot of python and recently started moving towards wxPython for our GUI's, so I was looking for some kind of training project.

Here's a screenshot of a very simple demo that has most of what the GLUT version has. Of course adding menus and dialogs are very straightforward, the hard part was getting the OpenGL rendering into a wxGLcanvas and integrating it into a wxAUI notebook.

Image

Also shown is the eclipse IDE with Celestia as the C++ project with wxPython modules for the GUI front end. There were zero changes to the Celestia source code, but I did have to modify the make files to enable building the Celestia libraries as shared objects. Basically I used SWIG to generate the python bindings to the Celestia core--except for the learning curve, this was really prettty straightforward.

My ulterior motive is to eventually have this hooked up to a simulation for STK like trajectory analysis work.

It should be possible to put nearly all the features (even video recording) into a platform independent front-end that could potentially replace many if not all of the existing front-ends currently in use. Anybody interested?

Scott

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

Post #2by chris » 05.12.2006, 08:50

I'm interested in hearing about how well this all works out . . . Switching to Python for the default Celestia user interface would be quite a dramatic step, but I'd like to see it in action. Also, if you run into any obstacles in your project, please post them here.

--Chris

Topic author
RocketMan@JSC
Posts: 43
Joined: 29.01.2005
With us: 19 years 8 months

Post #3by RocketMan@JSC » 05.12.2006, 23:27

chris wrote:Also, if you run into any obstacles in your project, please post them here.


Actually there is one thing I'm trying to do but thus far I'm stumped.

What I would like to do is be able to render multiple Celestia views within different panes on the wxGlcanvas. Right now in Celestia we can split views and have each one be a separate view but it is all contained in the same OpenGL rendering context, and each view gets smaller and smaller as the number of views are added. If you look at my Pyces app in the image I included, you will see notebook tabs for multiple views (view 2 in the image). I would like to render full size separate views into each tab and/or create more tabs on the fly--the advantage being each view is full size. This capability is very similar to STK. Best I can tell is the CelestiaCore is not set up to do that and I would have to custom develop that part myself. I'm pretty new to the OpenGL stuff and any advice you could give me in that area would be appreciated.

Once I get that down, I will try to hook up pySPICE, the Open Sessame simulation and matplotlib to actually provide some spaceflight simulation tools.

Scott


Return to “Development”