Demonstrate using an external gravity model with PropagateOrbitPlugIn.

The LunarGravityModel.mat provided in the toolbox was loaded using the Other... selection in the gravity menu, and the configuration was saved as LunarModelDemo.mat. The lunar orbit should plot for 4 hours.

------------------------------------------------------------------------
See also PropagateOrbitPlugIn
------------------------------------------------------------------------

Contents

%--------------------------------------------------------------------------
%   Copyright (c) 2008 Princeton Satellite Systems, Inc.
%   All rights reserved.
%   Since version 8.
%--------------------------------------------------------------------------

Run the orbit propagator in batch

%----------------------------------
d          = load('LunarModelDemo.mat');
d.f.gravityModel.isNormalized = true;

Display the gravity model data

%-------------------------------
fprintf(1,'\nStored gravity model data:\n');
disp(d.f.gravityModel)

tag        = PropagateOrbitPlugIn( 'initialize' );
PropagateOrbitPlugIn( 'set data', tag, d );
PropagateOrbitPlugIn( 'propagate', tag );


%--------------------------------------
Stored gravity model data:
            name: 'jgl075g1.sha'
          string: 'LunarGravityModel.mat'
              mu: 4902.8
               a: 1738
              nZ: 75
              nT: 75
               c: [75×75 double]
               s: [75×75 double]
               j: [1×75 double]
    isNormalized: 1