Closed MarkWieczorek closed 3 months ago
In order to calculate mass
from GM
, the ellipsoid classes will need to have access to the value of G
. As G does change every few years, the user should know what value we are using. Furthermore, we might want to put it in a single place (as opposed to each of the three ellipsoids) so that it is easy to update and to ensure that all parts of Boule are using the same value.
I am not sure where is the best place to store this value, nor where the user should access it.
One possibility would be to add it to boule/__init__.py
, and then import it into each of the three ellipsoid classes. G could be hidden (_G
) or not. If the value is hidden in the main namespace, then one could perhaps access it's value by Ellipsoid.G
. The only thing I don't like about this is that G is not a property of the ellipsoid.
@MarkWieczorek good point about G. I'd prefer to have it at then module level and exposed as part of the API if users need to know it. The classes can use it and don't need to have it as a property.
@MarkWieczorek what is the volume_equivalent_radius? Is it the radius of a sphere with equal volume of the ellipsoid?
For mean_density, I'm assuming this is as simple as mass / volume
. Is this right?
yes and yes! wgs84 defines $R_3$, which is just the radius of a sphere with the same volume as the ellipsoid.
In addition to the attributes that are already computed for each of the ellipsoid classes, I propose that we also provide the following: