CircularSurvey.cc 19 KB
Newer Older
1
#include "CircularSurvey.h"
2
#include "RoutingThread.h"
3
// QGC
4 5
#include "JsonHelper.h"
#include "QGCApplication.h"
6
#include "QGCLoggingCategory.h"
7
// Wima
8
#include "snake.h"
9
#define CLIPPER_SCALE 1000000
10 11 12
#include "clipper/clipper.hpp"

#include "Geometry/GenericCircle.h"
13 14
#include "Snake/SnakeTile.h"

15
// boost
16 17 18
#include <boost/units/io.hpp>
#include <boost/units/systems/si.hpp>

Valentin Platzgummer's avatar
Valentin Platzgummer committed
19 20 21
#include "CircularGenerator.h"
#include "LinearGenerator.h"

22 23
// ToDo: Check what happened to _transectsDirty

24 25
QGC_LOGGING_CATEGORY(CircularSurveyLog, "CircularSurveyLog")

26 27 28 29 30
template <typename T>
constexpr typename std::underlying_type<T>::type integral(T value) {
  return static_cast<typename std::underlying_type<T>::type>(value);
}

31 32
const char *CircularSurvey::settingsGroup = "CircularSurvey";
const char *CircularSurvey::CircularSurveyName = "CircularSurvey";
33
const char *CircularSurvey::variantName = "Variant";
34

35
CircularSurvey::CircularSurvey(PlanMasterController *masterController, bool flyView,
36
                               const QString &kmlOrShpFile, QObject *parent)
37
    : TransectStyleComplexItem(masterController, flyView, settingsGroup, parent),
Valentin Platzgummer's avatar
Valentin Platzgummer committed
38
      _state(STATE::IDLE),
39 40
      _metaDataMap(FactMetaData::createMapFromJsonFile(
          QStringLiteral(":/json/CircularSurvey.SettingsGroup.json"), this)),
41
      _variant(settingsGroup, _metaDataMap[variantName]),
42
      _pAreaData(std::make_shared<WimaPlanData>()),
Valentin Platzgummer's avatar
Valentin Platzgummer committed
43 44
      _pWorker(std::make_unique<RoutingThread>()) {

45 46 47
  Q_UNUSED(kmlOrShpFile)
  _editorQml = "qrc:/qml/CircularSurveyItemEditor.qml";

48
  // Connect facts.
49 50
  connect(&this->_variant, &Fact::rawValueChanged, this,
          &CircularSurvey::_changeVariant);
51

52
  // Connect worker.
53
  connect(this->_pWorker.get(), &RoutingThread::result, this,
54
          &CircularSurvey::_setTransects);
55
  connect(this->_pWorker.get(), &RoutingThread::calculatingChanged, this,
56
          &CircularSurvey::calculatingChanged);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
57 58

  // Register Generators.
59
  auto lg = std::make_shared<routing::LinearGenerator>(this->_pAreaData);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
60
  registerGenerator(lg->name(), lg);
61 62
  auto cg = std::make_shared<routing::CircularGenerator>(this->_pAreaData);
  registerGenerator(cg->name(), cg);
63 64
}

65 66 67
CircularSurvey::~CircularSurvey() {}

void CircularSurvey::reverse() {
68
  this->_state = STATE::REVERSE;
69 70 71
  this->_rebuildTransects();
}

Valentin Platzgummer's avatar
Valentin Platzgummer committed
72
void CircularSurvey::setPlanData(const WimaPlanData &d) {
73
  *this->_pAreaData = d;
74 75
}

Valentin Platzgummer's avatar
Valentin Platzgummer committed
76 77 78 79 80 81
const WimaPlanData &CircularSurvey::planData() const {
  return *this->_pAreaData;
}

WimaPlanData &CircularSurvey::planData() { return *this->_pAreaData; }

82
QStringList CircularSurvey::variantNames() const { return _variantNames; }
83

