diff --git a/isis/src/control/objs/ControlPoint/ControlPoint.cpp b/isis/src/control/objs/ControlPoint/ControlPoint.cpp index babafbe4e2a8610682040689065edff5b99fa239..8a7df0f4448c3e04399c5c38c2a761a1b6da71f9 100644 --- a/isis/src/control/objs/ControlPoint/ControlPoint.cpp +++ b/isis/src/control/objs/ControlPoint/ControlPoint.cpp @@ -989,156 +989,6 @@ namespace Isis { } - /** - * This method computes the apriori lat/lon for a point. It computes this - * by determining the average lat/lon of all the measures. Note that this - * does not change ignored, or fixed points. Also, it does not - * use unmeasured or ignored measures when computing the lat/lon. - * @internal - * @history 2008-06-18 Tracie Sucharski/Jeannie Walldren, - * Changed error messages for - * Held/Ground points. - * @history 2009-10-13 Jeannie Walldren - Added detail to - * error message. - * @history 2010-11-29 Tracie Sucharski - Remove call to ControlMeasure:: - * SetMeasuredEphemerisTime, the values were - * never used. so these methods were removed - * from ControlMeasure and the call was removed - * here. - * @history 2010-12-02 Debbie A. Cook - Added units to SetRectangular - * calls since default is meters and units - * are km. - * @history 2011-03-17 Debbie A. Cook - Added initialization of - * adjustedSurfacePoint to aprioriSurfacePoint - * and set test for empty covariance matrix - * to use 0. instead of nulls. - * @history 2011-03-24 Debbie A. Cook - Removed IsMeasured check since it - * was really checking for Candidate measures. - * @history 2011-07-12 Debbie A. Cook - Removed editLock test. Users agreed - * editLock was only for fixed and constrained - * points, which are already left unchanged by - * ComputeApriori. If a free point is editLocked - * the editLock will be ignored by this method. - * @history 2017-04-25 Debbie A. Cook - change constraint status calls - * to use generic coordinate names (Coord1, Coord2, - * and Coord3). - * - * @return Status Success or PointLocked - */ -/* - ControlPoint::Status ControlPoint::ComputeApriori() { - PointModified(); - // Don't goof with fixed points. The lat/lon is what it is ... if - // it exists! - // 2013-11-12 KLE I think this check should include points with any - // number of constrained coordinates??? I agree DAC. *** TODO *** - if (GetType() == Fixed) { - if (!aprioriSurfacePoint.Valid()) { - QString msg = "ControlPoint [" + GetId() + "] is a fixed point "; - msg += "and requires an apriori x/y/z"; - throw IException(IException::User, msg, _FILEINFO_); - } - // Don't return until after the FocalPlaneMeasures have been set - // return; - } - double xB = 0.0; - double yB = 0.0; - double zB = 0.0; - double r2B = 0.0; - int goodMeasures = 0; - // Loop for each measure and compute the sum of the lat/lon/radii - for (int j = 0; j < cubeSerials->size(); j++) { - ControlMeasure *m = GetMeasure(j); - // The comment code was really checking for candidate measures - // Commented out 2011-03-24 by DAC -// if (!m->IsMeasured()) { -// // TODO: How do we deal with unmeasured measures -// } -// else if (m->IsIgnored()) { - if (m->IsIgnored()) { - // TODO: How do we deal with ignored measures - } - else { - Camera *cam = m->Camera(); - if (cam == NULL) { - QString msg = "The Camera must be set prior to calculating apriori"; - throw IException(IException::Programmer, msg, _FILEINFO_); - } - if (cam->SetImage(m->GetSample(), m->GetLine())) { - goodMeasures++; - double pB[3]; - cam->Coordinate(pB); - xB += pB[0]; - yB += pB[1]; - zB += pB[2]; - r2B += pB[0]*pB[0] + pB[1]*pB[1] + pB[2]*pB[2]; - double x = cam->DistortionMap()->UndistortedFocalPlaneX(); - double y = cam->DistortionMap()->UndistortedFocalPlaneY(); - m->SetFocalPlaneMeasured(x, y); - } - else { - // JAA: Don't stop if we know the lat/lon. The SetImage may fail - // but the FocalPlane measures have been set - if (GetType() == Fixed) { - continue; - } - // TODO: What do we do -// QString msg = "Cannot compute lat/lon/radius (x/y/z) for " -// "ControlPoint [" + GetId() + "], measure [" + -// m->GetCubeSerialNumber() + "]"; -// throw IException(IException::User, msg, _FILEINFO_); - // m->SetFocalPlaneMeasured(?,?); - } - } - } - // Don't update the apriori x/y/z for fixed points TODO This needs a closer look - if (GetType() == Free && !id.contains("Lidar")) { // TODO: temporary kluge for lidar points - // point can be tagged as "Free" but still have constrained coordinates - // if tagged "Free" we want to compute approximate a priori coordinates - } - // if point is "Fixed" or otherwise constrained in one, two, or all three - // coordinates, then we use the a priori surface point coordinates that - // have been given via other means (e.g. through qnet or cneteditor) - // 2013-11-12 KLE Is the next check better as "if Fixed or if # of - // constrained coordinates > 1" ??? - else if (GetType() == Fixed - || NumberOfConstrainedCoordinates() == 3 - || IsCoord1Constrained() - || IsCoord2Constrained() - || IsCoord3Constrained() - || id.contains("Lidar")) { // TODO: temporary kluge for lidar points - // Initialize the adjusted x/y/z to the a priori coordinates - adjustedSurfacePoint = aprioriSurfacePoint; - return Success; - } - // Beyond this point, we assume the point is free ***TODO*** confirm this - // Did we have any measures? - if (goodMeasures == 0) { - QString msg = "ControlPoint [" + GetId() + "] has no measures which " - "project to lat/lon/radius (x/y/z)"; - throw IException(IException::User, msg, _FILEINFO_); - } - // Compute the averages if all coordinates are free - //if (NumberOfConstrainedCoordinates() == 0) { - if (GetType() == Free || NumberOfConstrainedCoordinates() == 0) { - double avgX = xB / goodMeasures; - double avgY = yB / goodMeasures; - double avgZ = zB / goodMeasures; - double avgR2 = r2B / goodMeasures; - double scale = sqrt(avgR2/(avgX*avgX+avgY*avgY+avgZ*avgZ)); - aprioriSurfacePoint.SetRectangular( - Displacement((avgX*scale), Displacement::Kilometers), - Displacement((avgY*scale), Displacement::Kilometers), - Displacement((avgZ*scale), Displacement::Kilometers)); - } - adjustedSurfacePoint = aprioriSurfacePoint; - SetAprioriSurfacePointSource(SurfacePointSource::AverageOfMeasures); - SetAprioriRadiusSource(RadiusSource::AverageOfMeasures); - return Success; - } -*/ - - /** * This method computes the BundleAdjust residuals for a point. * *** Warning: Only BundleAdjust and its applications should be