Camera.update_short_attitude

giant.camera:

Camera.update_short_attitude(method=AttitudeUpdateMethods.INTERPOLATE, max_delta=datetime.timedelta(seconds=300))[source]

This method updates the attitude metadata for short exposure images based off of the solved for attitudes in the long-exposure images.

There are three different techniques that you can use to update the short exposure attitudes which are selected using the method key word argument. The first technique, 'propagate', “propagates” the attitude from a long exposure image to the short exposure image using a delta quaternion. The delta quaternion is calculated using the attitude_function and is computed using

\[\delta\mathbf{q}=\mathbf{q}_{sf}\otimes\mathbf{q}_{lf}^{-1}\]

where \(\delta\mathbf{q}\) is the delta quaternion, \(\mathbf{q}_{sf}\) is the attitude quaternion at the short exposure image time according to the attitude_function, \(\mathbf{q}_{lf}^{-1}\) is the inverse of the attitude quaternion for the long exposure image closest (in time) to the short exposure image according to the attitude_function, and \(\otimes\) is quaternion multiplication. The delta quaternion is applied according to

\[\mathbf{q}_{ss}=\delta\mathbf{q}\otimes\mathbf{q}_{ls}\]

where \(\mathbf{q}_{ss}\) is the solved for attitude for the short exposure image and \(\mathbf{q}_{ls}\) is the solved for attitude for the long exposure image closest (in time) to the short exposure image. This means that to use this method short exposure images must be either preceded or followed by a long exposure image in the images list.

The next potential method is 'interpolate'. In interpolate, the attitude of a short exposure image that is sandwiched between 2 long exposure images is updated by using the SLERP quaternion interpolation method. The SLERP quaternion interpolation method is described in slerp() function documentation. In order to use the 'interpolate' method all turned on short exposure images must be immediately preceded and followed by long exposure images.

The final potential method is 'replace'. In the 'replace' method, the attitude for short exposure images are replaced with the attitude from the closest (in time) long exposure image to them from the images list. In order to use the ‘replace’ method every turned on short exposure image must be preceded or followed by a long exposure image.

If we are successful at updating a short exposure image using this method, then the OpNavImage.pointing_post_fit flag is updated to be True for the corresponding image. Otherwise it is set to False.

Note

The attitude is only updated for “short” exposure images that are turned on (it does not matter if the long exposure images are turned on or off).

Parameters:
  • method (str | AttitudeUpdateMethods) – The method to use to update the attitude for the turned on short exposure images

  • max_delta (timedelta) – The maximum time difference allowed between 2 images for them to be paired as a timedelta object