Simplifying Orbital Mechanics

Thanks!! I hope there are a million people like you out there :thumbup:

This forum should be the first to get news about the open alpha.

Hmm, I do have a question... anyone know how to calculate an orbital trajectory given the position and velocity of an object, and given constant gravity about a perfectly spherical body with a known radius?

Or better yet, some way to predict the position of an orbiting body at a time 't', given the above parameters?

The planet itself is static, and can be considered the center of the universe.

I want to try and plot an orbital path... something like the Orbit MFD, but with less acronyms ;) (and possibly 3D... yay for onboard computers with GPUs :lol:)

Cheers
 
Last edited:
I've got an idea for your already awesomely cool sounding game, you could have 'difficulty levels', like on one level the physics are easy, on the other really accurate.
 
I've thought about that... like easy mode having that pseudo-orbit thing I mentioned earlier, and a 'hardcore' mode with true physics... but I'm not sure...

It's completely possible to do it like that, but I don't know if that would cause a player base split (in case of multiplayer)... since some would be playing on easy, others on hard...
then again.. that might not be a problem at all really... but it would be twice the work to implement both modes, and some interface screens would be pointless in easy mode

another idea is to not alter the physics at all, and let the user choose the amount of autopiloting and guidance assistance as per easyness level...

on extreme easy mode, the autopilot is handling 5 axes of movement, so you only have to regulate the throttle to keep the craft from exploding...

on normal, the autopilot provides attitude assistance, like in Orbiter, and there is guidance assistance for the flight path you should be following

on hardcore, we essentially have orbiter.

maybe that could work... it could be more trouble than doing 2 sets of physics actually... I'll have to think about this...

In any case, the game won't be as complex as orbiter, since the planet is a lot smaller, so an orbit only takes about a minute or two... this also means that you need a lot less burn time to complete maneuvers, and everything is made a lot simpler just because of that.

Also, the interface I'm planning won't have nearly as many acronyms as orbiter ;) PeA and ApA can be called Low point and Hi point... normal and antinormal could just be 'orbit left' and 'orbit right'... also, the external camera will always orient to the surface, or the equatorial plane, if you're far away enough... a camera completely attached to the ship does cause some disorientation... and that's what the internal camera is for :)

well, I got differential thrust implemented on solid rockets now... I'm crashing a lot less ;)

I'm also slowly moving the control set towards a full 3D setup... but that might take a while.

Cheers
 
Last edited:
I like the concept of having the planet being at the centre of the universe, it does solve some latency issues that OMP is having because the "map" is not exactly static but hurtling around the sun.

Ancient Chinese lore also depicts the Earth at the centre of the universe (or more precisely, China...)

Lol.
 
I like the concept of having the planet being at the centre of the universe, it does solve some latency issues that OMP is having because the "map" is not exactly static but hurtling around the sun.

Ancient Chinese lore also depicts the Earth at the centre of the universe (or more precisely, China...)

Lol.

Yeah, I'm not going into that much depth... If there comes a time when we decide that it should be possible to travel to other planets, we will (very scientifically) invent a warp drive. :stirpot:

Cheers
 
That's easy, just set a "lagrange point" waypoint and when you close in with it the autopilot kicks in and the game shows a fancy warp drive animation :D
 
Hmm that's a neat idea...

I was thinking something more along the lines of a booster, that one could dock with in orbit... like the one in Star Wars Episode II (when Obi-Wan takes a starfighter to Kamino)

2 years ago I tried making such a ship as an addon for Orbiter... The DG Booster Ring... it never got finished though... but I still like the idea.

Cheers
 
that would be nice as well - launch the long range drive unit with a separate rocket and rendezvous the spacecraft in orbit for added challenge!
 
that would be nice as well - launch the long range drive unit with a separate rocket and rendezvous the spacecraft in orbit for added challenge!

Or better yet, build it in orbit!! :)
 
Yes, for one "Iron Man" game mode, no heavy lift capability is available to the player. However he has access to lots of R7 type early launchers and must simultaneously plan multiple missions in a salvo launch to build the interplanetary vehicle in orbit faster than the AI opposition who is also in the same "Space Race".

Add realistic chance of failures and you might even get to do some crisis management in zero G, not being able to assemble the entire vehicle but still have to get the astronauts to the Moon or Mars and support their manned mission.

If internationally there were massive failures then there might even be a chance to create an international venture. N-1 Apollo lunar mission anyone?
 
I like the sounds of what you're making. I was also a big fan of I-War, having everything orbit in that may not have effected the game-play massively, but it would have been a very nice feature.

