Jump to content
Science Forums

Recommended Posts

Posted
Well, here it is. Ugly and bloated, but functional. I need to step away from it for a while. Then I will add rockets, stages, and thrust vectors to the thing. For now you can do fun things like make a universe of two bowling balls 1 km apart and see how long it takes them to come together from their gravitational attraction. :)

 

Bill

The Add button makes a new object. All of the data is blank.

 

The Update button takes the values in the text fields and applies them to the controls. If any of them is left blank it disables that object and it will not be part of the sim. If all of them are blank it deletes the object from the list. The last text field is pretty much useless as the aVelocity is calculated from the velocities in the three dimensions.

 

The Open button lets you open a new sim. It does not prompt you to save your current.

 

The Save button saves your current sim. Note: it saves based on the current runtime values in the fields, not on the values in the text boxes.

 

The Reset Sim button resets it to use the values in the text boxes. Basically is starts it over again.

 

The Start/Stop button does just that. It also is the point where the log is committed to the log file (at stop).

 

The Log Interval is how often it adds the current values to the log. I have it defaulting to every minute. the rest is the information about where the logging happens.

 

In the log file it SHOULD always have the first row as the column headers, but I never did get that working perfectly. Sometimes it misses the header and 0 entry :D. It was also giving me blank lines in the log that I could not replicate in testing.

 

Bill

