Science Forums
Advanced search
User Name
Password

Science Social Network
home    members    help/rules    who is online    contact   

Go Back   Science Forums > Physical Sciences Forums > Space > Spaceship design
Become a science forums sponsor today
Reply
 
LinkBack Thread Tools
Old 10-22-2007   #1 (permalink)
TheBigDog's Avatar
Doing the Impossible

Hypography Staff Member
Moderator
Gallery Curator

 



Lunar Mission Sim

Per CraigD's suggestion I have created this thread for our conversation on a simulator for launch to soft landing portions of the mission profile.

Here is a link to NASA's Moon Fact Sheet, which should have all the data you need for representing the earth and the moon in the simulator.

Moon Fact Sheet

What it does not have is a lunar calendar. It notes that the distance of the moon ranges quite a bit.
Quote:
Originally Posted by NASA
Mean values at opposition from Earth
Distance from Earth (equator, km) 378,000
Apparent diameter (seconds of arc) 1896
Apparent visual magnitude -12.74

* These represent mean apogee and perigee for the lunar orbit.
The orbit changes over the course of the year so the distance
from the Moon to Earth roughly ranges from 357,000 km to 407,000 km.
50,000 kilometers between close and far. We need to plot that distance on the calendar to match our math with our launch window. I would aim for the dead center of the visible face of the moon, with the landing taking place at the beginning of the lunar day for that point. That gives us about two weeks of solar power to complete the primary mission. However, I gladly defer to more knowledgeable folks on this important part of the mission.

Of interest...

<base target="_self"> <title>Eagle Lander 3D

Lunar Lander Simulator - Palm OS

Lunar Explorer: A Space Flight Simulator - MobyGames

Bill


----------------
aka TheBigDog - Hypography Full Freaking Moderator
Become a Hypography sponsor!
The truth is incontravertible; malice may attack it, ignorance may deride it, but in the end there it is. - Winston Churchill

TheBigDog's recommended reading: The Science of Success - Charles G. Koch

A neutron goes into a bar and asks the bartender, "How much for a beer?"
The bartender replies, "For you, no charge."
Reply With Quote
Old 10-26-2007   #2 (permalink)
TheBigDog's Avatar
Doing the Impossible

Hypography Staff Member
Moderator
Gallery Curator

 



Re: Lunar Mission Sim

Not exactly a mission sim, but it is a fun toy...

Gravity Simulator

I downloaded it and it is pretty cool. You can see the orbits of everything in the solar system at any point in time.

I am looking forward to what Craig is building.

Bill


----------------
aka TheBigDog - Hypography Full Freaking Moderator
Become a Hypography sponsor!
The truth is incontravertible; malice may attack it, ignorance may deride it, but in the end there it is. - Winston Churchill

TheBigDog's recommended reading: The Science of Success - Charles G. Koch

A neutron goes into a bar and asks the bartender, "How much for a beer?"
The bartender replies, "For you, no charge."
Reply With Quote
Old 10-27-2007   #3 (permalink)
TheBigDog's Avatar
Doing the Impossible

Hypography Staff Member
Moderator
Gallery Curator

 



Re: Lunar Mission Sim

OK, I have some free time this weekend (got my homework done!) so I am going to take a crack at a VB.net based simulator that I can post here. I will post the program and the code.

ready...

set...

Code!!!


----------------
aka TheBigDog - Hypography Full Freaking Moderator
Become a Hypography sponsor!
The truth is incontravertible; malice may attack it, ignorance may deride it, but in the end there it is. - Winston Churchill

TheBigDog's recommended reading: The Science of Success - Charles G. Koch

A neutron goes into a bar and asks the bartender, "How much for a beer?"
The bartender replies, "For you, no charge."
Reply With Quote
Old 10-28-2007   #4 (permalink)
Janus's Avatar
Understanding


 



Re: Lunar Mission Sim

There is a spaceflight simulator called "orbiter" which I have on my computer and which might be made to work for our purposes. It comes with some ready-made spacecraft, but it is possible to modify/create ships of your own.

I'm looking into how easy this to do and what the limitations are.


