Convert from geographic to geomagnetic coordinates

version 1.0.0 (1.52 KB) by Daniel Okoh
A MATLAB function that converts from geographic to geomagnetic coordinates

55 Downloads

Updated 19 Nov 2021

View License

This is a MATLAB function that computes the geomagnetic latitudes of a location using the geographic coordinates of the location.
The syntax is:
geom_lat = geog2geom(geog_lat, geog_long, height, decimalYear)
The inputs are:
geog_lat: Geographic latitude, specified as a scalar or vector, in degrees. North latitude is positive and south latitude is negative.
geog_long: Geographic longitude specified as a scalar or vector, in degrees. East longitude is positive and west longitude is negative.
height: Distance from the surface of the Earth, specified as a scalar or vector, in meters.
decimalYear: Year, in decimal format, specified as a scalar or vector. This value can have any fraction of the year that has already passed.
The geog_lat, geog_long, height, and decimalYear arguments must all be the same size (scalars or vectors).
The output is:
geom_lat: Geomagnetic latitude, specified as a scalar or vector, in degrees. North latitude is positive and south latitude is negative.
The size of geom_lat is same as the size of each of the inputs

Cite As

Daniel Okoh (2022). Convert from geographic to geomagnetic coordinates (https://www.mathworks.com/matlabcentral/fileexchange/102219-convert-from-geographic-to-geomagnetic-coordinates), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with R2015b and later releases
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!