Closed ortk95 closed 3 months ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 9481105926: | 0.002% |
Covered Lines: | 2960 |
Relevant Lines: | 2972 |
Added an additional
alt
keyword only parameter to transformations from longitude/latitude coordinates, which allows the altitude of the point to be specified. For example, you can now specify the altitude with methods like:The altitude is specified in kilometers above the planet's surface, and defaults to
alt=0
(so the default behaviour is unchanged).This example shows how this new PlanetMapper functionality can be used to plot a longitide/latitude grid at an altitude of 10,000km above the surface (i.e. the 1-bar level) of Jupiter:
The calculation of if a point is visible (
Body.test_if_lonlat_visible
) has also been rewritten to work correctly with arbitrary altitudes. If the altitude is zero (i.e. the point is on the surface), the calculation is unchanged, using the SPICEillumf
function. However, for a non-zero altitude, the calculation now searches for any intercept with the target's surface along the line of sight from the observer (using SPICE'ssincpt
), and uses this to identify if the point is visible, or obscured by the target. This ensures that points at altitude that are "behind" the target, but still visible, are calculated correctly.Closes #359.
Pull request checklist
requirements.txt
are reflected insetup.py
and conda-forge feedstockrun_ci.sh
or check GitHub Actions)See CONTRIBUTING.md for more details.