----------------
"Men are apt to mistake the strength of their feelings for the strength of their argument.
The heated mind resents the chill touch & relentless scruntiny of logic"
-W.E. Gladstone
Reply With Quote
Old 10-29-2007   #5 (permalink)
TheBigDog's Avatar
Doing the Impossible

Hypography Staff Member
Moderator
Gallery Curator

 



Re: Lunar Mission Sim

I have written a gravity simulator. It works in 3D (x,y,z coordinates) and runs on a 1 second time interval. I can create any number of bodies in free space with mass, vector, and velocity. Of course this does not mean that there are any graphics. So far I have the Earth and the Moon, with them acting upon each other as the moon orbits the earth.

Next step is to put something in orbit of the earth and then fly it to the moon. I am not bothering with launching from the earth. Of course all of this is moot since Janus has a program that can do it already, but it has been a very interesting exercise and I have learned a great deal from spending time on it over the weekend. I will post it when I have added controls instead of setting all the value in code.

Bill


----------------
aka TheBigDog - Hypography Full Freaking Moderator
Become a Hypography sponsor!
The truth is incontravertible; malice may attack it, ignorance may deride it, but in the end there it is. - Winston Churchill

TheBigDog's recommended reading: The Science of Success - Charles G. Koch

A neutron goes into a bar and asks the bartender, "How much for a beer?"
The bartender replies, "For you, no charge."
Reply With Quote
Old 10-30-2007   #6 (permalink)
CraigD's Avatar
Creating

Hypography Staff Member
Administrator
Editor

 



Thumbs up Let's compare simulators

Quote:
Originally Posted by TheBigDog View Post
I have written a gravity simulator. It works in 3D (x,y,z coordinates) and runs on a 1 second time interval.
Excelent! I look forward to seeing it.

