99 QString observationNumber,
100 QString instrumentId,
104 bool addToExisting =
false;
106 if (bundleSettings->solveObservationMode() &&
110 addToExisting =
true;
113 bool isIsisObservation = bundleImage->camera()->GetCameraType() !=
Camera::Csm;
118 bundleObservation->append(bundleImage);
120 bundleImage->setParentObservation(bundleObservation);
131 if (isIsisObservation) {
135 bundleSettings->bundleTargetBody()));
141 bundleSettings->bundleTargetBody()));
144 if (!bundleObservation) {
145 QString message =
"Unable to allocate new BundleObservation ";
146 message +=
"for " + bundleImage->fileName();
150 bundleImage->setParentObservation(bundleObservation);
155 if ( bundleSettings->numberSolveSettings() == 1) {
156 solveSettings = bundleSettings->observationSolveSettings(0);
161 solveSettings = bundleSettings->observationSolveSettings(observationNumber);
164 bundleObservation->setSolveSettings(solveSettings);
166 bundleObservation->setIndex(size());
168 bundleImage->setParentObservation(bundleObservation);
170 append(bundleObservation);
180 if (bundleObservation->numberParameters() == 0) {
190 if (isIsisObservation) {
191 QSharedPointer<IsisBundleObservation> isisObs = qSharedPointerDynamicCast<IsisBundleObservation>(bundleObservation);
192 isisObs->initializeExteriorOrientation();
193 if (bundleSettings->solveTargetBody()) {
194 isisObs->initializeBodyRotation();
197 return bundleObservation;
BundleObservationQsp addNew(BundleImageQsp image, QString observationNumber, QString instrumentId, BundleSettingsQsp bundleSettings)
Adds a new BundleObservation to this vector or fetches an existing BundleObservation if this vector a...