kill(all)$

load(lrats);

geometry :trajectory of ballistic missile, part 1          'version 1 '
peter.vlasschaert@gmail.com,19/06/2018

legend :  fig 1
===========
======================================
π =ψ/2 + η
======================================
point                     A: burnout  point (full red)
purple point        apo point
point                     B: re-entry  point (brown)
lowest point        peri point
focus                    o point (center of the earth)
======================================
----------                  inside the earth (part : ellipse)
full line                 above the earth (part : ellipse)
======================================
| o A | :r_bo
|A'A |  : h_bo
angle(|o peripoint|,|oA|) = η
angle(|oA|,|o apopoint|) = ψ/2
| orange B| : h_re
line |peripoint to apopoint| =line of symmetry
======================================
A,B are points : "above the earth"

geometric : relation  'π =ψ/2 + η'

p1: ψ/2+η = %pi;
p2: solve(p1,ψ)/2;
p3:ratexpand(p2);

mapping :cos

p4:map(cos,p3)[1];

polar equation : Ellipse 

p5: r = p/(1+e*cos(θ));

free-flight   Range Equation.
======================

? find : r_bo,η
===========

p6: lratsubst([r=r_bo,θ=η],p5);

p7:solve(p6,cos(η));
p8:expand(p7)[1];

? find : combination  'p4' and 'p8'
=>  relation between ψ,η  , orbit parameters

p9:p8*(-1);

p10:lhs(p4) =rhs(p9);

?  relation : before ' p'  found  'θ = 0 into p5 '

see website : ballistic missile trajectories,(Δ)
see website : motion stays in one plane. (h =r*v*cos(θ))
------------------------------------------------------------------------------------------

definition :  Δ = (v/v_cs)^2 ,v_cs = velocity circular speed.
==============================================

p11: p=h^2/μ;
p12: h = r*v*cos(θ);
p13 :lratsubst([p12],p11);

?  relation between p and Δ

p14:v_cs =sqrt(μ/r);

p15: p14^2;

p16:lratsubst([rhs(p15)=lhs(p15)],p13);

insert : definition => Δ into 'p16'

a) definition. 

p17: Δ =v^2/v_cs^2;

b)   Δ into 'p16'

p18:lratsubst([rhs(p17)=lhs(p17)],p16);

c)   p=a*(1-e^2), found from definition ellipse .

1e)  p ?

p19:p = a*(1-e^2);

2e) solve :e^2

p20:solve(p19,e^2)$
p20a:expand(p20)[1];

d)  'p18' into 'p20a'

p21:lratsubst([p18],p20a);

definition : follows : Energy equation of orbit per unit mass
=> see : 'above ' on the website

a)  energy equation per unit mass.  Ek+Ep =cte
=====================================
cte = -μ/(2*a)

p22: v^2/2-μ/r = -μ/(2*a);

b)  use 'p15' and 'p17'

p22a:lratsubst([p15],p17);

p22b:solve(p22a,v^2)[1];

c)  put 'p22b'  into 'p22'

p22c:lratsubst([p22b],p22);

d) solve for a ?   

p22d:solve(p22c,a)$
p22e:expand(p22d)[1];

relation : θ,Δ,e, 'p22e' ,'p21'

p23:lratsubst([p22e],p21);

p23a:coeff(rhs(p23),cos(θ)^2)$
p23b:factor(p23a);

p23c:lhs(p23) =p23b*cos(θ)^2+1;

relation : ellipse polar coordinates 'p8' and Geometry relation  'p4'
=>  for position of the miissile at burnout point.
====================================================
rem : θ =η ,r=r_bo 'for burnout point ' A in fig 1'

p24:p4;

p24a::p10; 

p24b:lratsubst([θ=η,r=r_bo],p18);

p24c:lratsubst([p24b],p24a)$
p24d:expand(p24c);

p24e:lratsubst([θ=η],p23c);

p24f:solve(p24e,e)[2];

total result: relation between ψ,Δ,η
============================

p25:lratsubst([p24f],p24d)$
p25a:ratexpand(p25);