I finished my latest, GRAVSIM4, last weekend. It's main features/changes:
  • Like my previous GRAVSIM*s, it’s a command line interpreter.
  • I redid its syntax completely (the old ones’ were kinda clunky).
  • Everything in the syntax is an object that can be viewed or set (eg: Earth.M=5.9736e24 #sets the mass of the Earth to its usual value)
  • The $ object is the simulator itself
  • It’s major enhancement of the old ones is that the bodies (Earth, Moon, the ship, etc.) have an property (.X) that allow you to give each a program consisting of MUMPS code, allowing them to do stuff like change their mass and acceleration per a rocket motor & fuel program
  • It’s not as practical, yet, as GRAVSIM2. I don’t plan to make it much more, rather I plan to write .X code for stuff like graphics output. The command line itself, I plan to leave with only primitive output features.

Here’s a run of the simulator showing a 100 kg rocket with 900 kg of fuel and specific impulse 450 s – basically a really big model rocket – go up then down in a little less than 104 s
Code:
XGRAVSIM4>Earth.M=5.9736e24 Moon.M=7.347673e22 .L=363104000,0,0 .V=0,1082,0 #The usual Earth and Moon
XGRAVSIM4>Ship.M=1000 .L=6378137,0,0 .V=0,463.8,0 #1000 kg Ship on the surface of the equator
XGRAVSIM4>Ship.X="n (B,I) s Mf=B(I,""X"",""Mf""),SI=B(I,""X"",""SI""),M=-Mf*B(""TI"")+B(I,0) s:M<B(I,""X"",""M0"") Mf=0 s A=Mf*SI/(M+B(I,0))*2,B(I,21)=B(I,""X"",21)*A,B(I,22)=B(I,""X"",22)*A,B(I,23)=B(I,""X"",23)*A,B(I,0)=-Mf*B(""TI"")+B(I,0)" #Rocket motor
XGRAVSIM4>.X("SI")=250 .X("Mf")=50 .X("M0")=100 #Rocket motor specific impulse, burn rate, and 100 kg minimum vehicle mass
XGRAVSIM4>.X(21)=1 .X(22)=0 .X(23)=0 #thrust vector
XGRAVSIM4>$.T=1 Ship.M .L .V .A #
#SHIP.M=950 .L=6378138.510032063895,463.7998218340913345,0 .V=3.02006412778904451,463.7996436681826685,0 .A=12.82051282051282051,0,0
XGRAVSIM4>$.T=10 Ship.M .L .V .A
#SHIP.M=500 .L=6378414.894590005906,4637.880633501694489,0 .V=75.20675035288839365,463.7643692911025346,0 .A=23.80952380952380952,0,0
XGRAVSIM4>$.T=20 Ship.M .L .V .A
#SHIP.M=100 .L=6380677.051336701228,9275.04882631241004,0 .V=377.1969438729633817,463.6575375527910744,0 .A=0,0,0
#Note: engine shutoff
XGRAVSIM4>$.T=30 Ship.M .L .V .A
#SHIP.M=100 .L=6383959.572000057278,13910.79377670996689,0 .V=279.3238639845522164,463.4797680659022456,0 .A=0,0,0
XGRAVSIM4>$.T=40 Ship.M .L .V .A
#SHIP.M=100 .L=6386263.816969892319,18544.40719033907758,0 .V=181.5368644980712998,463.2312502756681295,0 .A=0,0,0
XGRAVSIM4>$.T=50 Ship.M .L .V .A
#SHIP.M=100 .L=6387590.497549352828,23175.1820474100567,0 .V=83.80606490867480755,462.9120625488694604,0 .A=0,0,0
XGRAVSIM4>$.T=60 Ship.M .L .V .A
#SHIP.M=100 .L=6387940.02674845683,27802.41167964278307,0 .V=-13.89832117965128978,462.5221968732724911,0 .A=0,0,0
#Note: rocket coming down
XGRAVSIM4>$.T=100 Ship.M .L .V .A
#SHIP.M=100 .L=6379564.474404304418,46261.7085752850397,0 .V=-405.0469612267389591,460.2527731771944981,0 .A=0,0,0
XGRAVSIM4>$.T=101 Ship.M .L .V .A
#SHIP.M=100 .L=6379154.529490345703,46721.92565277778461,0 .V=-414.8428666906910533,460.1813818082953234,0 .A=0,0,0
XGRAVSIM4>$.T=102 Ship.M .L .V .A
#SHIP.M=100 .L=6378734.788041651078,47182.07097860561975,0 .V=-424.6400306985589834,460.1092698473749626,0 .A=0,0,0
XGRAVSIM4>$.T=103 Ship.M .L .V .A
#SHIP.M=100 .L=6378305.248784582742,47642.14383192611936,0 .V=-434.4384834381129305,460.0364367936242636,0 .A=0,0,0
XGRAVSIM4>$.T=104 Ship.M .L .V .A
#SHIP.M=100 .L=6377865.910415304252,48102.14349139155726,0 .V=-444.2382551188663537,459.9628821372515378,0 .A=0,0,0
#note: splat! at 104 seconds
XGRAVSIM4>$.ti=0 #how to exit the simulator
Here’s the current MUMPS code of GRAVSIM4:
Code:
N (XCU,XQMP,XGRAVSIM3D1,XGRAVSIM4) x XGRAVSIM3D1(-1) s LO="$",WF=0 f  q:'B("TI")  w:WF ! s WF=0,WLO="" r "XGRAVSIM4>",R,! x XCU,XGRAVSIM4((R="?":0,1:1)) ;XGRAVSIM4: YA Gravity simulator
s N="" f  s N=(XGRAVSIM4(0,N)) q:N=""  w (XGRAVSIM4(0,N),";"),! ;XGRAVSIM4(0)
Enter - Object.property to display a property ;XGRAVSIM4(0,1)
      - Object.property=value to set a property to a value ;XGRAVSIM4(0,2)
      - #followed by any text to be ignored (a comment) ;XGRAVSIM4(0,2.5)
      - Any of the above, separated by one or more spaces ;XGRAVSIM4(0,2.7)
Note - If object is omitted, the previously referenced object is assumed ;XGRAVSIM4(0,3)
     - Occurances of the text "XGRAVSIM4>" at the beginning are ignored. ;XGRAVSIM4(0,3.5)
     - The special object $ has the following properties: ;XGRAVSIM4(0,4)
      -- T - elapsed time of simulation.  Set to a greater value to advance ;XGRAVSIM4(0,5)
        simulation ;XGRAVSIM4(0,6)
      -- TI - simulation interval.  Default 1.  The interval of simulation ;XGRAVSIM4(0,7)
        time between calculations.  Set to 0 to end simulation. ;XGRAVSIM4(0,8)
      -- ALL - Display only.  Displays all properties of all objects. ;XGRAVSIM4(0,8.5)
     - Other object have the following properties: ;XGRAVSIM4(0,9)
      -- M - mass of object ;XGRAVSIM4(0,10)
      -- L (=n,n,n) location of object ;XGRAVSIM4(0,11)
      -- V (=n,n,n) velocity of object ;XGRAVSIM4(0,12)
      -- A (=n,n,n) acceleration of object ;XGRAVSIM4(0,13)
      -- X (may be followed by (subscripts...), ="xecute code") code to be ;XGRAVSIM4(0,14)
        xecuted each simulation interval. Meaningful symbols: ;XGRAVSIM4(0,15)
       --- B(I,0) - mass of object -OK to set ;XGRAVSIM4(0,16)
       --- B(I,21) ,22) ,23) - acceleration of object -OK to set ;XGRAVSIM4(0,17)
       --- B(OI(object),1) ,2) ,3) - location of any object -read only, please ;XGRAVSIM4(0,18)
       --- B(OI(object),11) ,12) ,13) - velocity of any object -read only ;XGRAVSIM4(0,19)