84 85
bool CircularSurvey::load(const QJsonObject &complexObject, int sequenceNumber,
                          QString &errorString) {
86 87
  // We need to pull version first to determine what validation/conversion
  // needs to be performed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
  QList<JsonHelper::KeyValidateInfo> versionKeyInfoList = {
      {JsonHelper::jsonVersionKey, QJsonValue::Double, true},
  };
  if (!JsonHelper::validateKeys(complexObject, versionKeyInfoList,
                                errorString)) {
    return false;
  }

  int version = complexObject[JsonHelper::jsonVersionKey].toInt();
  if (version != 1) {
    errorString = tr("Survey items do not support version %1").arg(version);
    return false;
  }

  QList<JsonHelper::KeyValidateInfo> keyInfoList = {
      {VisualMissionItem::jsonTypeKey, QJsonValue::String, true},
      {ComplexMissionItem::jsonComplexItemTypeKey, QJsonValue::String, true},
105
      {variantName, QJsonValue::Double, false},
106 107 108 109 110 111 112 113 114 115 116
  };

  if (!JsonHelper::validateKeys(complexObject, keyInfoList, errorString)) {
    return false;
  }

  QString itemType = complexObject[VisualMissionItem::jsonTypeKey].toString();
  QString complexType =
      complexObject[ComplexMissionItem::jsonComplexItemTypeKey].toString();
  if (itemType != VisualMissionItem::jsonTypeComplexItemValue ||
      complexType != CircularSurveyName) {
117 118 119 120 121
    errorString = tr("%1 does not support loading this complex mission item "
                     "type: %2:%3")
                      .arg(qgcApp()->applicationName())
                      .arg(itemType)
                      .arg(complexType);
122 123 124 125 126 127 128 129 130 131 132 133 134
    return false;
  }

  _ignoreRecalc = true;

  setSequenceNumber(sequenceNumber);

  if (!_surveyAreaPolygon.loadFromJson(complexObject, true /* required */,
                                       errorString)) {
    _surveyAreaPolygon.clear();
    return false;
  }

135
  if (!load(complexObject, sequenceNumber, errorString)) {
136 137 138 139
    _ignoreRecalc = false;
    return false;
  }

140
  _variant.setRawValue(complexObject[variantName].toInt());
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165

  _ignoreRecalc = false;

  if (_cameraShots == 0) {
    // Shot count was possibly not available from plan file
    _recalcCameraShots();
  }

  return true;
}

QString CircularSurvey::mapVisualQML() const {
  return QStringLiteral("CircularSurveyMapVisual.qml");
}

void CircularSurvey::save(QJsonArray &planItems) {
  QJsonObject saveObject;

  _save(saveObject);

  saveObject[JsonHelper::jsonVersionKey] = 1;
  saveObject[VisualMissionItem::jsonTypeKey] =
      VisualMissionItem::jsonTypeComplexItemValue;
  saveObject[ComplexMissionItem::jsonComplexItemTypeKey] = CircularSurveyName;

166
  saveObject[variantName] = double(_variant.rawValue().toUInt());
167 168 169 170 171 172 173 174 175

  // Polygon shape
  _surveyAreaPolygon.saveToJson(saveObject);

  planItems.append(saveObject);
}

bool CircularSurvey::specifiesCoordinate() const { return true; }

Valentin Platzgummer's avatar
Valentin Platzgummer committed
176 177 178 179
bool CircularSurvey::_switchToGenerator(
    const CircularSurvey::PtrGenerator &newG) {
  if (this->_pGenerator != newG) {
    if (this->_pGenerator != nullptr) {
180 181 182
      disconnect(this->_pGenerator.get(),
                 &routing::GeneratorBase::generatorChanged, this,
                 &CircularSurvey::_rebuildTransects);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
183 184 185
    }

    this->_pGenerator = newG;
186 187 188
    connect(this->_pGenerator.get(), &routing::GeneratorBase::generatorChanged,
            this, &CircularSurvey::_rebuildTransects);
    emit generatorChanged();
Valentin Platzgummer's avatar
Valentin Platzgummer committed
189 190 191 192 193 194 195 196 197 198

    this->_state = STATE::IDLE;
    _rebuildTransects();

    return true;
  } else {
    return false;
  }
}

199 200 201
void CircularSurvey::_changeVariant() {
  this->_state = STATE::VARIANT_CHANGE;
  this->_rebuildTransects();
202 203
}

