Thursday, January 22, 2015

Orbital Aero Model: Intro

Back in college (a little over a decade ago), I made an orbital mechanics / space simulation into a MUD (Multi User Dungeon / Multi User Dimension). I used SocketMUD as a base and added in the concept of "bodies" that interact with each other. The bodies would pull on one another with their gravity (based on mass) and could bounce off each other (based on mass and coefficient of restitution). There was also a simple implementation of electromagnetic waves that could originate from a body and propagate through space to impact other bodies (secondary bodies would cause shadows in the electromagnetic wave).

I think I had the sun, planets, Earth's moon, and a couple spacecraft in continuous motion (real time). Users could log in, look at positions and velocities of the bodies, create new bodies, and delete existing bodies. For the year or so I had the MUD running, I think I had one other person log in and play around with the simulation. So I can't say it was the most popular, but most of the time MUDs are meant for killing goblins and leveling up - not watching x/y/z coordinates change.

The original code worked for what it was, but you can learn a lot about coding techniques in 10 years. So this past year I've been dusting off the old stuff and bringing it back to life. It's no longer a MUD, but I do have a simple visualizer...

video

In this video you can see several spacecraft orbiting the Earth (currently a perfect sphere, but that will change too). The spacecraft nearest to the Earth are actually being dragged down because they're within the Earth's atmosphere. Later in the video you can see a spacecraft orbiting the moon which is orbiting the Earth. I find the history trails of the spacecraft orbiting the moon to be very interesting.

Why call it Orbital Aero?


I want to continue to build as realistic simulation as possible for vehicles travelling on planets, through the atmosphere of planets, and through space. Hence orbital for space and aero for atmospheric effects near a planet. The goal would be to accurately simulate a spacecraft taking off from the Earth, travelling through space, and landing on Mars. (Or to a planet in another solar system!)

80% Solution


I'm developing based on what I'll call the "80% solution". To get near a 100% accurate simulation is extremely expensive (both in development hours and CPU clock cycles). However, to get an 80% accurate simulation isn't nearly as difficult and usually suffices for most customers needs. (Obviously what is "80%" is very subjective.)

I'm going to tackle one concept of the simulation and get it to what I consider 80%, then move on to the next concept. As I go around on the different parts of the simulation (atmospheric modeling or physical shapes of bodies), I'll revisit previous code and essentially redefine 80%.

For example: Right now every body in the simulation is a perfect sphere. To have basic spacecraft orbit a planet, transfer between planets, or escape the solar system, it's good enough. That's what the simulation can do now. However to do interactions between spacecraft and a planet (GPS modeling for example), it's important to have an ellipsoid shape Earth (such as the WGS-84 model). So when the goal is to do GPS, what suffices for 80% is redefined and work will have to be completed to reach that point. To further this point, a WGS-84 round Earth model will suffice for many requirements, but if you're trying to drive a car on the surface of a planet its woefully inadequate. At that point you'll need to load some kind of elevation data such as SRTM (Shuttle RADAR Topology Mission) or DTED (Digital Terrain Elevation Data).

A little background on myself... I got my degree in Aerospace Engineering and have been working on simulation software professionally ever since. This is another long term project. I'll be posting updates on the simulation and the physics behind it as it progresses. If you have questions, comments, suggestions for improvements, or reports of errors then please let me know! (Side note, the Arduino computer is still in the works. I said I've got too many projects!)

No comments:

Post a Comment