Ive been working on a gravity model for celestia.
Now as you move about the solar system an accelleration vector is calculated by adding up all the gravitation effects from each of the planets on the observer.
the sum of An = G * (Mn/r^2)
If you travel to the surface of the earth it will read 9.808 ms^-2
it will also vary slightly as the moon orbits (tides)
Ive added Mass entries (kg) in the solarsys.ssh file for all the planets of sol and earths moon.
Mass has not been assigned to stars as yet, but will be soon (chris) ;)
Im too lazy to assign masses to all the other bodies. and the other system planets have the mass in another unit. (jupiters)
The next step is to make this vector affect the observers velocity. (and map the velocity to the time compression).
Then thrusters, autopilot, lasers, spacestations, docking music, hyperspace and Elite! see http://freelite.sourceforge.net
here is a link to what ive been working on
http://www.users.bigpond.com/ryears/cel ... ravity.zip 465k
It includes a win binary, solarsys.ssh and the source i modified.
hopefully i havnt stuffed anything and works on your systems
im interested in your comments.
gravity model
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years
- Location: Seattle, Washington, USA
gravity model
marc wrote:Ive added Mass entries (kg) in the solarsys.ssh file for all the planets of sol and earths moon.
Mass has not been assigned to stars as yet, but will be soon (chris)
Im too lazy to assign masses to all the other bodies. and the other system planets have the mass in another unit. (jupiters)
I found a table in one of my astrophysics texts that lists estimated masses for different stellar spectral and luminosity classes. I began entering the data last night--should have the change ready tonight. The masses for the other planets are actually in units of Earth mass. This seemed like the most convenient for .ssc files. The XML format supports units, so you can write mass="4kg", mass="1.2Me", or mass="1Mj" for kilograms, Earth masses, or Jupiter masses.
--Chris
-
Topic authormarc
- Posts: 426
- Joined: 13.03.2002
- With us: 22 years 11 months
- Location: Outback Australia
debugging
thanks Chris
ive been adding the masses as
Mass 4.5e22
will have a closer look at that, as im unfamiliar with XML
I want to say that I really enjoy tinkering with celestia. Its preventing me from doing my homework and ive been staying up late...
Ive been using MSVC.6.0 as a glorified text editor and makerelease.bat to compile.
Id like to be able to step through the code with the debugger but i get linker errors when trying to compile under MSVC6.0...
winviewoptsdlg.cpp
Linking...
winmain.obj : error LNK2001: unresolved external symbol "void __cdecl CenterWindow(stru
etc..
being able to step through the code would me learn how it all works a lot quicker.
can it be done?
and what environment(s) do you usually develop celestia in?
Most of my programming experience has been using borland products, and im kind of new to MSVC, and i have some linux experience ( though not developing).
Marc
ive been adding the masses as
Mass 4.5e22
will have a closer look at that, as im unfamiliar with XML
I want to say that I really enjoy tinkering with celestia. Its preventing me from doing my homework and ive been staying up late...
Ive been using MSVC.6.0 as a glorified text editor and makerelease.bat to compile.
Id like to be able to step through the code with the debugger but i get linker errors when trying to compile under MSVC6.0...
winviewoptsdlg.cpp
Linking...
winmain.obj : error LNK2001: unresolved external symbol "void __cdecl CenterWindow(stru
etc..
being able to step through the code would me learn how it all works a lot quicker.
can it be done?
and what environment(s) do you usually develop celestia in?
Most of my programming experience has been using borland products, and im kind of new to MSVC, and i have some linux experience ( though not developing).
Marc
-
- Posts: 79
- Joined: 30.01.2002
- With us: 23 years
- Location: Villaviciosa de Od?n, Madrid, Spain
Oh, my, XML!
Chris, if you are done with the XML DTD, could you send it to me so I could start adapting the asteroid collection (or devising XSL stylesheets for it...) If you aren't finished with the design, maybe I could be of some help...
Best regards.
Bruckner
Best regards.
Bruckner
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years
- Location: Seattle, Washington, USA
Oh, my, XML!
bruckner wrote:Chris, if you are done with the XML DTD, could you send it to me so I could start adapting the asteroid collection (or devising XSL stylesheets for it...) If you aren't finished with the design, maybe I could be of some help...
Being an XML newbie, I'd certainly appreciate some help. I'll send you the DTD when I get home. There's a file called solarsysxml.cpp in the celengine directory (present only if you're building the CVS tree) which implements the XML parser.
--Chris
-
- Posts: 79
- Joined: 30.01.2002
- With us: 23 years
- Location: Villaviciosa de Od?n, Madrid, Spain
Thank you
I have pulled Celestia sources from CVS again, and there it is, the XML parser. Does that mean I can test XML ssc data files already? (I'll wait until I get the DTD, however).
Sorry to hear that you got your web server rooted... It's a risk we are all exposed at.
Best regards.
Bruckner
Sorry to hear that you got your web server rooted... It's a risk we are all exposed at.
Best regards.
Bruckner