204 205 206
void CircularSurvey::_updateWorker() {
  // Reset data.
  this->_transects.clear();
207
  this->_variantVector.clear();
208 209 210
  this->_variantNames.clear();
  emit variantNamesChanged();

211
  if (this->_pAreaData->isValid()) {
Valentin Platzgummer's avatar
Valentin Platzgummer committed
212 213

    // Prepare data.
214 215 216
    auto origin = this->_pAreaData->origin();
    origin.setAltitude(0);
    if (!origin.isValid()) {
217
      qCDebug(CircularSurveyLog)
218 219 220 221
          << "_updateWorker(): origin invalid." << origin;
      return;
    }

Valentin Platzgummer's avatar
Valentin Platzgummer committed
222
    // Convert safe area.
223
    auto geoSafeArea = this->_pAreaData->joinedArea().coordinateList();
Valentin Platzgummer's avatar
Valentin Platzgummer committed
224
    if (!(geoSafeArea.size() >= 3)) {
225
      qCDebug(CircularSurveyLog)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
226 227 228 229 230 231 232
          << "_updateWorker(): safe area invalid." << geoSafeArea;
      return;
    }
    for (auto &v : geoSafeArea) {
      if (v.isValid()) {
        v.setAltitude(0);
      } else {
233
        qCDebug(CircularSurveyLog)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
234 235 236
            << "_updateWorker(): safe area contains invalid coordinate."
            << geoSafeArea;
        return;
237 238 239
      }
    }

Valentin Platzgummer's avatar
Valentin Platzgummer committed
240 241 242 243 244 245 246
    // Routing par.
    RoutingParameter par;
    par.numSolutions = 5;
    auto &safeAreaENU = par.safeArea;
    snake::areaToEnu(origin, geoSafeArea, safeAreaENU);

    // Create generator.
247 248 249 250 251 252
    if (this->_pGenerator) {
      routing::GeneratorBase::Generator g; // Transect generator.
      if (this->_pGenerator->get(g)) {
        // Start/Restart routing worker.
        this->_pWorker->route(par, g);
      } else {
253
        qCDebug(CircularSurveyLog)
254 255
            << "_updateWorker(): generator creation failed.";
      }
256
    } else {
257
      qCDebug(CircularSurveyLog)
258 259 260
          << "_updateWorker(): pGenerator == nullptr, number of registered "
             "generators: "
          << this->_generatorList.size();
261 262
    }
  } else {
263
    qCDebug(CircularSurveyLog) << "_updateWorker(): plan data invalid.";
264
  }
265 266
}

Valentin Platzgummer's avatar
Valentin Platzgummer committed
267
void CircularSurvey::_changeVariantWorker() {
268
  auto variant = this->_variant.rawValue().toUInt();
269 270 271 272

  // Find old variant and run. Old run corresponts with empty list.
  std::size_t old_variant = std::numeric_limits<std::size_t>::max();
  for (std::size_t i = 0; i < std::size_t(this->_variantVector.size()); ++i) {
273 274 275 276
    const auto &variantCoordinates = this->_variantVector.at(i);
    if (variantCoordinates.isEmpty()) {
      old_variant = i;
      break;
277 278
    }
  }
279

280
  // Swap route.
281
  if (variant != old_variant) {
282
    // Swap in new variant.
283
    if (variant < std::size_t(this->_variantVector.size())) {
284 285 286
      if (old_variant != std::numeric_limits<std::size_t>::max()) {
        // this->_transects containes a route, swap it back to
        // this->_solutionVector
287 288
        auto &oldVariantCoordinates = this->_variantVector[old_variant];
        oldVariantCoordinates.swap(this->_transects);
289
      }
290 291
      auto &newVariantCoordinates = this->_variantVector[variant];
      this->_transects.swap(newVariantCoordinates);
292 293

    } else { // error
294
      qCDebug(CircularSurveyLog)
295
          << "Variant out of bounds (variant =" << variant << ").";
296
      qCDebug(CircularSurveyLog) << "Resetting variant to zero.";
297 298 299

      disconnect(&this->_variant, &Fact::rawValueChanged, this,
                 &CircularSurvey::_changeVariant);
300
      this->_variant.setCookedValue(QVariant(0));
301 302
      connect(&this->_variant, &Fact::rawValueChanged, this,
              &CircularSurvey::_changeVariant);
303 304

      if (this->_variantVector.size() > 0) {
Valentin Platzgummer's avatar
Valentin Platzgummer committed
305
        this->_changeVariantWorker();
306 307
      }
    }
308 309
  }
}
310