x XGRAVSIM4(1,-1) s (R(1),CC)=R,R(2)=" ",R(3)=0 x XQMP f CP=1:1:R s R(1)=CC,R(2)=" ",R(3)=CP x XQMP i R]"" s C=R q:C?1"#".e  s R(1)=R,R(2)="=",R(3)=1 x XQMP s O=(R,"."),O=(O="":LO,1:O),P=(R,".",2),V=C,(V,1,(R)+1)="" x XGRAVSIM4(1,V]"",O'="$") s LO=O ;XGRAVSIM4(1)
f  q:R'?1.an1">".e  s (R,">")="",(R)=""  ;XGRAVSIM4(1,-1)
s N="" f  s N=(XGRAVSIM4(1,0,0,1,N)) q:N=""  x XGRAVSIM4(1,0,0,1,N) q:N=""  ;XGRAVSIM4(1,0,0): show system property
i P="T" s V=B("T") x XGRAVSIM4(2) s N="" ;XGRAVSIM4(1,0,0,1,1)
i P="TI" s V=B("TI") x XGRAVSIM4(2) s N="" ;XGRAVSIM4(1,0,0,1,2)
i P="ALL" x XGRAVSIM4(1,0,0,1,3,0) s O="" f  s O=(OI(O)) q:O=""  x XGRAVSIM4(1,0,0,1,3,1),XGRAVSIM4(1,0,0,1,3,1.1) ;XGRAVSIM4(1,0,0,1,3)
s O="$" f P="T","TI" x XGRAVSIM4(1,0,0) ;XGRAVSIM4(1,0,0,1,3,0)
f P="M","L","V","A" x XGRAVSIM4(1,0,1) ;XGRAVSIM4(1,0,0,1,3,1)
s (Q,Q0)=(B(OI(O),"X")),P="X" x:(@Q)#10 XGRAVSIM4(1,0,1) f  s (P,Q)=(@Q) q:(@Q,2)'=Q0  s (P,1,(Q0))="X(" x XGRAVSIM4(1,0,1) ;XGRAVSIM4(1,0,0,1,3,1.1)
s V="undefined",WLO="" x XGRAVSIM4(2) ;XGRAVSIM4(1,0,0,1,999)
s N="" f  s N=(XGRAVSIM4(1,0,1,1,N)) q:N=""  x XGRAVSIM4(1,0,1,1,N) i N="" x XGRAVSIM4(2) q  ;XGRAVSIM4(1,0,1): show object property
s I=(OI(O)) i 'I s P="",V="undefined",WLO="" s N="" ;XGRAVSIM4(1,0,1,1,-1)
i P="M" s V=B(I,0) s N="" ;XGRAVSIM4(1,0,1,1,1)
i P="L" s V=B(I,1)_","_B(I,2)_","_B(I,3) s N="" ;XGRAVSIM4(1,0,1,1,2)
i P="V" s V=B(I,11)_","_B(I,12)_","_B(I,13) s N="" ;XGRAVSIM4(1,0,1,1,3)
i P="A" s V=B(I,21)_","_B(I,22)_","_B(I,23) s N="" ;XGRAVSIM4(1,0,1,1,4)
i P?1"X".1"(".e k N s V=P,(V,1,2)="B(I,""X"""_(P="X":")",1:","),N((@V,"undefined"))="",N=(N),V=(N,3,(N)-1) k N s N="" ;XGRAVSIM4(1,0,1,1,5)
n N s V=Q,(V,1,(Q0))="X",N((@Q,"undefined"))="",N=(N),V=V_"="_(N,3,(N)-1) ;XGRAVSIM4(1,0,1,1,5,1)
s V="undefined",WLO="" x XGRAVSIM4(2) ;XGRAVSIM4(1,0,1,1,999)
s N="" f  s N=(XGRAVSIM4(1,1,0,1,N)) q:N=""  x XGRAVSIM4(1,1,0,1,N) q:N=""  ;XGRAVSIM4(1,1,0): set system property
i P="T" s N="" f  q:B("T")'<V  x XGRAVSIM4(1,1,0,1,1,1),XGRAVSIM3D1(0) ;XGRAVSIM4(1,1,0,1,1)
f I=1:1:B("I9") x (B(I,"X")) ;XGRAVSIM4(1,1,0,1,1,1)
i P="TI" s B("TI")=V s N="" ;XGRAVSIM4(1,1,0,1,2)
s V="undefined",WLO="" x XGRAVSIM4(2) ;XGRAVSIM4(1,1,0,1,999)
s N="" f  s N=(XGRAVSIM4(1,1,1,1,N)) q:N=""  x XGRAVSIM4(1,1,1,1,N) q:N=""  ;XGRAVSIM4(1,1,1): set object property
s I=(OI(O)) i P="M" s:'I I=B("I9")+1,OI(O)=I s B(I,0)=V x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,1)
i I,P="L" s B(I,1)=+V,B(I,2)=+(V,",",2),B(I,3)=+(V,",",3) x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,2)
i I,P="V" s B(I,11)=+V,B(I,12)=+(V,",",2),B(I,13)=+(V,",",3) x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,3)
i I,P="A" s B(I,21)=+V,B(I,22)=+(V,",",2),B(I,23)=+(V,",",3) x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,4)
i I,P?1"X".1"(".e s (P,1,2)="B(I,""X"""_(P="X":")",1:","),@(P_"="_V) s N="" ;XGRAVSIM4(1,1,1,1,5)
s:'I P="" s V="undefined",WLO="" x XGRAVSIM4(2) ;XGRAVSIM4(1,1,1,1,999)
w (WF:" ",1:"#"),(O=WLO:"",1:O),(P]"":".",1:""),P,"=",V s WF=1,WLO=O ;XGRAVSIM4(2): output O.P=V
i P="T" s N="" f  q:B("T")'<V  x XGRAVSIM4(1,1,0,1,1,1),XGRAVSIM3D1(0) ;XGRAVSIM4(1,1,0,1,1)
f I=1:1:B("I9") x (B(I,"X")) ;XGRAVSIM4(1,1,0,1,1,1)
i P="TI" s B("TI")=V s N="" ;XGRAVSIM4(1,1,0,1,2)
s N="" f  s N=(XGRAVSIM4(1,1,1,1,N)) q:N=""  x XGRAVSIM4(1,1,1,1,N) q:N=""  ;XGRAVSIM4(1,1,1): set object property
s I=(OI(O)) i P="M" s:'I I=B("I9")+1,OI(O)=I s B(I,0)=V x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,1)
i I,P="L" s B(I,1)=+V,B(I,2)=+(V,",",2),B(I,3)=+(V,",",3) x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,2)
i I,P="V" s B(I,11)=+V,B(I,12)=+(V,",",2),B(I,13)=+(V,",",3) x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,3)
i I,P="A" s B(I,21)=+V,B(I,22)=+(V,",",2),B(I,23)=+(V,",",3) x XGRAVSIM3D1(-1) s N="" ;XGRAVSIM4(1,1,1,1,4)
i I,P?1"X".1"(".e s (P,1,2)="B(I,""X"""_(P="X":")",1:","),@(P_"="_V) s N="" ;XGRAVSIM4(1,1,1,1,5)
s:'I P="" s V="undefined",WLO="" x XGRAVSIM4(2) ;XGRAVSIM4(1,1,1,1,999)
w (WF:" ",1:"#"),(O=WLO:"",1:O),(P]"":".",1:""),P,"=",V s WF=1,WLO=O ;XGRAVSIM4(2): output O.P=V
n (R) s R=(R,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") ;XCU: fold to uppercase
n (XQMP,R) s Q="""",D=R(2),(M,R)=D_R(1) x XQMP(1) s R=((R(3)):(R,((M,D,1,R(3)))+2,((M,D,1,R(3)+1))),1:(M,D)-1) ;XQMP: quote sensitive R=(R(1),R(2),R(3)) or R=(R(1),R(2)) if 'R(3)
s D1=((D)+1) f I=2:2:(R(1),Q) s (M,Q,I)=(("",((M,Q,I)))," ",D1) ;XQMP(1)
 ;XGRAVSIM3D1: 3-d gravity simulator core
N (XGRAVSIM3D1,B) s B("G")=(B("G"),6.6742e-11),B("TI")=(B("TI"),1),B("T")=(B("T"),0),B("S")=(B("S"),1),B("I9")=0 x XGRAVSIM3D1(-1,1) m B=B2 ;XGRAVSIM3D1(-1): Assure B valid for call to XGRAVSIM3D1(0)
f J=1:1 s I=(B("")) q:'I  s B("I9")=J m B2(J)=B(I) k B(I) f K=0:1:3,11:1:13,21:1:23 s B2(J,K)=(B2(J,K),0) ;XGRAVSIM3D1(-1,1)
N (XGRAVSIM3D1,B) s I9=B("I9"),G=B("G"),TI=B("TI"),S=B("S") X XGRAVSIM3D1(2),XGRAVSIM3D1(3) M B=B1 s B("T")=TI*S+B("T") ;XGRAVSIM3D1(0): Increment B,T by 1*TI
F I2=1:1:I1-1,I1+1:1:I9 S DY=B(I2,1)-Y,DX=B(I2,2)-X,DZ=B(I2,3)-Z,D2=DY*DY+(DX*DX)+(DZ*DZ),D=D2**.5,A=G*B(I2,0)/D2*TI*S,VY=DY/D*A+VY,VX=DX/D*A+VX,VZ=DZ/D*A+VZ ;XGRAVSIM3D1(1): change body I1 velocity
F I1=1:1:I9 S VY=B(I1,11),VX=B(I1,12),VZ=B(I1,13),Y=VY*TI/2+B(I1,1),X=VX*TI/2+B(I1,2),Z=VZ*TI/2+B(I1,3) X XGRAVSIM3D1(1) S VY=B(I1,21)*TI*S+VY,VX=B(I1,22)*TI*S+VX,VZ=B(I1,23)*TI*S+VZ,B1(I1,11)=VY,B1(I1,12)=VX,B1(I1,13)=VZ ;XGRAVSIM3D1(2): change all velocities
F I=1:1:I9 S B(I,1)=B(I,11)+B1(I,11)/2*TI*S+B(I,1),B(I,2)=B(I,12)+B1(I,12)/2*TI*S+B(I,2),B(I,3)=B(I,13)+B1(I,13)/2*TI*S+B(I,3) ;XGRAVSIM3D1(3): change all positions
I’m curious to see how TBD’s VB.net-based simulator and my MUMPS-based simulator compare.

TBD, can you run yours for the following “standard”, a single geostationary orbit? Here are the parameters (all units kg, m, & s, calculated from this wikipedia article):
  • Gravitational constant = 6.6742e-11
  • Orbital radius (from center of Earth) = 42164140.10012396182
  • Orbital speed = 3074.661175977908351
  • Sample position and velocity at 43082 and 86164 s (half and full orbit)
Here’re the results from GRAVSIM4
Code:
GRAVSIM4>Earth.M=5.9736e24 #usual Earth
GRAVSIM4>Ship.M=10 .L=42164140.10012396182,0,0 .V=0,3074.661175977908351,0 #Ship in geostationary orbit
GRAVSIM4>$.t=43082 ship.l .v
#SHIP.L=-42145157.25275492353,-59527.65293408068424,0 .V=4.343756684837521444,-3076.039916833619272,0
#note:       42145199.29245684292          3076.042983798489842
$.t=86164 ship.l .v
#SHIP.L=42163972.13018178319,119001.7055088261738,0 .V=-8.679701336015950322,3074.648927402258311,0
#note:       42164140.06238785073          3074.661178730290591
Note that the orbit seems stable – its speed changed by only .00000275238224 m/s – but isn’t perfectly circular, dipping from about 42164140 to 42145199, and goes more than 1 full orbit in 86164 s.


----------------
Moderator: Computers and Technology; Medical Science; Science Projects and Homework; Philosophy of Science; Physics and Mathematics; Environmental Studies

Last edited by CraigD; 11-05-2007 at 07:06 AM. Reason: Updated code to most current version
Reply With Quote
Old 10-30-2007   #7 (permalink)
TheBigDog's Avatar
Doing the Impossible

Hypography Staff Member
Moderator
Gallery Curator

 



Re: Lunar Mission Sim

Quote:
Note that the orbit seems stable – its speed changed by only .00000275238224 m/s – but isn’t perfectly circular, dipping from about 42164140 to 42145199, and goes more than 1 full orbit in 86164 s.
How far beyond a full orbit does it go? It should be short by 278.349 meters in 86164 seconds considering the sidereal rotation time of the earth.

The Earth rotates once in a few minutes under a day (23 hours 56 minutes 04. 09053 seconds).

23 x 3600 = 82800
56 x 60 = 3360
4 x 1 = 4

82800 + 3360 + 4 = 86164. What is the final margin of error you are showing?

I will need some time to run my own sim, give me a day or two.

Bill


----------------
aka TheBigDog - Hypography Full Freaking Moderator
Become a Hypography sponsor!
The truth is incontravertible; malice may attack it, ignorance may deride it, but in the end there it is. - Winston Churchill

TheBigDog's recommended reading: The Science of Success - Charles G. Koch

A neutron goes into a bar and asks the bartender, "How much for a beer?"
The bartender replies, "For you, no charge."
Reply With Quote
Old 10-31-2007   #8 (permalink)
CraigD's Avatar
Creating

Hypography Staff Member
Administrator
Editor

 



Post Fiddling with GEOSTAT orbits, & more GRAVSIM4 fun

Quote:
Originally Posted by TheBigDog View Post
How far beyond a full orbit does it go? It should be short by 278.349 meters in 86164 seconds considering the sidereal rotation time of the earth.
A lot beyond – about 119001 m, or 39 s.

I suspect my high-precision calculations of GEOSTAT orbit are off vs. the constant of gravity and Earth mass in the simulation – I used slightly different sources calculating them. I can tweak the orbital radius up ~ 6315 m to get nearly exactly a 86164 s orbital period, like this:
Code:
XGRAVSIM4>Earth.M=5.9736e24
XGRAVSIM4>Ship.M=10 .L=42170455,0,0    .V=0,3074.661175977908351,0
XGRAVSIM4>$.t=43082 ship.l .v
#SHIP.L=-42164136.41712641552,-11.14168741885003,0 .V=.0008125255939590325,-3075.121934885605702,0
#note:                 42164136.41712788759 3075.121934885713047
XGRAVSIM4>$.t=86164 ship.l .v
#SHIP.L=42170454.9999941175,22.279930461983273,0 .V=-.0016245603985481512,3074.661175977479037,0
#note:                 42170455.00000000309 3074.661175977908222
though the resulting orbit is still slightly (~ 6319 m) non-circular.

All in all, though, I pretty happy with the accuracy of my GRAVSIM* simulators – I’ve used them to practice various maneuvers, mostly in Earth orbit, and they always agree pretty closely with published data. I much prefer the new, object-y syntax, though still need to add some essential useful $ (simulator/system) object properties, such as a “dump all” function – small, easy enhancements.

As I mentioned in my previous post, the neatest thing about GRAVSIM4 is that you can add “programs” to each object, the ship being the most interesting object. Since that’s all done with MUMPS xecute code, it’s easy to make these programs “modular” – a rocket motor program can run with throttle and thrust vector data from a guidance program, etc. – and “big bump” events like stage separations can be separate programs that wait for a defined condition to adjust the ship’s net mass and current engine characteristics. Weird stuff like atmospheric drag (for launch or aerobraking), magnetic or solar sail propulsion (not in scope for an orbit-to-moon mission, but handy in general) can be written and dropped in. I hope to build a small library of useful .X programs ASAP, with parameters for real-world commercial motors, making it possible to quickly try different configurations of ship hardware.

Guidance programming remains the hard part. It’s real rocket science, and not something I’ve ever done professionally, so rather over my head (unless I can smooze in with some local NASA folk ). I’ve a tendency to come up with rough calculations, then “fly by the seat of my pants” to compensate for their roughness – not, I’m pretty sure, how the pros do it.

Graphics are another problem area – I don’t have anything handy that will give me a real-time graphic diagram, and find myself spending a lot of time struggling to visualize the numeric data. Though a browser interface would be slickest, I’ll probably write a small VB app to run separate from my terminal window – but either approach will take worktime, which I’ve not got a lot of extra free right now. I’d also like to learn more latex, so that I could put graphics in posts using [math] tags, though this isn’t very helpful for realtime visualizing.

For the next day or so, I fear I’ll be consumed by the much-less interesting (but better paying ) world of SOX. Gah!


----------------
Moderator: Computers and Technology; Medical Science; Science Projects and Homework; Philosophy of Science; Physics and Mathematics; Environmental Studies
Reply With Quote
Old 10-31-2007   #9 (permalink)
Janus's Avatar
Understanding


 



Re: Fiddling with GEOSTAT orbits, & more GRAVSIM4 fun

Quote:
Originally Posted by CraigD View Post

Graphics are another problem area – I don’t have anything handy that will give me a real-time graphic diagram, and find myself spending a lot of time struggling to visualize the numeric data. Though a browser interface would be slickest, I’ll probably write a small VB app to run separate from my terminal window – but either approach will take worktime, which I’ve not got a lot of extra free right now. I’d also like to learn more latex, so that I could put graphics in posts using [math] tags, though this isn’t very helpful for realtime visualizing.

(
Here's some of the info you can bring up graphically with "orbiter". It also allows for a real time view of and from your craft.



----------------
"Men are apt to mistake the strength of their feelings for the strength of their argument.
The heated mind resents the chill touch & relentless scruntiny of logic"
-W.E. Gladstone
Reply With Quote
Old 10-31-2007   #10 (permalink)
Jay-qu's Avatar
Ancora Imparo

Hypography Staff Member
Moderator
Editor
Gallery Curator
Basic Subscription
Sponsor

 



Re: Fiddling with GEOSTAT orbits, & more GRAVSIM4 fun

It looks like the celestia interface there in the background.


----------------
Jay-qu
::Hypography Moderator of..
Chemistry, Physics & Mathematics, Astronomy & Cosmology, Space and Technology & gadgets Forums

Einstein said that if quantum mechanics is right, then the world is crazy. Well, Einstein was right. The world is crazy.
-Daniel Greenberger

Physics Guides - Physics Resources and help
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Fellowship of Freedom. A Mission on Earth. arkain101 Science Projects and Homework 13 03-24-2007 04:03 AM
Shuttle Discovery Mission STS-121 Turtle Space 12 07-05-2006 08:23 AM
ESA, India to cooperate on lunar exploration mission Tormod Space News 0 03-21-2005 10:24 AM
Mission to Neptune Stargazer Space 17 12-14-2004 04:48 AM
Commercial Lunar Mission Noah Space 1 09-16-2002 11:06 AM


All times are GMT -8. The time now is 09:26 PM.

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

We have been online since May 2000, and aim to be the best place to find and share science-related content of all kinds.

Share the love!

Please add more science to your life. Use our RSS feeds on your blog, your portal, or your favorite feedreader!

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. Copyright © 2000-2008 Hypography
Part of the Hypography - Science for Everyone Network