(originally from PM to Craig. Why I didn't just post it is beyond me...)

Posted
The Add button makes a new object. All of the data is blank....
We don't need no steeeenkeen documentation! :evil:
In the log file it SHOULD always have the first row as the column headers....

There is always one more bug!

 

I must say though that your user interface is light years ahead of the Apollo LM! :D

 

Once the rockets are up, who cares where they come down? That's not my department, :)

Buffy

Posted

Anyone who would like to can run XGRAVSIM4.

 

In order to do so, you’ll need a MUMPS language interpreter. A free, non-expiring, single user copy of the one I use can be had at Free Caché Downloads. The vendor, Intersystems, requires you register an email address with them to get it, but in my experience won’t spam you unless you request it, or give the address to any other company.

 

Pay no attention to the name “Cache”. Intersystems makes a great effort to hide the fact that Cache is, in fact, a (much extended) implementation of the MUMPS language, but it’s one of the best.

 

Once installed, you need only click on the icon it installs in your system tray, or follow the start menu path to its “Terminal” application, and paste the following into it

 f  r R q:'(R)  s I=((R,";",(R,";")),":") i (I) s @I=R

(making sure to end with exactly 1 Enter keystroke) followed by the “MUMPS code for XGRAVSIM4” in post #6, followed by a blank line (the Enter key), followed by

x XGRAVSIM4

. For documentation, enter ? at the XGRAVSIM4> prompt.

 

You can then paste any of the command lines in my examples above into it to run it, or make up your own.

 

To do anything but manually adjust the acceleration of bodies, you’ll need .X property code, which you must know MUMPS to write. Post #6 has a little .X program that allows you to set a specific impulse of the motor (ship.X(“SI”)) the empty (no propellant) mass of the ship (ship.X(“M0”)) and a propellant flow rate (ship.X("Mf")) which can be pasted into the sim to see how simple rockets in a vacuum would behave. Note that in my example, I forgot to multiply the SI of 250 seconds by 9.8 m/s/s, so my 1000 kg rocket is under-powered by a factor of nearly 10 vs. a real solid fuel rocket – though it still flys :D

 

A nice feature of XGRAVSIM4 is that you can enter $.all to output the “all simulation data” property, which is all the properties necessary to run the sim. These can easily be copied and pasted into text files, then pasted into the simulator with slight changes to run another simulation – just note that all output starts with a # comment character, which must be removed before pasting it actually does anything, and any line wrapping must be fixed manually (or avoided by capturing the text using File, Log in Terminal, or something similar)

Posted

Okay, here's a demo of a moon-shot with orbiter :

 

It shows my simple mesh of the lander on a intersect orbit with the Moon's surface. I started with 1850kg in LEO and used the spec for an off-the shelf booster to reach transfer velocity. It required a small course correction mid-flight to make the intercept.

 

The top information screen shows the oribtal information.

In order from top to bottom are:

 

semi-major axis

semi-minor axis

periapis distance

apoapis dist.

radial distance (at this instant)

eccentricity

period

time to periapis

time to apoapis

velocity

inclination

longitude of accending node

longitude of descending node

argument of periapis

true anamoly

true longitude

mean anamoly

mean longitude.

 

at the bottom next to the G is the G-field contribution.

 

The graphic shows the orbit in green. (the moon is the white circle)

The green line traces out the present radius vector.

The dotted line joins the nodes of inclination. Solid sqaure is the ascending node and the hollow square the descending.

 

Solid circle marks the periapis and hollow circle the apoapis.

 

You can add a second "target" orbit which will be shown in yellow, with its parameters down the right side.

 

 

 

The bottom display give readings relative to the Moon surface and contains the info you would use to make a soft landing.

 

It contains: an

artificial horizon

heading indicator.

ground speed (GS)

altitude (ALT)

vertical speed(VS)

pitch (PTCH)

bank (BNK)

Acceleration indicator (ACC)

Atmoshperic date (not applicable here)

Equalaterial postion and rate (EQU POS)

angle of attack(A0A)

vertical Acceleration (VACC)

 

These are just a couple of the information displays that can be brought up.

 

I had a little trouble creating the custom spaceship at first. Even following the docs anf tutorials step by step, the program crashed every time I launched it.

 

I finally resorted to hijacking an existing ship (satellite actually), and plugged my mesh and parameters in. The program accepted that. Hopefully, making use of the multistage settings won't cause the same problems.

Posted

Fantastic Janus! Incredible. I am glad I spent the weekend working on my program, it was very educational. It seems somehow insignificant now - like I was rubbing two sticks together and you showed up with fireworks and an acetylene torch.

 

So, graphics aside, have you worked out the mission profile for a direct trajectory? If you can post a video of the mission that would be spectacular.

 

Bill

Posted

 

So, graphics aside, have you worked out the mission profile for a direct trajectory? If you can post a video of the mission that would be spectacular.

 

Bill

 

As of this point, It's a Ranger mission style hard impact trajectory. It will take some tweaking to simulate a soft landing. I could do it with the present set up by adjusting the fuel levels, but it wouldn't be realistic, as it would be using the same engine for trajectory boost as landing, and typically you would use separate engines for these tasks and discard the booster.

 

There is a flight recorder for the sim, that I should be able to use to create a video file.

Posted

I've made some progress with the orbiter sim. I can now create new ships without hijacking another ship's config file. This gives me a lot more flexibility. For instance, I can now simulate a transfer booster-lander combination and jettison the booster after it's exhausted.

 

Here are some screenshots of what I've gotten so far. Clockwise from the upper left are:

The booster-lander package.

The package with the booster firing.

Just after the jettisoning of the booster stage.

Some time after the separation of the Booster and lander.

 

 

I've gotten pretty good at hitting the moon, and am now working on the soft landing stage of the mission.

 

Iv'e also been working on a method of producing a demo video, but so far the resuts haven't be very good. The results are choppy, and the quality isn't that good due to having to keep the image size down.

 

For the best results quality-wise, it is best viewed from the Orbiter program itself. It can be downloaded as freeware. I can then provide all the files needed to run the lander sim. Just put them in the right folders and run it. One of the advantages of this is that the person playing back the sim can change viewing perspective, and even bring up different information displays as the sim plays back.

  • 2 weeks later...
Posted

Okay, After quite a bit of fine tuning and adjustment I've come up with a video of the Lunar sim. It doesn't cover the actual soft landing, ( I'll do a second video for that) as youtube has a 10 min video limit, and I can't quite squeeze the whole mission into that short a time.

 

Of course, some of this video is time compressed, otherwise I would have a video that lasts for several days. Other parts of the sim run at real time, and certain parts run at 1/10 speed. The reason for this is that in order to get the video, I had to essentially record my computer screen with a digital camera while I actually ran the sim. Since certain points of the mission are very time sensitive, and some events have to be manually initiated, I had to slow things down, to get the timing right.

 

There are two information displays at the bottom of the screen, which change function as the sim progresses. At the start the left display shows the oribt with respect to the Earth and the right is a transfer tool that aids in timing the transfer boost. After the boost ends the right display is changed to show the craft's trajectory with respect to the Moon. On approach to the Moon the left display changes to the type of info needed to plot the landing; Altitude, vertical and ground speed, an artificial horizon, etc.

 

That's about it so here's the video, You'll probably have to turn the volume up to the hear the audio, it recorded a little on the low side.

 

YouTube - Lunar lander sim 1 http://youtube.com/watch?v=_15tYYwWyIw

Posted

Wow!

 

Is the Strauss soundtrack a feature of Orbiter, or something you added, Janus. In either case, a nice touch. B)

 

I didn’t notice any mid-course correction maneuver. Was this because there was none, or was it unnoticed due to the time compression? I recall from some of the Apollo data I’ve been using that, given the precision available to even modern spacecraft, a mid-course correction is a practical necessity.

 

So, to save me the labor (and test of my practical orbital mechanical skill ) of calculating them myself, can the Orbiter run produce a thrusts data (time, magnitude, and vector) in a simple text format. I’d like to plug it into XGRAVSIM4 and see how it works. And, of course, the data must be available in a form that can be used to actually program the control system of a spacecraft.

 

Given that there are so many science and commercial satellites performing routine orbital maneuvers, there must be some standards for this sort of control data. Is anyone familiar with them?

Posted
Wow!

 

Is the Strauss soundtrack a feature of Orbiter, or something you added, Janus. In either case, a nice touch. B)

 

I didn’t notice any mid-course correction maneuver. Was this because there was none, or was it unnoticed due to the time compression? I recall from some of the Apollo data I’ve been using that, given the precision available to even modern spacecraft, a mid-course correction is a practical necessity.

 

So, to save me the labor (and test of my practical orbital mechanical skill ) of calculating them myself, can the Orbiter run produce a thrusts data (time, magnitude, and vector) in a simple text format. I’d like to plug it into XGRAVSIM4 and see how it works. And, of course, the data must be available in a form that can be used to actually program the control system of a spacecraft.

 