311 312 313
void CircularSurvey::_reverseWorker() {
  if (this->_transects.size() > 0) {
    auto &t = this->_transects.front();
Valentin Platzgummer's avatar
Valentin Platzgummer committed
314
    std::reverse(t.begin(), t.end());
315
  }
316 317
}

318 319 320 321 322 323 324 325 326 327
double CircularSurvey::timeBetweenShots() { return 1; }

QString CircularSurvey::commandDescription() const {
  return tr("Circular Survey");
}

QString CircularSurvey::commandName() const { return tr("Circular Survey"); }

QString CircularSurvey::abbreviation() const { return tr("C.S."); }

328 329 330 331 332 333 334 335 336 337 338 339
TransectStyleComplexItem::ReadyForSaveState
CircularSurvey::readyForSaveState() const {
  if (TransectStyleComplexItem::readyForSaveState() ==
      TransectStyleComplexItem::ReadyForSaveState::ReadyForSave) {
    if (this->_state == STATE::IDLE) {
      return ReadyForSaveState::ReadyForSave;
    } else {
      return ReadyForSaveState::NotReadyForSaveData;
    }
  } else {
    return TransectStyleComplexItem::readyForSaveState();
  }
340 341 342 343
}

double CircularSurvey::additionalTimeDelay() const { return 0; }

344 345
bool CircularSurvey::registerGenerator(
    const QString &name, std::shared_ptr<routing::GeneratorBase> g) {
Valentin Platzgummer's avatar
Valentin Platzgummer committed
346
  if (name.isEmpty()) {
347
    qCDebug(CircularSurveyLog) << "registerGenerator(): empty name string.";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
348 349 350
    return false;
  }

351
  if (!g) {
352
    qCDebug(CircularSurveyLog) << "registerGenerator(): empty generator.";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
353 354 355 356
    return false;
  }

  if (this->_generatorNameList.contains(name)) {
357 358
    qCDebug(CircularSurveyLog) << "registerGenerator(): generator "
                                  "already registered.";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
359 360 361 362 363
    return false;
  } else {
    this->_generatorNameList.push_back(name);
    this->_generatorList.push_back(g);
    if (this->_generatorList.size() == 1) {
364
      _switchToGenerator(g);
Valentin Platzgummer's avatar
Valentin Platzgummer committed
365 366 367 368 369 370 371 372 373 374 375 376
    }

    emit generatorNameListChanged();
    return true;
  }
}

bool CircularSurvey::unregisterGenerator(const QString &name) {
  auto index = this->_generatorNameList.indexOf(name);
  if (index >= 0) {
    // Is this the current generator?
    const auto &g = this->_generatorList.at(index);
377
    if (g == this->_pGenerator) {
Valentin Platzgummer's avatar
Valentin Platzgummer committed
378 379 380 381
      if (index > 0) {
        _switchToGenerator(this->_generatorList.at(index - 1));
      } else {
        _switchToGenerator(nullptr);
382
        qCDebug(CircularSurveyLog)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
383 384 385 386 387 388 389 390 391 392
            << "unregisterGenerator(): last generator unregistered.";
      }
    }

    this->_generatorNameList.removeAt(index);
    this->_generatorList.removeAt(index);

    emit generatorNameListChanged();
    return true;
  } else {
393
    qCDebug(CircularSurveyLog)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
394 395 396 397 398 399 400 401 402
        << "unregisterGenerator(): generator " << name << " not registered.";
    return false;
  }
}

bool CircularSurvey::unregisterGenerator(int index) {
  if (index > 0 && index < this->_generatorNameList.size()) {
    return unregisterGenerator(this->_generatorNameList.at(index));
  } else {
403 404 405 406
    qCDebug(CircularSurveyLog) << "unregisterGenerator(): index (" << index
                               << ") out"
                                  "of bounds ( "
                               << this->_generatorList.size() << " ).";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
407 408 409 410 411 412 413 414 415 416
    return false;
  }
}

