MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / setCurrentOrbit

Method setCurrentOrbit

Components/FrequencyCorrectionDialog.cpp:547–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void
548FrequencyCorrectionDialog::setCurrentOrbit(const orbit_t *orbit)
549{
550 if (this->haveOrbit) {
551 if (&this->currentOrbit != orbit) {
552 orbit_finalize(&this->currentOrbit);
553 this->currentOrbit.name = nullptr;
554 }
555 sgdp4_prediction_finalize(&this->prediction);
556 this->haveOrbit = false;
557 this->haveALOS = false;
558 }
559
560 if (orbit != nullptr) {
561 if (&this->currentOrbit != orbit) {
562 this->currentOrbit = *orbit;
563 this->currentOrbit.name = orbit->name == nullptr
564 ? nullptr
565 : strdup(orbit->name);
566 }
567
568 if (this->haveQth
569 && sgdp4_prediction_init(
570 &this->prediction,
571 &this->currentOrbit,
572 &this->rxSite)) {
573 this->haveOrbit = true;
574 } else {
575 orbit_finalize(&this->currentOrbit);
576 this->currentOrbit.name = nullptr;
577 }
578 }
579
580 this->updatePrediction();
581}
582
583void
584FrequencyCorrectionDialog::setTimestamp(struct timeval const &tv)

Callers 2

refreshOrbitMethod · 0.95
parseCurrentTLEMethod · 0.95

Calls 1

updatePredictionMethod · 0.95

Tested by

no test coverage detected