I've been on and off working on a project myself not entirely dissimilar, although mine is more along the lines of interplanetary shipping and trading than launching from planets. It models the solar system in 2D looking from "above", so to speak. It projects the positions of the various bodies, planets, ships by varying mean anomaly over time and currently uses a very rough patched conic approximation for dealing with sphere of influence changes for ships. So far I've been making it in flash with some inspiration from KOST, which someone recommended to you in a different post.

Regard's predicting the position of a body at time t or projecting it's path, I take it's state vector, convert it to Kepler Elements and then using a conversion from Elements to Position I step though the Eccentric Anomaly with some amount of subdivision to generate a list of points which make up the orbit path. Depending on your conversion it can work just as well for ellipse and hyperbola. I based mine of KOST as I found it easier to understand what was happening through reading the code in that than just reading the wiki articles. Of course if you have multiple gravity sources then you need some way to patch different projections together or determine something even more clever. And if you have any suggestions regards that I would be eager to hear of them.

I also want to find that golden mean between accessibility and realistic mechanics. I reckon that as long as you provide people enough, well presented information about how their actions have effect on the situation you can manage with a lot of the realistic measures. The complexity is that the changes to the ships trajectory based on your inputs are not always entirely intuitive, but once that's shown or demonstrated people should be able to understand them, just like any flight sim. Also I would keep it as 2D, I feel there is enough in the idea of the game to be a rich experience without having to deal with the added effects of 3D. It certainly sounds like something I'd play and enjoy. I love anything that give's me an opportunity to design and test/use space ships.

My current gripe is regards AI and planetary transfer calculations. For a given ship and a given delta-v I need to find the direction to burn the engines that will result in a rendezvous with a body. I have a version that works, kinda, but is rather brute force.
  • It steps through all the angles calculating what the resultant velocity from expending the delta-v in that direction would be.
  • Then it calculates the intersection points of the resultant orbit ellipse and the targets orbit.
  • It then get's the times of intersection and compares the ships and targets position at that time to see if they are close enough to be considered an arrival.

I need a way to make it more intelligent because it's kinda slow even for one ship, let alone several potential AI craft trying to calculate transfers at the same time. I will use some manner of task distribution to split it over several frames but I can't help but wonder if there is some clever trick that I'm missing that could speed things up.

You can have a look here http://helios.patrickhogan.org/Solar.htm
The green dot is a ship. The arrow keys control its velocity in the cardinal directions relative to the screen.
1,2,3 and 4 change the speed of time. 1 = stopped, 2=relative to orbit period, 3 and 4 are generally faster.
+/= and - change the zoom.
S focuses the camera on the ship, E on the earth, C on the Sun.

Y will suddenly change the orbit of the ship, essentially it runs the transfer algorithm I described and sets the ships velocity to be the best it found. I can't recall what delta-v the version listed uses, I think it takes the ships current velocity's length and uses that, essentially changing the ships directing while keeping all it's speed. The transfer algorithm is currently hardcoded to have the moon as it's target and if you leave Earth's sphere of influence pressing Y wont do anything.
Ignore the debug text in the top corner.


P.S. It seems I wrote a lot more than I intended and possible not all fully relevant to your thread. Sorry
 
Hi,

Thanks for the long reply!! for me nothing about this is irrelevant.

I've also been thinking about the 2D vs 3D thing... and I feel that ultimately, there is more potential for fun in a 2D game... I mean, I'm not doing a remake of Orbiter here... it's not meant to be a realistic flight sim, but it should present realistic challenges to flying a spaceship. Going full 3D will only complicate gameplay further... while it adds little to the enjoyment of the game. You will already be managing your bank angle, throttle vs temperatures, and coordinating stage separations... so you've got your hands full already.

Right now my goal is this:

. 2D gameplay over a 3D world (like LittleBigPlanet, minus the platform-game part)
. Full newtonian orbits: there is (will be) a screen that shows your predicted trajectory, so you know how it's working out. This screen will also open up a larger, rotateable 'map' of sorts, where you can see in detail what is going on.
. The game will gradually introduce the more complicated mechanics... at first, your main goal is not to explode and go as high as you can... pretty simple. By the time you do reach near-orbital or orbital capabilities, you should already be interested enough in the game to want to master those dynamics.
. The ship builder portion of the game does allow turning the camera around, so you are not restricted to a flat ship.

Currently I've got orbital mechanics in place, and a crude trajectory prediction panel... Instead of showing an orbital ellipse, I'm just integrating ahead of the simulation and plotting positions in the future. Right now these points are just being drawn onto a black texture, and it looks as horrible as it sounds ;)
Later I will plot the trajectory samples onto a 3D path, and create a better looking setting for it.

Thanks again for the reply! It was a touch of inspiration right when it was most needed!! :cheers:

Cheers
 
Last edited:
Back
Top