bool CircularSurvey::switchToGenerator(const QString &name) {
  auto index = this->_generatorNameList.indexOf(name);
  if (index >= 0) {
    _switchToGenerator(this->_generatorList.at(index));
    return true;
  } else {
417
    qCDebug(CircularSurveyLog)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
418 419 420 421 422 423 424 425 426 427
        << "switchToGenerator(): generator " << name << " not registered.";
    return false;
  }
}

bool CircularSurvey::switchToGenerator(int index) {
  if (index >= 0) {
    _switchToGenerator(this->_generatorList.at(index));
    return true;
  } else {
428 429 430 431
    qCDebug(CircularSurveyLog) << "unregisterGenerator(): index (" << index
                               << ") out"
                                  "of bounds ( "
                               << this->_generatorNameList.size() << " ).";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
432 433 434 435
    return false;
  }
}

436
QStringList CircularSurvey::generatorNameList() {
Valentin Platzgummer's avatar
Valentin Platzgummer committed
437 438 439
  return this->_generatorNameList;
}

440 441 442 443 444 445 446 447
routing::GeneratorBase *CircularSurvey::generator() {
  return _pGenerator.get();
}

int CircularSurvey::generatorIndex() {
  return this->_generatorList.indexOf(this->_pGenerator);
}

448 449 450 451
void CircularSurvey::_rebuildTransectsPhase1(void) {
  auto start = std::chrono::high_resolution_clock::now();

  switch (this->_state) {
452 453
  case STATE::SKIPP:
    qCDebug(CircularSurveyLog) << "rebuildTransectsPhase1: skipp.";
454 455
    break;
  case STATE::VARIANT_CHANGE:
456
    qCDebug(CircularSurveyLog) << "rebuildTransectsPhase1: variant change.";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
457
    this->_changeVariantWorker();
458 459
    break;
  case STATE::RUN_CHANGE:
460
    qCDebug(CircularSurveyLog) << "rebuildTransectsPhase1: run change.";
Valentin Platzgummer's avatar
Valentin Platzgummer committed
461
    this->_changeVariantWorker();
462 463
    break;
  case STATE::REVERSE:
464
    qCDebug(CircularSurveyLog) << "rebuildTransectsPhase1: reverse.";
465 466
    this->_reverseWorker();
    break;
Valentin Platzgummer's avatar
Valentin Platzgummer committed
467
  case STATE::IDLE:
468
    qCDebug(CircularSurveyLog) << "rebuildTransectsPhase1: update.";
469 470
    this->_updateWorker();
    break;
471
  }
Valentin Platzgummer's avatar
Valentin Platzgummer committed
472
  this->_state = STATE::IDLE;
473

474
  qCDebug(CircularSurveyLog)
Valentin Platzgummer's avatar
Valentin Platzgummer committed
475
      << "rebuildTransectsPhase1(): "
476 477 478 479
      << std::chrono::duration_cast<std::chrono::milliseconds>(
             std::chrono::high_resolution_clock::now() - start)
             .count()
      << " ms";
480 481 482 483 484
}

// no cameraShots in Circular Survey, add if desired
void CircularSurvey::_recalcCameraShots() { _cameraShots = 0; }

