%  ORBIT is our script for numerical solution
%  of a two-point boundary-value problem
%  arising from the optimality system for an
%  orbit trasnfer problem. This is a problem
%  from Chapter 2 of the Byrson & Ho text
%
%   set DATA values
%
 DATA.tf   = 3.32;
 DATA.beta = .07487;
 DATA.acc  = .1405;
%
% set initial estimates
%
  z0 = [-1.877369115 ;
        -.9288416747;
        -2.025325865 ];
%
% Use the fsolve procedure to zero the residuals
%
  DATA.range = 0; % suppresses range variable in ode solver
%
  OPTIONS = optimset('fsolve');
  OPTIONS = optimset(OPTIONS,'TolFun',1.e-08,'TolPCG',1.e-02,...
          'DiffMaxChange',.01,'DiffMinChange',1.e-06,'Display','iter');
  [z, rval]= fsolve('orbit_r',z0,OPTIONS,DATA)
%
% generate orbit data and plot the result
%
  orbit_plot(z,DATA)
%
% return
%
              
