Jump to content

Milorgmannen

Members
  • Posts

    4
  • Joined

  • Last visited

Reputation

0 Neutral

Contact Methods

  1. That would be precise what I'm doing I didn't know anything about orbits other than KSP before I started, all I have is Wikipedia The drawing was not quite accurate but my point was that it seemed like the orbits were shifting. I'm only modelling space combat in LEO. Currently I have no idea of how to make it work, but it is fun just trying to find out what that would work, and what that doesn't, I have studied all kinds of warfare on earth, I figured it was time to look to the sky. First problem other that weird orbits is that space even around earth is huge, I have to make the tools needed to find and destroy enemy ships. I decided to simplify things by going 2D, and I might go for a micro earth later if I continue to have problems finding the enemy ships The interesting part is here. It might just be a rounding error? //Each orbiting object int bb = 0; while (bb < orbitingObjects.Count) { //Apply gravity orbitingObjects[bb].radius = Math.Sqrt(Math.Pow(orbitingObjects[bb].position.X, 2) + Math.Pow(orbitingObjects[bb].position.Y, 2)); double gravityVelocity = earth.gravity * (earth.mass / Math.Pow(earth.radius, 2)); //earth.mass = 5.975e24; earth.radius = 6.37814e6; orbitingObjects[bb].angle = Math.Atan2(orbitingObjects[bb].position.X, orbitingObjects[bb].position.Y); orbitingObjects[bb].velocity += new Vector2((float)(Math.Sin(orbitingObjects[bb].angle) * gravityVelocity), (float)(Math.Cos(orbitingObjects[bb].angle) * gravityVelocity)); //Move item orbitingObjects[bb].position -= orbitingObjects[bb].velocity; bb++; }
  2. The planet is not rotating.I wasn't thinking of that
  3. Hi, I'm toying around with making a Low Earth Orbit RTS, purely just to see if it could work. But I'm wondering if my orbits are realistic. Currently any orbit that is not circular but like an ellipse will "move" its highest point around the earth each orbit. Like this. Playing KSP makes me thing that something is wrong here. Is it?
  4. If we get a "deep" space engine, I guess that it will be very low trust and lots of fuel for it. (Fuel that is not compatible with other engines) If they add a engine with lots of thrust and low fuel consumption, wouldn't it make all other engines redundant?
×
×
  • Create New...