Vulcan
Aerospace Engineering Utilities Built on Janus
Loading...
Searching...
No Matches
vulcan::environment::magnetic Namespace Reference

Namespaces

namespace  constants

Functions

template<typename Scalar>
Vec3< Scalar > dipole_field_ecef (const Vec3< Scalar > &r_ecef, double B0=constants::B0, double R=vulcan::constants::earth::R_eq)
 Centered dipole magnetic field in ECEF.
template<typename Scalar>
Scalar field_magnitude (const Vec3< Scalar > &r_ecef, double B0=constants::B0, double R=vulcan::constants::earth::R_eq)
 Magnetic field magnitude at given position.
template<typename Scalar>
Vec3< Scalar > field_ned (const Scalar &lat, const Scalar &lon, const Scalar &alt, double B0=constants::B0, double R=vulcan::constants::earth::R_eq)
 Magnetic field in local NED frame at geodetic coordinates.
template<typename Scalar>
Scalar surface_intensity (const Scalar &lat, double B0=constants::B0)
 Total field intensity at surface for given latitude.
template<typename Scalar>
Scalar inclination (const Scalar &lat)
 Magnetic inclination (dip angle) at given latitude.

Function Documentation

◆ dipole_field_ecef()

template<typename Scalar>
Vec3< Scalar > vulcan::environment::magnetic::dipole_field_ecef ( const Vec3< Scalar > & r_ecef,
double B0 = constants::B0,
double R = vulcan::constants::earth::R_eq )

Centered dipole magnetic field in ECEF.

Simplified model with dipole aligned with Earth's rotation axis. For geomagnetic navigation, use the tilted dipole or IGRF models.

Field follows: B = (B0 * R³/r³) * [3(m̂·r̂)r̂ - m̂] where m̂ is the dipole direction (Z-axis for centered dipole)

Template Parameters
Scalardouble or casadi::MX
Parameters
r_ecefPosition in ECEF [m]
B0Reference field at equator surface [T]
RReference radius [m]
Returns
Magnetic field vector in ECEF [T]

◆ field_magnitude()

template<typename Scalar>
Scalar vulcan::environment::magnetic::field_magnitude ( const Vec3< Scalar > & r_ecef,
double B0 = constants::B0,
double R = vulcan::constants::earth::R_eq )

Magnetic field magnitude at given position.

Parameters
r_ecefPosition in ECEF [m]
Returns
|B| in Tesla

◆ field_ned()

template<typename Scalar>
Vec3< Scalar > vulcan::environment::magnetic::field_ned ( const Scalar & lat,
const Scalar & lon,
const Scalar & alt,
double B0 = constants::B0,
double R = vulcan::constants::earth::R_eq )

Magnetic field in local NED frame at geodetic coordinates.

Uses spherical approximation for simplicity.

Parameters
latGeodetic latitude [rad]
lonGeodetic longitude [rad] (unused for centered dipole)
altAltitude above ellipsoid [m]
Returns
{B_north, B_east, B_down} in Tesla

◆ inclination()

template<typename Scalar>
Scalar vulcan::environment::magnetic::inclination ( const Scalar & lat)

Magnetic inclination (dip angle) at given latitude.

For a centered dipole: tan(I) = 2 * tan(lat)

Parameters
latLatitude [rad]
Returns
Inclination angle [rad] (positive downward in north)

◆ surface_intensity()

template<typename Scalar>
Scalar vulcan::environment::magnetic::surface_intensity ( const Scalar & lat,
double B0 = constants::B0 )

Total field intensity at surface for given latitude.

|B| = B0 * sqrt(1 + 3sin²(lat))

Parameters
latGeodetic/geocentric latitude [rad]
Returns
Surface field intensity [T]