fatiando / boule

Reference ellipsoids for geodesy and geophysics
https://www.fatiando.org/boule
BSD 3-Clause "New" or "Revised" License
38 stars 17 forks source link

Implement TriAxialEllipsoid class #47

Closed MarkWieczorek closed 2 years ago

MarkWieczorek commented 4 years ago

Boule currently supports biaxial ellipsoids (under the classname Ellipsoid) and spheres (which are a subclass of Ellipsoid). However, one major omission, which is important for all of the planetary moons, is the case of triaxial ellipsoids.

Though it may be difficult to implement all the features of the present ellipsoid class, there are several easy functions that would be of immediate use:

  1. radius of the body as a function of (geocentric) latitude and longitude,
  2. Ellipsoid parameters omega, GM, a, b, and c,
  3. Some easily derived quantities, such as ellipticities, flattenings, etc.,
  4. Orbital parameters of the body, such as the eccentricity, inclination, and semimajor axis,
  5. The volume of the body,
  6. The tidal potential raised by the primary (assuming the moon is in synchronous rotation), and the centrifugal potential (non-zero inclinations and eccentricies would be useful as well, but their computation are non-trivial).

Other quantities that geodecists use on Earth (like normal gravity, geodetic coordinates, etc), may take significant effort to implement, but would be of use for only a handful of experts (who might decide to implement these themselves).

At this point, given that Boule would have three types of ellipsoids, it might be useful to make some kind of factory function called Ellipsoid that would automatically instantiate one of the three classes based on the input parameters:

leouieda commented 4 years ago

@MarkWieczorek we could add the class with only the geometric properties and raise NotImplementedError on the gravity and coordinate conversion calculations. Since use of this is a bit niche then it wouldn't be a major problem if we start without having these methods. Do you have any reference for these calculations? Having it linked here would help anyone who is picking this up.

I hadn't thought about the orbits. This might be better done in stages, with the geometric parts first and then adding orbital parameters and calculations later on. That falls way outside of my expertise. Would this be added to the biaxial ellipsoid and sphere as well?

We can tackled the factory function after the class is available and we can see what limitations might come up.

MarkWieczorek commented 4 years ago

The basic geometric properties are found here:

https://en.wikipedia.org/wiki/Ellipsoid

The article notes that

For geodesy, geodetic latitude, the angle between the vertical and the equatorial plane, is most commonly used. Geodetic latitude is not defined for a general ellipsoid because it depends upon longitude.

So this simplifies our lives.

As for the orbital parameters: The initial step would be just to add them to a dictionary or as an attribute.

leouieda commented 2 years ago

Done in #72 with the minimum structure. Opened #105 to add the surface radius calculation as a start. We can look into gravity afterwards since that's harder.