<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Flatspace</title>
<Script Language = "JavaScript" >
var prom = new Array(80);
Xposition = 0 ;Yposition = 0 ;Yvel = 0, Xvel = 0; AngleF = 0, AngleSpeed = 0; Speed = 0;
Yacc = 0; Xacc = 0; Degree = Math.PI/180;Fval = 1;Time = 0;Courseval = 0;k =1; Xold = 0; Yold = 0;TargetX = 100000;RangeP2=100;Range = 10;
TargetY = 200000; Xrange = 1000; Yrange = 1000;Radardegree = .001;
function Target(){Xrange = TargetX - Xposition ;Yrange = TargetY - Yposition;RangeP2 = Xrange*Xrange + Yrange*Yrange;Range= Math.sqrt(RangeP2);
Radardegree = Math.atan(Yrange/Xrange);Radardegree = (180/ Math.PI) * Radardegree; RangeP2 = parseInt(RangeP2);Radardegree = parseInt(Radardegree);
alert(" Range = " + Range + "km " + " Azimuth = " + Radardegree + " degrees " + "RangeX = " + Xrange + " RangeY=" + Yrange ) }
function Clear(){Xposition = 0 ;Yposition = 0 ;Yvel = 0; Xvel = 0; AngleF = 0, AngleSpeed = 0; Speed = 0;
Yacc = 0; Xacc = 0;k = 1; Degree = Math.PI/180;Fval = 1;Time = 0;Courseval = 0;k = 1;Xold = 0;Yold = 0;TargetX = 100000;RangeP2=100;Range = 10;
TargetY = 200000; Xrange = 1000; Yrange = 1000;Radardegree = .001 }
function Enter(){k = document.F1.T2.value;k = parseInt(k)*60;AngleF = document.F1.T1.value;AngleF = parseInt(AngleF)}
function Velocity(){Yacc = Fval* Math.sin(AngleF*Degree); Yvel = Yvel + Yacc; Yposition = Yposition + (Yvel + Yold)/2;Yold = Yvel; TargetX = TargetX + 2; TargetY = TargetY+ .3;
Xacc = Fval* Math.cos(AngleF*Degree); Xvel = Xvel + Xacc; Xposition = Xposition + (Xvel + Xold)/2; Xold = Xvel; Speed = (Yvel*Yvel) + (Xvel*Xvel); Speed = Math.sqrt(Speed); Time = Time + (1/1000);
Courseval =Math.atan(Yvel/Xvel);Courseval = (180/ Math.PI) * Courseval;if (Xvel < 0) {Courseval = Courseval + 180}}
function Looper(){for (i = 0;i<k;i++){Velocity()}}
</script>
</head>
<body background="_themes/blends/blegtext.gif" bgcolor="#CCCCCC" text="#000000" link="#993300" vlink="#0000FF" alink="#FF9900"><!--mstheme--><font face="Trebuchet MS, Arial, Helvetica"><p align="center"><font face="Arial Black">Force and Acceleration<br>
</font><font face="Arial">(a Newton's Law physics educational game)</font>
</p>
<p align="left"><br>
<b><font face="Arial" size="3">Acceleration:</font><font face="Arial" size="4"> </font></b><font face="Arial" size="3">This
simulation allows you to move about a flat ( 2 dimensional, gravity free)</font><b><font face="Arial" size="4"> </font></b><font face="Arial" size="3">space
in a ion propelled imaginary space ship. Type in the ship orientation (
force direction) and thrust duration (time, s = .5*a *t^2), and then click ENTER
... button. This enters desired course and duration into space ship ion
propulsion engine control computer. The computer uses the accelerometer sensor
inputs to regulate thrust so as to maintain desired acceleration. Engine
burn does not begin and <b>Time</b> does not change until an <b>Engine Control
Button</b> is clicked. The <b>STOP ENGINE</b> button advances time by an amount
specified (Thrust Duration as entered) at zero acceleration. </font>
</p>
<p align="left"><font face="Arial" size="3">Start by moving along a single axis
at slow speed and note how far you travel in an hour. Though .1 meters per
second per second is less than 1/100 of a earth "g" it is still far greater than what
ion propulsion engine spacecraft can achieve today, but even 1 meter per second
squared may be obtained in the future. Trip starts at X, Y coordinate
0,0. Ignore the target message until you have traveled through of four quadrants of the cartesian coodinate system. Travel through all four quadrants clockwise
and counter clockwise. Next, Click "Reset" and start playing the intercept target game. Try to get close to target without overshooting it. </font></p>
<p align="center"><font face="Arial Black" color="#FF0000">Space Ship
Engineering Control Panel</font></p>
<form NAME="F1" action="_derived/nortbots.htm" method="POST" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit ><!--webbot
bot="SaveResults" startspan --><strong>[Engineering Control Panel]</strong><!--webbot
bot="SaveResults" endspan i-checksum="6561" --><p align="left">
<input name="T1" size="21">
<input name="T2" size="19">
<br>
Enter Ship Orientation(0 - 360 degrees) Enter Thrust
Duration (Integer 1- 1200 minutes) </p>
<p align="center"><input type = "button" value = "ENTER SHIP ORIENTATION AND ENGINE BURN DURATION" name="B5"
onClick = "Enter();Target();document.F1.T2.value = k/60;document.F1.T1.value = AngleF" ;> </p>
<p align="left"><font face="Arial"><b>Speed </b>(km/sec)</font>
<input name="T3" size="25"> <font face="Arial Black">
</font><font face="Arial">
<b>Course </b>(degrees)</font><input name="T4" size="25"> </p>
<p align="left"><font face="Arial"><font size="4"><b>X </b>(in km)</font><b> =
<input name="T5" size="27">, </b></font><b><font face="Arial" size="4">Y</font></b><font size="4" face="Arial"><b>
</b>(in km)</font><b><font face="Arial" size="4"> = <input name="T6" size="27"></font><font face="Arial"> </font></b> </p>
<p align="left"> <font face="Arial Black">Time (in kilo-seconds)</font> <input name="T7" size="27"> </p>
<p align="left"><font face="Arial Black"><u>Engine Control Buttons Below:</u></font> </p>
<p align="left"><input type = "button" value="STOP ENGINE" name="B4"
onClick = "Fval = 0,Looper();document.F1.T3.value = Speed;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval;">
<input type = "button" value = "SLOW (.1 M/S/S)" name="B6" onClick = "Fval = .0001;
Looper();document.F1.T3.value = Speed;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval; " >
<input type = "button" value="Full Speed Adead (1 M/S/S)" name="B7" onClick="Fval = .001;
Looper();document.F1.T3.value = Speed;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval; "></p>
<p align="center">
<input type = "button" value ="Reset" name="B8" onClick = "Clear();document.F1.T3.value = 0;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval; "> <font face="Arial" size="2">Reenter
course and burn duration after <b>Reset</b></font></p>
</form>
<p align="left"><font face="Arial"><b>Note: Ship Orientation </b>and<b> Course</b>
are independent of each other.</font>
</p>
<p align="left"><font face="Arial">Exercise: Travel to X = 1000km + or - 1.0km and Y = 1000km +
or - 1.0 km and stop there ( slowing to a velocity less than 10 meters per second
constitutes a stop.)</font><br>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Flatspace</title>
<Script Language = "JavaScript" >
var prom = new Array(80);
Xposition = 0 ;Yposition = 0 ;Yvel = 0, Xvel = 0; AngleF = 0, AngleSpeed = 0; Speed = 0;
Yacc = 0; Xacc = 0; Degree = Math.PI/180;Fval = 1;Time = 0;Courseval = 0;k =1; Xold = 0; Yold = 0;TargetX = 100000;RangeP2=100;Range = 10;
TargetY = 200000; Xrange = 1000; Yrange = 1000;Radardegree = .001;
function Target(){Xrange = TargetX - Xposition ;Yrange = TargetY - Yposition;RangeP2 = Xrange*Xrange + Yrange*Yrange;Range= Math.sqrt(RangeP2);
Radardegree = Math.atan(Yrange/Xrange);Radardegree = (180/ Math.PI) * Radardegree; RangeP2 = parseInt(RangeP2);Radardegree = parseInt(Radardegree);
alert(" Range = " + Range + "km " + " Azimuth = " + Radardegree + " degrees " + "RangeX = " + Xrange + " RangeY=" + Yrange ) }
function Clear(){Xposition = 0 ;Yposition = 0 ;Yvel = 0; Xvel = 0; AngleF = 0, AngleSpeed = 0; Speed = 0;
Yacc = 0; Xacc = 0;k = 1; Degree = Math.PI/180;Fval = 1;Time = 0;Courseval = 0;k = 1;Xold = 0;Yold = 0;TargetX = 100000;RangeP2=100;Range = 10;
TargetY = 200000; Xrange = 1000; Yrange = 1000;Radardegree = .001 }
function Enter(){k = document.F1.T2.value;k = parseInt(k)*60;AngleF = document.F1.T1.value;AngleF = parseInt(AngleF)}
function Velocity(){Yacc = Fval* Math.sin(AngleF*Degree); Yvel = Yvel + Yacc; Yposition = Yposition + (Yvel + Yold)/2;Yold = Yvel; TargetX = TargetX + 2; TargetY = TargetY+ .3;
Xacc = Fval* Math.cos(AngleF*Degree); Xvel = Xvel + Xacc; Xposition = Xposition + (Xvel + Xold)/2; Xold = Xvel; Speed = (Yvel*Yvel) + (Xvel*Xvel); Speed = Math.sqrt(Speed); Time = Time + (1/1000);
Courseval =Math.atan(Yvel/Xvel);Courseval = (180/ Math.PI) * Courseval;if (Xvel < 0) {Courseval = Courseval + 180}}
function Looper(){for (i = 0;i<k;i++){Velocity()}}
</script>
</head>
<body background="_themes/blends/blegtext.gif" bgcolor="#CCCCCC" text="#000000" link="#993300" vlink="#0000FF" alink="#FF9900"><!--mstheme--><font face="Trebuchet MS, Arial, Helvetica"><p align="center"><font face="Arial Black">Force and Acceleration<br>
</font><font face="Arial">(a Newton's Law physics educational game)</font>
</p>
<p align="left"><br>
<b><font face="Arial" size="3">Acceleration:</font><font face="Arial" size="4"> </font></b><font face="Arial" size="3">This
simulation allows you to move about a flat ( 2 dimensional, gravity free)</font><b><font face="Arial" size="4"> </font></b><font face="Arial" size="3">space
in a ion propelled imaginary space ship. Type in the ship orientation (
force direction) and thrust duration (time, s = .5*a *t^2), and then click ENTER
... button. This enters desired course and duration into space ship ion
propulsion engine control computer. The computer uses the accelerometer sensor
inputs to regulate thrust so as to maintain desired acceleration. Engine
burn does not begin and <b>Time</b> does not change until an <b>Engine Control
Button</b> is clicked. The <b>STOP ENGINE</b> button advances time by an amount
specified (Thrust Duration as entered) at zero acceleration. </font>
</p>
<p align="left"><font face="Arial" size="3">Start by moving along a single axis
at slow speed and note how far you travel in an hour. Though .1 meters per
second per second is less than 1/100 of a earth "g" it is still far greater than what
ion propulsion engine spacecraft can achieve today, but even 1 meter per second
squared may be obtained in the future. Trip starts at X, Y coordinate
0,0. Ignore the target message until you have traveled through of four quadrants of the cartesian coodinate system. Travel through all four quadrants clockwise
and counter clockwise. Next, Click "Reset" and start playing the intercept target game. Try to get close to target without overshooting it. </font></p>
<p align="center"><font face="Arial Black" color="#FF0000">Space Ship
Engineering Control Panel</font></p>
<form NAME="F1" action="_derived/nortbots.htm" method="POST" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit ><!--webbot
bot="SaveResults" startspan --><strong>[Engineering Control Panel]</strong><!--webbot
bot="SaveResults" endspan i-checksum="6561" --><p align="left">
<input name="T1" size="21">
<input name="T2" size="19">
<br>
Enter Ship Orientation(0 - 360 degrees) Enter Thrust
Duration (Integer 1- 1200 minutes) </p>
<p align="center"><input type = "button" value = "ENTER SHIP ORIENTATION AND ENGINE BURN DURATION" name="B5"
onClick = "Enter();Target();document.F1.T2.value = k/60;document.F1.T1.value = AngleF" ;> </p>
<p align="left"><font face="Arial"><b>Speed </b>(km/sec)</font>
<input name="T3" size="25"> <font face="Arial Black">
</font><font face="Arial">
<b>Course </b>(degrees)</font><input name="T4" size="25"> </p>
<p align="left"><font face="Arial"><font size="4"><b>X </b>(in km)</font><b> =
<input name="T5" size="27">, </b></font><b><font face="Arial" size="4">Y</font></b><font size="4" face="Arial"><b>
</b>(in km)</font><b><font face="Arial" size="4"> = <input name="T6" size="27"></font><font face="Arial"> </font></b> </p>
<p align="left"> <font face="Arial Black">Time (in kilo-seconds)</font> <input name="T7" size="27"> </p>
<p align="left"><font face="Arial Black"><u>Engine Control Buttons Below:</u></font> </p>
<p align="left"><input type = "button" value="STOP ENGINE" name="B4"
onClick = "Fval = 0,Looper();document.F1.T3.value = Speed;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval;">
<input type = "button" value = "SLOW (.1 M/S/S)" name="B6" onClick = "Fval = .0001;
Looper();document.F1.T3.value = Speed;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval; " >
<input type = "button" value="Full Speed Adead (1 M/S/S)" name="B7" onClick="Fval = .001;
Looper();document.F1.T3.value = Speed;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval; "></p>
<p align="center">
<input type = "button" value ="Reset" name="B8" onClick = "Clear();document.F1.T3.value = 0;document.F1.T6.value = Yposition;document.F1.T5.value = Xposition;
document.F1.T7.value = Time; document.F1.T4.value = Courseval; "> <font face="Arial" size="2">Reenter
course and burn duration after <b>Reset</b></font></p>
</form>
<p align="left"><font face="Arial"><b>Note: Ship Orientation </b>and<b> Course</b>
are independent of each other.</font>
</p>
<p align="left"><font face="Arial">Exercise: Travel to X = 1000km + or - 1.0km and Y = 1000km +
or - 1.0 km and stop there ( slowing to a velocity less than 10 meters per second
constitutes a stop.)</font><br>
</html>
Copy script above and create your own HTML version of FLAT SPACE JavaScribt.
Modify " function Target " so that azimuth reads correctly when Xrange is negative. That is when spaceship X position exceeds Target X position. Frequently we see that in the real world space probes require software updates after launch and must be transmitted to space probe.
Modify " function Target " so that azimuth reads correctly when Xrange is negative. That is when spaceship X position exceeds Target X position. Frequently we see that in the real world space probes require software updates after launch and must be transmitted to space probe.