Geodesy, Coordinate Reference Systems (CRS), and Offline Magnetic Declination (WMM2025) Methodology
Ellipsoidal geodetic transformations, PROJ/EPSG-compatible Helmert datum operations, map projections (Poder/Engsager UTM, LCC, Albers, Stereographic), and offline magnetic declination via WMM2025 (NOAA/NCEI).
Technical abstract
This technical note details the geodetic, cartographic, and geomagnetic engines integrated into RockGeo's cross-platform core. It describes ellipsoidal conversions (geodetic ↔ ECEF), 3- and 7-parameter Helmert datum transformations aligned with the PROJ/EPSG ecosystem, analytical map projections used in field mapping and engineering surveying (including 6th-order Transverse Mercator / UTM), and the offline World Magnetic Model 2025 (WMM2025) for magnetic declination correction in geological compasses on Android and iOS.
1. Ellipsoidal geometry and datum transformations (Helmert)
To ensure global compatibility with surveys in SIRGAS 2000, WGS84, SAD69, NAD83, ETRS89, and national systems cataloged by IOGP/EPSG, the geodetic engine converts geodetic coordinates (φ, λ, h) to geocentric Cartesian coordinates (ECEF: X, Y, Z) on the reference ellipsoid (semi-major axis a and flattening f):
e² = f · (2 − f) | N(φ) = a / √(1 − e² · sin²φ)
X = (N + h) · cos(φ) · cos(λ)
Y = (N + h) · cos(φ) · sin(λ)
Z = (N · (1 − e²) + h) · sin(φ)- a, f
- Semi-major axis (m) and flattening of the ellipsoid (WGS84: a = 6,378,137.0 m; 1/f = 298.257223563).
- N(φ)
- Radius of curvature in the prime vertical at geodetic latitude φ (m).
Datum shifts between ellipsoids use regional 3-parameter Helmert transformations (translations ΔX, ΔY, ΔZ) or 7-parameter transformations (translations, rotations Rx, Ry, Rz, and scale factor Δs), automatically selecting the static PROJ catalog operation whose area of use contains the point coordinate with the lowest declared nominal error in meters.
2. Map projections implemented offline
To operate completely offline both on the map canvas and during file import/export (Shapefile, GeoPackage, GeoTIFF, LandXML, DXF, LAS/PLY), the engine implements forward and inverse analytical formulations in double precision (IEEE 754 float64), following Snyder (1987), IOGP/EPSG Guidance Note 7-2, and the Poder & Engsager (6th-order) algorithm for Transverse Mercator:
| Family / Projection | Codes / Typical use | Key characteristics |
|---|---|---|
| Transverse Mercator (UTM / tmerc / etmerc) | SIRGAS 2000 UTM, WGS84 UTM, Gauss-Krüger | 6th-order Poder & Engsager series (high accuracy even far from the central meridian); k0 = 0.9996 for UTM |
| Lambert Conformal Conic (LCC) | State plane systems and regional mapping | Preserves local angles; supports 1 or 2 standard parallels |
| Albers Equal-Area Conic (AEA) | Territorial statistics and large basins | Preserves true areas over wide east-west extents |
| Mercator / Web Mercator | Tile basemaps (EPSG:3857) and nautical charts | Ellipsoidal and spherical variants |
| Stereographic (Polar UPS and Oblique) | Polar regions and European grids (e.g., RD New) | Conformal azimuthal projection |
| Azimuthal and Special | LAEA, Azimuthal Equidistant, Equal Earth, Oblique Mercator, Krovak, Laborde, Orthographic | International coverage of official projected systems |
3. Offline Magnetic Declination via the World Magnetic Model (WMM2025)
To guarantee exact parity between Android and iOS when converting between Magnetic North and True North in geological compass measurements—without relying on internet access or differing OS APIs—RockGeo fully implements the World Magnetic Model 2025 (WMM2025, NOAA/NCEI, epoch 2025.0, official validity window through 2030.0).
The calculation converts geodetic position (latitude, longitude, and height above the WGS84 ellipsoid) to spherical geocentric coordinates (φ', λ, r), evaluates the spherical harmonic expansion of the geomagnetic potential up to degree and order n = m = 12 using Schmidt quasi-normalized associated Legendre functions (including linear secular variation of the Gauss coefficients g_n^m and h_n^m for the decimal measurement date), and rotates the field components (X_north, Y_east, Z_down, in nanotesla) back into the local geodetic frame:
D = arctan2( Y_east, X_north ) [positive east of True North]
H = √( X_north² + Y_east² ) [nT]
I = arctan2( Z_down, H ) [positive downward]- X_north, Y_east, Z_down
- Components of the geomagnetic field vector in the local geodetic frame (nT).
- D
- Magnetic declination in degrees; in Brazil it is typically negative (west), between −14° and −23°.
Assumptions, applicability limits, and fail-closed controls
- The WMM2025 model is officially valid from 2025.0 to 2030.0 and represents the main geomagnetic field originating in Earth's core; local crustal magnetic anomalies (banded iron formations, mafic bodies, power lines, or metallic structures near the compass) are not modeled by WMM and may deflect the needle or magnetometer.
- Datum transformations based on static Helmert parameters do not include local distortion grids (NTv2 / high-resolution geoid grids); when centimeter-level accuracy is required on legacy networks (e.g., SAD69 → SIRGAS 2000), official grids from the national mapping agency (such as IBGE's ProGriD) are recommended.
- Elevations reported directly by standard GNSS receivers generally refer to ellipsoidal height (h); converting to orthometric height (H) requires the official geoid or quasi-geoid model (e.g., MAPGEO / hgeoHNOR in Brazil).
References
- CHULLIAT, A. et al. The US/UK World Magnetic Model for 2025–2030: Technical Report. NOAA National Centers for Environmental Information (NCEI) / British Geological Survey (BGS), 2024. — Official source
- SNYDER, J. P. Map Projections — A Working Manual. U.S. Geological Survey Professional Paper 1395, Washington, DC, 1987. — Official source
- IOGP — INTERNATIONAL ASSOCIATION OF OIL & GAS PRODUCERS. Geomatics Guidance Note 7, Part 2: Coordinate Conversions and Transformations including Formulas (EPSG Dataset). — Official source
- PODER, K.; ENGSAGER, K. Some Conformal Mappings and Transformations for Geodesy and Topographic Cartography. Copenhagen: Kort & Matrikelstyrelsen, Publications 4th Series, v. 6, 1998.
- PROJ CONTRIBUTORS. PROJ Coordinate Transformation Software Library. Open Source Geospatial Foundation. — Official source
- NATIONAL GEOSPATIAL-INTELLIGENCE AGENCY (NGA). World Geodetic System 1984 (WGS 84) — NGA.STND.0036_1.0.0_WGS84. 2014.
How to cite this document
Professionals, consultants, and researchers using RockGeo in technical reports, engineering designs, or academic work may cite this methodology using the formats below:
ABNT (NBR 6023)
ROCKGEO (THARD TECH). Geodesy, Coordinate Reference Systems (CRS), and Offline Magnetic Declination (WMM2025) Methodology. Technical Note RG-NT-08, version 1.0. 2026. Available at: https://rockgeoapp.com.br/en/articles/geodesia-crs-declinacao-magnetica/.APA (7th ed.)
RockGeo (Thard Tech). (2026). Geodesy, Coordinate Reference Systems (CRS), and Offline Magnetic Declination (WMM2025) Methodology (Technical Note RG-NT-08, v. 1.0). https://rockgeoapp.com.br/en/articles/geodesia-crs-declinacao-magnetica/BibTeX
@techreport{rockgeo2026nt08en,
author = {{RockGeo (Thard Tech)}},
title = {Geodesy, Coordinate Reference Systems (CRS), and Offline Magnetic Declination (WMM2025) Methodology},
institution = {RockGeo / Thard Tech},
number = {RG-NT-08},
version = {1.0},
year = {2026},
url = {https://rockgeoapp.com.br/en/articles/geodesia-crs-declinacao-magnetica/}
}