BDipole:

Path: SC/Environs

% Computes the geocentric magnetic field based on a tilted dipole model. 
 The output is in geocentric inertial coordinates (ECI). This function
 includes the effect of dipole motion on the earth.

 Includes 1995 IGRF coefficients as of Jan. 1999.

 Type BDipole for a demonstration of a satellite in a low earth 
 inclined orbit.

--------------------------------------------------------------------------
   Form:
   [b, bDot] = BDipole( r, jD, v, c )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   r           (3,:)   Position vector in the ECI frame (km)
   jD          (1,:)   Julian days
   v           (3,:)   Velocity (km/s)
   c           (.)     Coefficients for field model
                       .coeff  (3,1) Base coefficents
                       .dCoeff (3,1) Deltas
                       .jD0    (1,1) Epoch

   -------
   Outputs
   -------
   b           (3,:)   Magnetic field in the ECI frame (T)
   bDot        (3,:)   Derivative of b in the ECI frame (T/s)

--------------------------------------------------------------------------
   Reference:  Wertz, J., ed. "Spacecraft Attitude Determination and
               Control," Kluwer, 1976, 783-784.
--------------------------------------------------------------------------