Skip to content
PL1

Fix field of view footprint on limb points

Currently, when an instrument field of view is partially covering the surface, the point on the limb are computed to generate a smoother polygon. Unfortunately this could lead to representation artifacts when the space is too close to the surface (with respect to the target radius):

import matplotlib.pyplot as plt
from planetary_coverage import MOON, TourConfig

tour = TourConfig(mk='juice_plan', version='v440_20240109_001', spacecraft='JUICE', instrument='JANUS', target='MOON')
traj = tour['2024-08-19T21:12:17']

fig = plt.figure(figsize=(12, 8))
ax = fig.add_subplot(projection=MOON)

ax.add_collection(traj.fovs)

ax.set_view(170, 180, -20, -10);

image

By default, the FoV is split into 25 points (4 corners + 3 points on each edge). It is a tradeoff between performance and precision. To get a cleaner footprint, we can take the coordinates of the impact parameter of the pixels on the limb to complete the polygon for these points. It works well in many cases but unfortunately in this case this approximation is no longer true because your impact parameter coordinates are too inward the polygon (the red points) and change its original shape :

image

One fix is to disable the polygon with at least one limb point:

janus.fovs.limb = False
del janus.fovs.pts  # remove the `.pts` cache

but in this case the whole polygon will be discarded.

I would be better if we can toggle only the limb points and keep only the ground points:

image

Note: add a proper cache reloader like with traj.fovs.npts for the .limb property


An alternative strategy to properly slice the footprint in these edge cases could be search but is not required to fix this issue.

Edited by benoit seignovert