Given that there are so many science and commercial satellites performing routine orbital maneuvers, there must be some standards for this sort of control data. Is nayone familiar with them?

Since we are not trying to enter lunar orbit I would guess that a mid course correction might not be needed. The proper alignment for entering lunar orbit is much narrower than for hitting the moon close to the middle.

 

In watching the video I could not tell how the sim was accounting for the transition from earth to lunar gravity. I was playing one of the games someone had posted a couple on months ago last night, the gravity pods game. I am hoping that the sim I built will eventually work something like that, only on a much grander scale. I will leave it to the experts to do the realistic sims, and give us an idea of the launch windows we should be looking at for optimum payload delivery.

 

I loved the Strauss touch too.

 

Bill

Posted
Wow!

 

Is the Strauss soundtrack a feature of Orbiter, or something you added, Janus. In either case, a nice touch. :evil:

 

I added the soundtrack and text overlays in "post production". I thought it was too dead with out some audio, and all the audio from the original recording had was background noise.

 

I didn’t notice any mid-course correction maneuver. Was this because there was none, or was it unnoticed due to the time compression? I recall from some of the Apollo data I’ve been using that, given the precision available to even modern spacecraft, a mid-course correction is a practical necessity.

 

Generally, most of the mid course correction is what is known as a "broken plane" maneuver. This correction aligns the inclination of the transfer orbit to that of the Moon. This is done by waiting till your trajectory crosses either the ascending or decending node of the Moon's orbit and then making a burn along the normal of the orbital plane. The rest of the correction is to make up for practical variations between the calculated and actual performance of the engines.

 

 

I eliminated the need for the broken plane maneuver at this point by starting from an LEO orbit with the same inclination as the moon, and since the sim is a theorectical model it doesn't suffer from the types of variations in engine performance a physical engine does. In the real world we would need to allow for such a mid-course correction.

 

 

 

So, to save me the labor (and test of my practical orbital mechanical skill ) of calculating them myself, can the Orbiter run produce a thrusts data (time, magnitude, and vector) in a simple text format. I’d like to plug it into XGRAVSIM4 and see how it works. And, of course, the data must be available in a form that can be used to actually program the control system of a spacecraft.

 

I can give you some of that info here. The engine thrust for the booster is 23206 Newtons, ISP 288 secs (These are based on a real world, off the shelf, solid rocket engine).

For this sim my intial fuel mass was 1324.7 Kg, of which, 5.2988 kg was used to make the attitude adjustment prior to main ignition, leaving a fuel mass of 13.4012kg. The empty mass of the booster was 147.4 kg and the payload (lander package) massed 500 kg. The booster ran till it exhausted its fuel which took 160.5 sec.

thrust vector was prograde to the orbit.

 

The separation of booster and lander package imparted a delta v of 1m/sec to the lander.(This is one of those time sensitive events, if the separtion doesn't happen within 1/2 sec of burn out, the package will miss the moon or will need a mid course correction later. )

 

Given that there are so many science and commercial satellites performing routine orbital maneuvers, there must be some standards for this sort of control data. Is anyone familiar with them?

Posted
In watching the video I could not tell how the sim was accounting for the transition from earth to lunar gravity. I was playing one of the games someone had posted a couple on months ago last night, the gravity pods game. I am hoping that the sim I built will eventually work something like that, only on a much grander scale. I will leave it to the experts to do the realistic sims, and give us an idea of the launch windows we should be looking at for optimum payload delivery.

 

I loved the Strauss touch too.

 

Bill

 

If you watch the display on the right after it switches to moon orbital reference you can see how the projected trajectory changes as the Earth to Moon trajectory progesses. Also, in the original right display is a function that will plot the trajectory taking the Moon's gravity into account.

Posted

As promised, here is the landing stage of the mission.

 

I picik the mission up at an altitude of 200 km and then procede with a gravity turn landing. I use a retrorocket package to kill most of the lander's velocity, which sparates away at about 8 km altitude, where the lander's egines take over. I did this because I needed a fairly powerfull engine to kill the velocity, but it was easier to land with smaller engines with finer control.

 

The little jump you see at separation is the veiwpoint shifting focus from the retro stage to the lander. I haven't quite figured out how to eliminate it.

The video also ends just a split second before actual touchdown. That's a post-production error that I missed.

 

 

Landing point is 2°E 1.25°N. On the Eastern edge of Sinus Medii (Central Bay), about 30 km East of Blagg crater. Just about smack dab in the middle of the nearside of the Moon.

 

From the point of ignition of the transfer booster to lunar touchdown the mission takes 4 days, 1hr, 7 sec. Date of launch chosen was Jan 30, 2008.

 

YouTube - X-prize lunar landing http://youtube.com/watch?v=n-KcTwMYSgA

  • 2 months later...
Posted

Here's some screen shots from launch onward. The launch vehicle is based on the Eurocket. From top left clockwise: (1) launch (2) first stage separation (3) second stage separation (4) third stage and fairing separation.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...