Skip to content

Elliptic coordinates#6

Merged
VPRamon merged 4 commits intomainfrom
elliptic
Feb 18, 2026
Merged

Elliptic coordinates#6
VPRamon merged 4 commits intomainfrom
elliptic

Conversation

@VPRamon
Copy link
Member

@VPRamon VPRamon commented Feb 18, 2026

This pull request introduces comprehensive support for geodetic reference ellipsoids and ellipsoidal coordinate types. The main changes include the addition of a new ellipsoid module, enhancements to the ReferenceFrame derive macro to support associating frames with ellipsoids, and the introduction of ellipsoidal position types with serialization support. These changes enable precise geodetic computations and ensure that reference frames can specify their associated ellipsoid, improving correctness and extensibility for geodesy and astrometry applications.

Ellipsoid support and frame association:

  • Added a new ellipsoid module (src/ellipsoid.rs) that defines the Ellipsoid trait (for geodetic reference ellipsoids), the HasEllipsoid trait (for associating a frame with an ellipsoid), and provides predefined ellipsoid types Wgs84 and Grs80 with documentation and tests.
  • Enhanced the DeriveReferenceFrame macro in affn-derive so that frames can specify an ellipsoid attribute; this generates a HasEllipsoid implementation for the frame and, if present, adds ellipsoidal getter methods to the corresponding position type. [1] [2] [3] [4] [5] [6]
  • Updated the ITRF and ECEF frames in src/frames/astro.rs to specify their associated ellipsoid (Grs80 and Wgs84, respectively) using the new attribute. [1] [2]

Ellipsoidal coordinate types:

  • Introduced a new ellipsoidal module (src/ellipsoidal/mod.rs) providing the Position type for ellipsoidal (geodetic) coordinates, with rationale and normalization helpers.
  • Added serde (de)serialization support for ellipsoidal::Position in a new src/ellipsoidal/position_serde.rs file, maintaining backward compatibility with previous formats.

Other adjustments:

  • Removed the unused geodesy feature from Cargo.toml.

These changes lay the groundwork for robust geodetic and ellipsoidal computations with clear frame-ellipsoid associations and improved type safety.

ramon.valles added 2 commits February 18, 2026 14:54
…oid traits

- Introduced `Ellipsoid` trait for defining geodetic reference ellipsoids and `HasEllipsoid` trait for associating ellipsoids with reference frames.
- Added predefined ellipsoids: `Wgs84` and `Grs80`.
- Created `ellipsoidal` module containing `Position` type for representing geodetic coordinates (longitude, latitude, height).
- Implemented conversion methods between ellipsoidal and Cartesian coordinates.
- Removed the outdated `GeodeticCoord` type in favor of the new `Position` type.
- Updated `astro` frames to use the new ellipsoid definitions.
- Added serialization and deserialization support for `Position` using Serde.
@VPRamon VPRamon self-assigned this Feb 18, 2026
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

Code Coverage

Package Line Rate Complexity Health
src 100% 0
src.cartesian 98% 0
src.spherical 94% 0
src.ops 100% 0
src.ellipsoidal 71% 0
src.frames 93% 0
Summary 95% (2510 / 2646) 0

@VPRamon VPRamon merged commit 88629ff into main Feb 18, 2026
5 checks passed
@VPRamon VPRamon deleted the elliptic branch February 18, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant