geopulse.geo
Geographic projections used for line integrals of the geoelectric field.
Two projections are provided:
latlon_to_local_xy_spherical_m()— mean-radius spherical, simple and cheap, accurate to ~0.3 % for continent-scale networks.latlon_to_local_xy_wgs84_m()— WGS84 ellipsoid, matches Horton (2012) Appendix eqns A3, A5, A6 exactly.
Both return (x_east_m, y_north_m) offsets in metres from a projection
origin (lat0_deg, lon0_deg).
The WGS84 form is the default for PowerGridNetwork
and PipelineNetwork so that GIC benchmark
results match published papers to sub-percent precision.
Notes
Horton (2012) Appendix — the north-south and east-west local distances
between two lat/lon points A, B in kilometres are:
with Δlat, Δlon in degrees. This is the compact form of the exact
meridian- and prime-vertical-radius-of-curvature expressions:
The implementation uses the exact M, N form so we stay accurate at
polar latitudes where the truncated series in the paper’s Appendix starts
to lose digits.
References
Functions
|
Equirectangular projection about |
|
Equirectangular projection about |
|
WGS84 meridional radius of curvature |
|
WGS84 prime-vertical radius of curvature |
- geopulse.geo.latlon_to_local_xy_spherical_m(lat_deg, lon_deg, lat0_deg, lon0_deg)[source]
Equirectangular projection about
(lat0, lon0)— spherical Earth.Uses
R_EARTH_M(mean radius 6371 km). Cheap and adequate to ~0.3 % for a few hundred kilometres, but drifts at continent scale. Preferlatlon_to_local_xy_wgs84_m()for anything published.- Parameters:
- Return type:
- Returns:
x_east_m, y_north_m (float) – Eastward and northward offsets in metres.
- geopulse.geo.latlon_to_local_xy_wgs84_m(lat_deg, lon_deg, lat0_deg, lon0_deg)[source]
Equirectangular projection about
(lat0, lon0)— WGS84 ellipsoid.Uses meridian- and prime-vertical-radii-of-curvature at the mean latitude
φ = (lat + lat0) / 2to convert degree offsets into east/north offsets in metres. Matches Horton (2012) Appendix A3/A7 exactly (the111.133 − 0.56 cos 2φetc. truncated forms are the small-e²series expansion of this same expression).- Parameters:
- Return type:
- Returns:
x_east_m, y_north_m (float) – Eastward and northward offsets in metres.
Examples
>>> # 1° latitude at 45° N ≈ 111.13 km per WGS84. >>> x, y = latlon_to_local_xy_wgs84_m(46.0, -75.0, 45.0, -75.0) >>> 111_000 < y < 112_000 True