Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixed a bug introduced in #4537 that caused observation mode in jigsaw to fail for framing images.
The IsisBundleObservation::initializeExteriorOrientation function was only being called within the else block of BundleObservationVector::addNew. This caused the orientation polynomials to only be setup properly when new observations are created. If an image is added to an existing observation, its orientation polynomials are not initialized. This PR moves the call outside of the if/else block so that the orientation polynomials are always initialized for ISIS observations.
Related Issue
Fixes #4686
Motivation and Context
The changes to add CSM support moved a call to initialize the position and pointing polynomial functions in jigsaw. This resulted in the initialization only happening for the first image in each observation when solving in observation mode. This caused an error when the parameter updates were copied from the first image to subsequent images in the each observation.
How Has This Been Tested?
I tested with a TGO CaSSIS data set. I generated a simple network using seedgrid and then added the images to it. This resulted in a network that is "perfect" and should bundle with extremely small corrections. With the correction, the network now bundles. Without the correction, the network fails at the end of the first iteration.
Screenshots (if appropriate):
Types of changes
Checklist:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: