       Re: Projectile Launched Around the Earth

• To: mathgroup at smc.vnet.net
• Subject: [mg116431] Re: Projectile Launched Around the Earth
• From: "Ted Ersek" <ersekt at md.metrocast.net>
• Date: Tue, 15 Feb 2011 06:33:23 -0500 (EST)

```The code below is n improved and more readable version of the demonstration
at

<http://demonstrations.wolfram.com/ProjectileLaunchedAroundTheEarth/>
http://demonstrations.wolfram.com/ProjectileLaunchedAroundTheEarth/

(*-----------------------------------------------------------------------*)

Manipulate[Module[{DiffEquations,ProjectilePosition,ProjectilePath,

DiffEquations={D[x[t],t,t] == -4*Pi^2*x[t]*(x[t]^2+y[t]^2)^(-3/2),

D[y[t],t,t]==-4*Pi^2*y[t]*(x[t]^2+y[t]^2)^(-3/2),

x==0,y==y0,(x=92==Vx0,(y=92==0};

With[{DiffEqnSolution=NDSolve[DiffEquations, {x,y}, {t,0,t2}]},

ProjectilePosition[t_Real]={x[t],y[t]}/.DiffEqnSolution;

ProjectilePath=ParametricPlot[ ProjectilePosition[t], {t,0,t2},
PerformanceGoal->"Quality"];

ProjectileCrashed=MemberQ[ ProjectilePath, {_,_}?(Norm[#]<1&),
{6} ];

If[ProjectileCrashed,

ProjectilePath=ProjectilePath/.Line[pnts_]:>Line[ TakeWhile[
pnts, (1<Norm[#]&) ]];

CrashSite=Cases[ ProjectilePath,Line[pnts_]:>Last[pnts],-1];

Projectile=Graphics[{Red, PointSize[0.02], Point[CrashSite]
}],

(* else *)

Projectile=Graphics[{Red, PointSize[0.02],
Point[ProjectilePosition[t2]] }]

];

Earth=Graphics[{Gray,Disk[{0,0},1]}];

Show[ Earth, ProjectilePath, Projectile, PlotRange->4,
Axes->False] ]

],

{{t2, 2.9, "t"}, 0.01, 7.75},

{{y0, 1.4, "Subscript[y, 0]"}, 1.1, 3.97},

{{Vx0, 6.2, "Subscript[v, Subscript[x, 0]]"}, 1, 6.75}

]

(*--------------------------------------------------------------------------
------------------------------------*)

(*------How do we modify the code above to correctly model traveling around
the Earth?  ----*)

When I tried to do it  NDSolve  complained that the equations were probably
stiff, and would not work it out automatically.

Note:

G = 6.672*^-11 (Newton (m/kg)^2)

EarthMass =  5.9721986=D710^24 kg

F = G*EarthMass*ProjectileMass*(DistanceFromEarthCenter)^-2

Please indicate the units used for (t2, y0, Vx0)

Note:

For simplicity we can model the earth as

I will ignore all complications such as wind resistance, variations in
density of the earth, etc.

Thanks,

Ted Ersek

```

• Prev by Date: Fitting Experimental Data
• Next by Date: Re: Another point about Mathematica 8.0
• Previous by thread: Re: Fitting Experimental Data
• Next by thread: Re: Numerical convolution