Invalid Envision VenSAR NAIF codes
NAIF codes for an instrument SPICE reference should be between -1,000
and -1,000,000
:
NAIF instrument code = (s/c code)*(1000) - instrument number
This allows for 1000 instrument assignments on board a spacecraft.
It also allow to identify the parent spacecraft of a given instrument.
Unfortunately, this rule seems too restrictive for some mission that need to defined more instruments ids. A first example was reported on Juice with the PEP instrument (#12 (closed)):
JUICE_PEP_JDC_PIXEL_000 (ID: -2_851_000)
Until know, only a warning was raises in this specific case.
However, it seems that this issue is also present in EnVision kernels set, more specifically on VenSAR instrument where the SAR apperture is modeled with a large number of FOVs:
SAR modes
~~~~~~~~~
Because of the operational altitude and look angle dependency and due to
the fact that an IK cannot accommodate a dynamic FOV definition, a limited
number of FOV definitions are provided. From the information of the
previous section, a set of Field of Views is produced for a range of
altitudes between 220 and 510 km with steps of 10 km, and for a range of
look angles between 20 and 40 degrees with steps of 1 degree.
The following FOV definitions correspond to the NAIF Body Names:
ENVISION_VENSAR_SAR_MM_NNN, where NNN is the SC altitude and ranges
from 220 to 510, and MM is the look angle and ranges from 20 to 40.
\begindata
INS-668110001_NAME = 'ENVISION_VENSAR_SAR_20_220'
INS-668110001_BORESIGHT = ( 0.0 0.0 1.0 )
INS-668110001_FOV_SHAPE = 'CIRCLE'
INS-668110001_FOV_FRAME = 'ENVISION_VENSAR_SAR'
...
We need to change the way these IDs are computed to identify them properly.
Since !63 (merged), it already works with SpiceInstrument, but not for SpiceInstrument.spacecraft:
>>> SpiceRef(-668_110_001)
<SpiceInstrument> ENVISION_VENSAR_SAR_20_220 (-668_110_001)
>>> SpiceRef('ENVISION_VENSAR_SAR_20_220')
<SpiceInstrument> ENVISION_VENSAR_SAR_20_220 (-668_110_001)
>>> SpiceRef(-668_110_001).spacecraft
KeyError: 'SpiceSpacecraft invalid id: `-668110`'
This also has an impact on SpiceSpacecraft.instruments
search method to included these edge cases.