% calling sequence commands
%computes the position and velocities of the several bodies under the
%action of gravitatory forces.
%The basic strategy is the Newmark method for time integration and
%Newton-Raphson method for the non-linearity of the problem
gravity2
% given starting body, launching time and launching direction, computes
% velocity to impact target.
%The basic numerical strategy is the secant method for root finding
% SOLUTION MIGHT NOT EXIST
[iniv,iiter,error] = findv(3,7,0.1,0.5,600,[0;-1],1e-5,1e-7,30);
% given starting body, and launching time, computes initial direction so
% that launch velocity is minimal (launch velocity = escape velocity)
% The basic numerical strategy is the secant method for root finding
% SOLUTION MIGHT NOT EXIST
[alpha1, iniv1, error, kiter] = secant1(3,7,0.1,300,0.5,1e-5,1e-7,30,-pi/2);