World Magnetic Model

Calculate Earth's magnetic field at specific location and time using World Magnetic Model

  • Library:
  • Aerospace Blockset / Environment / Gravity

Description

The World Magnetic Model block implements the mathematical representation of the National Geospatial Intelligence Agency (NGA) World Magnetic Model. The World Magnetic Model block calculates the Earth magnetic field vector, horizontal intensity, declination, inclination, and total intensity at a specified location and time. The reference frame is north-east-down (NED).

Note

You cannot use this block to model the Earth magnetic field above an altitude of 1,000,000 meters.

Limitations

All specifications have these limitations:

  • The internal calculation of decimal year does not take into account local time or leap seconds.

  • The specifications describe only the long-wavelength spatial magnetic fluctuations in the Earth's core. Intermediate and short-wavelength fluctuations, contributed from the crustal field (the mantle and crust), are not included. Also, the substantial fluctuations of the geomagnetic field, which occur constantly during magnetic storms and almost constantly in the disturbance field (auroral zones), are not included.

In addition, each specification has these limitations:

  • WMM2015v2 supersedes WMM2015(v1). Consider replacing WMM2015(v1) with WMM2015v2 when used for navigation and other systems. WMM2015v2 was released by National Oceanic and Atmospheric Administration (NOAA) in February 2019 to correct performance degradation issues in the Arctic region for January 1, 2015, to December 31, 2019. Therefore, it is still acceptable to use WMM2015(v1) in systems below 55 degrees latitude in the Northern hemisphere.

  • The WMM2015 specification produces data that is reliable five years after the epoch of the model, which is January 1, 2015.

  • The WMM2010 specification produces data that is reliable five years after the epoch of the model, which is January 1, 2010.

  • The WMM2005 specification produces data that is reliable five years after the epoch of the model, which is January 1, 2005.

  • The WMM2000 specification produces data that is reliable five years after the epoch of the model, which is January 1, 2000.

Ports

Input

expand all

Height, specified as a scalar, in selected units.

Data Types: double

Latitude, specified as a scalar, in degrees.

Data Types: double

Longitude, specified as a scalar, in degrees.

Data Types: double

Desired year in a decimal format to include any fraction of the year that has already passed. The value is the current year plus the number of days that have passed in this year divided by 365.

For example, to calculate the decimal year, dyear, for March 21, 2015:

dyear=decyear('21-March-2015','dd-mmm-yyyy')
dyear =
   2.0152e+03

Data Types: double

Output

expand all

Magnetic field, returned as a vector, in selected units.

Data Types: double

Horizontal intensity, returned as a scalar, in specified units.

Data Types: double

Declination, returned as a scalar, in degrees.

Data Types: double

Inclination, returned as a scalar, in degrees.

Data Types: double

Total intensity, returned as a scalar, in selected units.

Data Types: double

Parameters

expand all

World Magnetic Model coefficient file, selected from the list.

  • WMM2000 (2000-2005) — World Magnetic Model 2000 coefficient file

  • WMM2005 (2005-2010) — World Magnetic Model 2005 coefficient file

  • WMM2010 (2010-2015) — World Magnetic Model 2010 coefficient file

  • WMM2015 V1 (2015-2020) — World Magnetic Model 2015(v1) coefficient file

  • WMM2015 V2 (2015-2020) — World Magnetic Model 2015v2 coefficient file

  • Custom — Specify your own World Magnetic Model coefficient file. You can download a World Magnetic Model coefficient file from The NOAA World Magnetic Model.

Dependencies

Selecting Custom enables the Custom .COF file parameter.

Programmatic Use

Block Parameter: customFile
Type: character vector
Values: 'WMM2015 V2 (2015-2020)' | 'WMM2000 (2000-2005)' | 'WMM2005 (2005-2010)' | 'WMM2010 (2010-2015)' | 'WMM2015 V1 (2015-2020)' | 'Custom'
Default: 'WMM2015 V2 (2015-2020)'

World Magnetic Model coefficient file, downloaded from The NOAA World Magnetic Model. For example, if you want to download a coefficient file not yet listed in the WMM coefficients list.

Dependencies

To enable this parameter, select Custom for the WMM coefficients parameter.

Programmatic Use

Block Parameter: customFile
Type: character vector
Values: any coefficient file name
Default: 'WMM2015v2.COF'

Input and output units:

UnitsHeightMagnetic FieldHorizontal IntensityTotal Intensity
Metric (MKS)MetersNanoteslaNanoteslaNanotesla
EnglishFeetNanogaussNanogaussNanogauss

Programmatic Use

Block Parameter: units
Type: character vector
Values: 'Metric (MKS)' | 'English'
Default: 'Metric (MKS)'

When selected, the decimal year is an input for the World Magnetic Model block. Otherwise, specify a date using the dialog parameters of Month, Day, and Year.

Programmatic Use

Block Parameter: time_in
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Month to calculate decimal year.

Programmatic Use

Block Parameter: month
Type: character vector
Values: 'January' | 'February' | 'March' | 'April' | 'May' | 'June' | 'July' | 'August' | 'September' | 'October' | 'November' | 'December'
Default: 'January'

Day to calculate decimal year.

Programmatic Use

Block Parameter: day
Type: character vector
Values: '1' to '31'
Default: '1'

Year to calculate decimal year.

Programmatic Use

Block Parameter: year
Type: character vector
Values: any year
Default: '2015'

Specify if out-of-range input invokes a warning, error, or no action.

Programmatic Use

Block Parameter: action
Type: character vector
Values: 'Error' | 'Warning' | 'None'
Default: 'Error'

When selected, the horizontal intensity is output.

Programmatic Use

Block Parameter: h_out
Type: character vector
Values: 'on' | 'off' | 'None'
Default: 'on'

When selected, the declination or the angle between true north and the magnetic field vector (positive eastwards) is output.

Programmatic Use

Block Parameter: dec_out
Type: character vector
Values: 'on' | 'off' | 'None'
Default: 'on'

When selected, the inclination or the angle between the horizontal plane and the magnetic field vector (positive downwards) is output.

Programmatic Use

Block Parameter: inc_out
Type: character vector
Values: 'on' | 'off' | 'None'
Default: 'on'

When selected, the total intensity is output.

Programmatic Use

Block Parameter: ti_out
Type: character vector
Values: 'on' | 'off' | 'None'
Default: 'on'

Introduced in R2019b