485
void CircularSurvey::_setTransects(CircularSurvey::PtrRoutingData pRoute) {
486
  // Store solutions.
487 488
  auto ori = this->_pAreaData->origin();
  ori.setAltitude(0);
489 490 491
  const auto &transectsENU = pRoute->transects;
  QVector<Variant> variantVector;
  const auto nSolutions = pRoute->solutionVector.size();
492

493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
  for (std::size_t j = 0; j < nSolutions; ++j) {
    Variant var{QList<CoordInfo_t>()};
    const auto &solution = pRoute->solutionVector.at(j);
    if (solution.size() > 0) {
      const auto &route = solution.at(0);
      const auto &path = route.path;
      const auto &info = route.info;
      if (info.size() > 1) {
        // Find index of first waypoint.
        std::size_t idxFirst = 0;
        const auto &infoFirst = info.at(1);
        const auto &firstTransect = transectsENU[infoFirst.index];
        if (firstTransect.size() > 0) {
          const auto &firstWaypoint =
              infoFirst.reversed ? firstTransect.back() : firstTransect.front();
          double th = 0.01;
          for (std::size_t i = 0; i < path.size(); ++i) {
            auto dist = bg::distance(path[i], firstWaypoint);
            if (dist < th) {
              idxFirst = i;
              break;
            }
515 516
          }

517 518 519 520 521 522 523 524 525 526 527 528 529
          // Find index of last waypoint.
          std::size_t idxLast = path.size() - 1;
          const auto &infoLast = info.at(info.size() - 2);
          const auto &lastTransect = transectsENU[infoLast.index];
          if (lastTransect.size() > 0) {
            const auto &lastWaypoint =
                infoLast.reversed ? lastTransect.front() : lastTransect.back();
            for (long i = path.size() - 1; i >= 0; --i) {
              auto dist = bg::distance(path[i], lastWaypoint);
              if (dist < th) {
                idxLast = i;
                break;
              }
530
            }
531 532 533 534 535 536 537 538

            // Convert to geo coordinates.
            auto &list = var.front();
            for (std::size_t i = idxFirst; i <= idxLast; ++i) {
              auto &vertex = path[i];
              QGeoCoordinate c;
              snake::fromENU(ori, vertex, c);
              list.append(CoordInfo_t{c, CoordTypeInterior});
539
            }
540

541
          } else {
542
            qCDebug(CircularSurveyLog)
543 544
                << "_setTransects(): lastTransect.size() == 0";
          }
545
        } else {
546
          qCDebug(CircularSurveyLog)
547
              << "_setTransects(): firstTransect.size() == 0";
548
        }
549
      } else {
550
        qCDebug(CircularSurveyLog)
551
            << "_setTransects(): transectsInfo.size() <= 1";
552
      }
553
    } else {
554
      qCDebug(CircularSurveyLog) << "_setTransects(): solution.size() == 0";
555
    }
556

557 558
    if (var.size() > 0 && var.front().size() > 0) {
      variantVector.push_back(std::move(var));
559 560
    }
  }
561

562 563 564 565
  // Assign routes if no error occured.
  if (variantVector.size() > 0) {
    // Swap first route to _transects.
    this->_variantVector.swap(variantVector);
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590

    // If the transects are getting rebuilt then any previously loaded
    // mission items are now invalid.
    if (_loadedMissionItemsParent) {
      _loadedMissionItems.clear();
      _loadedMissionItemsParent->deleteLater();
      _loadedMissionItemsParent = nullptr;
    }

    // Add route variant names.
    this->_variantNames.clear();
    for (std::size_t i = 1; i <= std::size_t(this->_variantVector.size());
         ++i) {
      this->_variantNames.append(QString::number(i));
    }
    emit variantNamesChanged();

    disconnect(&this->_variant, &Fact::rawValueChanged, this,
               &CircularSurvey::_changeVariant);
    this->_variant.setCookedValue(QVariant(0));
    connect(&this->_variant, &Fact::rawValueChanged, this,
            &CircularSurvey::_changeVariant);
    this->_changeVariantWorker();

    this->_state = STATE::SKIPP;
591 592
    this->_rebuildTransects();
  } else {
593 594
    qCDebug(CircularSurveyLog)
        << "_setTransects(): failed, variantVector empty.";
595 596 597
    this->_state = STATE::IDLE;
  }
}
598

599
Fact *CircularSurvey::variant() { return &_variant; }
600

601 602
bool CircularSurvey::calculating() const {
  return this->_pWorker->calculating();
603
}
604

605 606 607 608
/*!
    \class CircularSurveyComplexItem
    \inmodule Wima

609 610
    \brief The \c CircularSurveyComplexItem class provides a survey mission
   item with circular transects around a point of interest.
611

612 613 614 615
    CircularSurveyComplexItem class provides a survey mission item with
   circular transects around a point of interest. Within the \c Wima module
   it's used to scan a defined area with constant angle (circular transects)
   to the base station (point of interest).
616 617 618

    \sa WimaArea
*/