There was a bug that kept it from working under certain circumstances. Download this and use it instead:

http://orbitsimulator.com/gravity/beta/GravitySimulatorBeta27June2007.exe . Also, see if there is a file on your computer called c:\test.txt . If there is, you can delete it. Gravity Simulator created it for my debugging purposes, and I forgot to delete it from the last beta.

**Quote from Mal on 06/26/07 at 23:35:34:**I think you may have to walk me through this a bit.

So let's say i want to go from 1.5 solar masses to 0.5 solar masses over a fixed period of time (eg 1000 years). How do I start and stop that? There's an "execution time" that is presumably when it starts decreasing, but how do you stop it? What are the units of whatever goes in those four boxes?

(I thought you had a tutorial for the autopilot somewhere on the site??)

Just hit the Help menu in Gravity Simulator, and it will jump you to the help page, or you can go directly:

http://orbitsimulator.com/gravity/tutorials/tutorials.html The numbers in the boxes are the coefficients of the polynomial that will define the rate of mass change. Their units are mass/time.

If we want it to drop the mass of an object linearly from 1.5 solar masses to 0.5 solar masses over 1000 years, we need to do a little computing:

We want a line that describes the mass as a function of time. For a linear change, use the basic equation of a line: y = mx + b. We want this line to pass through the points ( 0, 1.5 ) and ( 1000, 0.5 ). These points represent the star's mass at t=0 and at t=1000 years.

But Gravity Simulator likes units of Earth masses and seconds, not Solar masses and years, and in this beta version I don't allow you to choose units, so you have to transform these points. 1 solar mass = 332983.46 Earth masses, and 1000 years = 31557600000 seconds. So our transformed points are ( 0, 499475.19 ) and ( 31557600000, 166491.73). These points represent the star's mass in Earth masses at t=0 seconds and the star's mass in Earth masses at t=31557600000 seconds.

Returning to the basic equation of a line, y = mx + b, y = mass (Earth masses), m = slope of the line (mass/time), x = time(seconds), and b = the y-intercept which is the value of y (mass in Earth masses) when x (time in seconds) = 0, which is the original mass, in this case 499475.19 Earth masses.

y is what we want Gravity Simulator to compute with each time step. We know x and b. They are 31557600000 seconds and 499475.19 Earth masses. We need to solve for m, the slope of the line. Slope = rise over run: ( y

_{2} - y

_{1} ) / ( x

_{2} - x

_{1} ). We can use our 2 points ( 0, 499475.19 ) and ( 31557600000, 166491.73) to compute the slope, m.

( 166491.73 - 499475.19) / ( 31557600000 - 0 ) = -1.055E-05

So our equation of the line becomes:

y = -1.055E-05 x + 499475.19

Just to double check, plug in 31557600000 for x

-1.055E-05 * 31557600000 + 499475.19 = 166542.51 which is the correct value for final mass after 1000 years (slightly off since I rounded my numbers).

Plugging this into Autopilot:

menu Autopilot...

In the Command list, choose Dynamic mass.

Choose the time and date when the mass decline is to begin.

Choose the object whose mass you would like to alter.

Leave the t

^{4}, t

^{3}, and t

^{2} boxes at 0 since we want a linear decline. In the t box put the value of the slope: -1.055e-05. Press Add >>.

In the Command list, choose Dynamic mass again.

Add 1000 years to the date when the mass decline begins.

Choose the object whose mass is being altered.

Enter 0 for all 4 boxes.

Press Add >>.

Press OK.

Your object should spend the 1000 years as defined by your 2 autopilot commands decreasing linearly in mass from 1.5 to 0.5 solar masses. If you want a polynomial decrease, then use the values for t

^{4}, t

^{3}, and t

^{2}.