本文整理汇总了C++中ControlPoint::HasAprioriCoordinates方法的典型用法代码示例。如果您正苦于以下问题:C++ ControlPoint::HasAprioriCoordinates方法的具体用法?C++ ControlPoint::HasAprioriCoordinates怎么用?C++ ControlPoint::HasAprioriCoordinates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControlPoint
的用法示例。
在下文中一共展示了ControlPoint::HasAprioriCoordinates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setApriori
/**
* Slot to set apriori on selected Points from Navigator list box
*
* @author 2011-03-24 Tracie Sucharski
*
* @internal
* @todo This method should be temporary until the control point editor
* comes online. If this stick around, needs to be re-disigned-
* put in a separate class??
*
* @history 2011-04-04 Tracie Sucharski - Grey out userEntered if more than
* a single point is selected. Grey out lat,lon,radius
* edits if UserEntered is not selected.
* @history 2011-04-13 Tracie Sucharski - If single point selected, fill in
* LineEdit's with current controlPoint values.
* @history 2011-04-19 Tracie Sucharski - Redesign using modeless dialog.
* @history 2011-04-26 Tracie Sucharski - Move from QnetNavTool to
* QnetSetAprioriDialog.
*/
void QnetSetAprioriDialog::setApriori() {
double latSigma = Null;
double lat = Null;
double lonSigma = Null;
double lon = Null;
double radiusSigma = Null;
double radius = Null;
if (latitudeConstraintsGroupBox->isChecked()) {
if (userEnteredRadioButton->isChecked() && aprioriLatEdit->text() != "") {
lat = aprioriLatEdit->text().toDouble();
}
if (latSigmaEdit->text() != "") {
latSigma = latSigmaEdit->text().toDouble();
}
}
if (longitudeConstraintsGroupBox->isChecked()) {
if (userEnteredRadioButton->isChecked() && aprioriLonEdit->text() != "") {
lon = aprioriLonEdit->text().toDouble();
}
if (lonSigmaEdit->text() != "") {
lonSigma = lonSigmaEdit->text().toDouble();
}
}
if (radiusConstraintsGroupBox->isChecked()) {
if (userEnteredRadioButton->isChecked() && aprioriRadiusEdit->text() != "") {
radius = aprioriRadiusEdit->text().toDouble();
}
if (radiusSigmaEdit->text() != "") {
radiusSigma = radiusSigmaEdit->text().toDouble();
}
}
// If the SetAprioriPoint group box selected, set aprioriSurfacePoint for
// those points not editLocked.
for (int i = 0; i < m_points.size(); i++) {
QString id = m_points.at(i)->text();
ControlPoint *pt = m_qnetTool->controlNet()->GetPoint(id);
if (pt->IsEditLocked()) continue;
if (!pt->HasAprioriCoordinates()) {
QString msg = "Point [" + id + "] does not have an Apriori coordinate. "
"Make sure to save the ground source measurement then the Point before "
"setting the sigmas. The sigmas for this point will not be set.";
QMessageBox::warning((QWidget *)parent(), "Warning", msg);
continue;
}
if (pointSourceGroupBox->isChecked()) {
if (referenceMeasureRadioButton->isChecked()) {
ControlMeasure *m = pt->GetRefMeasure();
// Find camera from network camera list
int camIndex = m_qnetTool->serialNumberList()->SerialNumberIndex(
m->GetCubeSerialNumber());
Camera *cam = m_qnetTool->controlNet()->Camera(camIndex);
cam->SetImage(m->GetSample(),m->GetLine());
pt->SetAprioriSurfacePoint(cam->GetSurfacePoint());
pt->SetAprioriSurfacePointSource(ControlPoint::SurfacePointSource::Reference);
}
else if (averageMeasuresRadioButton->isChecked()) {
pt->ComputeApriori();
// Do not need to set AprioriSurfacePointSource or AprioriRadiusSource,
// ComputeApriori does this for us.
}
else if (userEnteredRadioButton->isChecked()) {
pt->SetAprioriSurfacePoint(SurfacePoint(
Latitude(lat, Angle::Degrees),
Longitude(lon, Angle::Degrees),
Distance(radius,Distance::Meters)));
pt->SetAprioriSurfacePointSource(ControlPoint::SurfacePointSource::User);
pt->SetAprioriRadiusSource(ControlPoint::RadiusSource::User);
}
}
try {
// Read Surface point from the control point and set the sigmas,
//.........这里部分代码省略.........