Path: SC/Environs
% Computes the Earth magnetic field using the DGRF/IGRF model. This model only is valid for the Earth. Use MagFieldPlanet for all other planets. The model is loaded from IGRF11.mat if no dataFile or coefficients are given. ------------------------------------------------------------------------ Form: [b, g, h] = MagField( position, jD, nMax, dataFile) b = MagField( position, jD, nMax, g, h ) ------------------------------------------------------------------------ ------ Inputs ------ position (3,:) Position in ECI (km) jD (1,1) Julian date nMax (1,1) Maximum number of terms used. Enter an empty matrix to use all available terms dataFile (1,:) Optional, The file name of a .mat file which contains the magnetic field data. The variables which must be stored in dataFile are: dateOfModel, g, gDot, h, and hDot. This may also be the name of a structure with fields .h, .g, .gDot, .hDot and .dateOfModel - or - g Optional, but speeds execution h Optional, but speeds execution ------- Outputs ------- b (3,:) The magnetic field in ECI (T) g The (full) g coefficient matrix for dateTime h The (full) h coefficient matrix for dateTime -------------------------------------------------------------------------- References: Wertz, J., Spacecraft Attitude Determination and Control, Kluwer, 1976, pp. 779-781. -------------------------------------------------------------------------- See also: ECIToEF, MagFieldPlanet --------------------------------------------------------------------------
AC: ACData/ACTConstants AerospaceUtils: Coord/ECIToEF SC: BasicOrbit/RVFromKepler SC: Environs/MagFieldData SC: Environs/MagFieldPlanet SC: Environs/ReadMagField SC: SCData/sCTConstants SC: SCMat/IGRF11 Common: CommonData/Constants Common: CommonData/SwooshWatermark Common: CommonData/xSplashSmall Common: Database/Constant Common: General/CellToMat Common: General/DeBlankLT Common: General/DeleteCell Common: General/ListCases Common: General/MatToCell Common: General/Watermark Common: Graphics/NewFig Common: Graphics/Plot2D Common: Graphics/Plot3D Common: Graphics/PltStyle Common: Graphics/TimeLabl Common: Graphics/XLabelS Common: Graphics/YLabelS Common: Graphics/ZLabelS Common: Time/DTSToDTA Common: Time/Date2JD Common: Time/JD2000 Common: Time/JD2T Common: Time/T2JD Common: Transform/Cart2Sph Math: Analysis/PGauss Math: Analysis/SCHarm Math: Linear/Cross Math: Linear/Unit
Back to the SC Module page