Skip to content

Conversation

@leouieda
Copy link
Member

@leouieda leouieda commented Sep 9, 2025

Our methods for doing computations like coordinate conversions and normal gravity calculations all take a different set of inputs. For example, normal gravity takes geodetic latitude and height which coordinate conversions also take longitude (though its not used). The spherical versions are more inconsistent since they sometimes take a height and sometimes not. Here, we standardize all of these methods to take a coordinates argument that is a tuple of the three coordinates longitude, latitude, and height. These are standard throughout other Fatiando a Terra projects. It also means that all of these methods take the same input. For methods that don't use longitude, etc, they can be passed None is desired. This will also make implementing an argument to specify inputs in different coordinate systems more straightforward since we won't have to deal with differences between latitudes and whether we're using height or radius.

To do:

  • Change the methods in Sphere
  • Change the methods in TriaxialEllipsoid

Relevant issues/PRs: Related to #175 #232

@leouieda leouieda marked this pull request as ready for review September 11, 2025 19:13
@leouieda leouieda added this to the v0.6.0 milestone Sep 30, 2025
@leouieda leouieda merged commit f5a59ab into main Oct 1, 2025
13 checks passed
@leouieda leouieda deleted the coordinates-arguments branch October 1, 2025 13:40
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.

2 participants