This section describes functions from file opt/geopack_ct.ct.
[Br,Btheta,Bphi] = IGRF(year,r,theta,phi)
[Br,Btheta,Bphi] = IGRF(year,r,theta,phi)
computes the IGRF model magnetic field using 10 coefficients.
Inputs:
year Integer Year number, from 1965 to 1990
r Radial coordinate of the point, in Earth radii
theta Geographic colatitude of the point, in degrees
phi Geographic longitude of the point, in degrees
Outputs:
Br,Btheta,Bphi: Magnetic field in geographic spherical coordinates
in nanotesla.
Error codes:
-1: First arg (year) not int scalar
-2: Second arg (r) not real scalar
-3: Third arg (theta) not real scalar
-4: Fourth arg (phi) not real scalar
[Bx,By,Bz] = T89(Kp,x,y,z;psi)
T89 is obsolete. Use T89c instead.
It will work and call T89c automatically, but will give one warning.
See also:
T89c.
Error codes:
-1: Bad type of input arg
-2: The dipole tilt argument (psi) is not int or real scalar
[Bx,By,Bz] = T89c(Kp,x,y,z;psi)
[Bx,By,Bz] = T89c(Kp,x,y,z) computes the corrected/updated
Tsyganenko-89 model magnetic field.
Inputs: Kp, the Kp index; x,y,z, GSM coordinates in Earth radii.
Outputs: total magnetic field in nanotesla in GSM coordinates.
[Bx,By,Bz] = T89c(Kp,x,y,z,psi) defines the dipole tilt angle psi
in degrees, default 0 (no tilt). Positive tilt corresponds to a situation
where the magnetic north pole is closer to the Sun than the south pole.
See also:
m2i,
geotomag,
geotogsmXYZ.
Error codes:
-1: Bad type of input arg
-2: The dipole tilt argument (psi) is not int or real scalar
[x1,y1,z1] = geotogsmXYZ(x,y,z,year,month,day,hour,min,sec)
[x1,y1,z1] = geotogsmXYZ(x,y,z, year,month,day,hour,min,sec)
transform given point (x,y,z) in Cartesian GEOgraphic coordinates into
the corresponding point (x1,y1,z1) in GSM coordinates.
The year,month,day,hour,min,sec must be given as integers.
Year must contain four digits; month,day start from 1.
See also:
gsmtogeoXYZ.
Error codes:
-1: Input argument x is not real or int scalar
-2: Input argument y is not real or int scalar
-3: Input argument z is not real or int scalar
-4: Input argument year is not int scalar
-5: Input argument day is not int scalar
-6: Input argument hour is not int scalar
-7: Input argument min is not int scalar
-8: Input argument sec is not int scalar
-9: Input argument month is not int scalar
[latmag,longmag] = geotomag(lat,longit)
[latmag,longmag] = geotomag(lat,long) transforms geographic
latitude and longitude to geomagnetic dipole latitude and longitude.
All angles in degrees.
See also:
geotomagXYZ,
magtogeo,
geotogsmXYZ,
gsmtogeoXYZ.
Error codes:
-1: Bad first arg
-2: Bad second arg
[x1,y1,z1] = geotomagXYZ(x,y,z)
[x1,y1,z1] = geotomagXYZ(x,y,z) transforms geographic
point (x,y,z) to geomagnetic dipole coordinates (x1,y1,z1).
See also:
geotomag,
magtogeoXYZ.
Error codes:
-1: Bad first arg
-2: Bad second arg
-3: Bad third arg
[x1,y1,z1] = gsetogsmXYZ(x,y,z,year,month,day,hour,min,sec)
[x1,y1,z1] = gsetogsm(x,y,z, year,month,day,hour,min,sec)
transform given point (x,y,z) in GSE coordinates into
the corresponding point (x1,y1,z1) in GSM coordinates.
The year,month,day,hour,min,sec must be given as integers.
Year must contain four digits; month,day start from 1.
See also:
gsmtogseXYZ.
Error codes:
-1: Input argument x is not real or int scalar
-2: Input argument y is not real or int scalar
-3: Input argument z is not real or int scalar
-4: Input argument year is not int scalar
-5: Input argument day is not int scalar
-6: Input argument hour is not int scalar
-7: Input argument min is not int scalar
-8: Input argument sec is not int scalar
-9: Input argument month is not int scalar
[x1,y1,z1] = gsmtogeoXYZ(x,y,z,year,month,day,hour,min,sec)
[x1,y1,z1] = gsmtogeoXYZ(x,y,z, year,month,day,hour,min,sec)
transform given point (x,y,z) in Cartesian GSM coordinates into
the corresponding point (x1,y1,z1) in Cartesian GEOgraphic coordinates.
The year,day,hour,min,sec must be given as integers.
Year must contain four digits; month,day start from 1.
See also:
geotogsmXYZ.
Error codes:
-1: Input argument x is not real or int scalar
-2: Input argument y is not real or int scalar
-3: Input argument z is not real or int scalar
-4: Input argument year is not int scalar
-5: Input argument day is not int scalar
-6: Input argument hour is not int scalar
-7: Input argument min is not int scalar
-8: Input argument sec is not int scalar
-9: Input argument month is not int scalar
[x1,y1,z1] = gsmtogseXYZ(x,y,z,year,month,day,hour,min,sec)
[x1,y1,z1] = gsmtogse(x,y,z, year,month,day,hour,min,sec)
transform given point (x,y,z) in GSM coordinates into
the corresponding point (x1,y1,z1) in GSE coordinates.
The year,month,day,hour,min,sec must be given as integers.
Year must contain four digits; month,day start from 1.
See also:
gsetogsmXYZ.
Error codes:
-1: Input argument x is not real or int scalar
-2: Input argument y is not real or int scalar
-3: Input argument z is not real or int scalar
-4: Input argument year is not int scalar
-5: Input argument day is not int scalar
-6: Input argument hour is not int scalar
-7: Input argument min is not int scalar
-8: Input argument sec is not int scalar
-9: Input argument month is not int scalar
[theta,phi] = m2i(Kp,x,y)
[theta,phi] = m2i(Kp,x,y) maps the equatorial plane point (x,y,z=0)
to the northern ionosphere. Inputs: Kp, the Kp index; x,y,z, GSM
coordinates in Earth radii. Outputs: colatitude and longitude in
magnetic coordinates in degrees.
See also:
T89,
geotomag.
Error codes:
-1: Bad type of input arg
[lat,longit] = magtogeo(latmag,longmag)
[lat,long] = magtogeo(latmag,longmag) transforms geomagnetic
latitude and longitude to geographic latitude and longitude.
All angles in degrees.
See also:
geotomag,
magtogeoXYZ,
geotogsmXYZ,
gsmtogeoXYZ.
Error codes:
-1: Bad first arg
-2: Bad second arg
[x1,y1,z1] = magtogeoXYZ(x,y,z)
[x1,y1,z1] = magtogeoXYZ(x,y,z) transforms geomagnetic dipole
point (x,y,z) to geographic coordinates (x1,y1,z1).
See also:
magtogeo,
geotomagXYZ.
Error codes:
-1: Bad first arg
-2: Bad second arg
-3: Bad third arg