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

Method updatePrediction

Components/FrequencyCorrectionDialog.cpp:660–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660void
661FrequencyCorrectionDialog::updatePrediction(void)
662{
663 struct timeval diff;
664 qreal seconds;
665 xyz_t azel, v_azel;
666
667 if (this->haveOrbit) {
668 this->recalcALOS();
669
670 sgdp4_prediction_update(&this->prediction, &this->timeStamp);
671
672 sgdp4_prediction_get_azel(&this->prediction, &azel);
673 sgdp4_prediction_get_vel_azel(&this->prediction, &v_azel);
674
675 this->ui->visibleLabel->setText(azel.elevation < 0 ? "No" : "Yes");
676 this->ui->azimuthLabel->setText(
677 SuWidgetsHelpers::formatQuantity(
678 SU_RAD2DEG(azel.azimuth),
679 0,
680 "deg",
681 false));
682 this->ui->elevationLabel->setText(
683 SuWidgetsHelpers::formatQuantity(
684 SU_RAD2DEG(azel.elevation),
685 0,
686 "deg",
687 false));
688 this->ui->dopplerLabel->setText(
689 SuWidgetsHelpers::formatQuantity(
690 -v_azel.distance * this->centerFreq / SPEED_OF_LIGHT_KM_S,
691 4,
692 "Hz",
693 false));
694 this->ui->speedLabel->setText(
695 SuWidgetsHelpers::formatQuantity(
696 v_azel.distance * 1e3,
697 4,
698 "m/s",
699 false));
700
701 if (orbit_is_geo(&this->currentOrbit))
702 this->ui->periodLabel->setText("Geostationary");
703 else if (orbit_is_decayed(&this->currentOrbit, &this->timeStamp))
704 this->ui->periodLabel->setText("Decayed");
705 else
706 this->ui->periodLabel->setText(
707 SuWidgetsHelpers::formatQuantity(
708 86400.0 / this->currentOrbit.rev,
709 4,
710 "s"));
711
712 this->ui->eccLabel->setText(
713 QString::asprintf("%g", this->currentOrbit.ecc));
714
715 this->ui->incLabel->setText(
716 SuWidgetsHelpers::formatQuantity(
717 SU_RAD2DEG(this->currentOrbit.eqinc),

Callers 6

setCurrentOrbitMethod · 0.95
setTimestampMethod · 0.95
resetTimestampMethod · 0.95
setTimeLimitsMethod · 0.95
onTickMethod · 0.95

Calls 2

recalcALOSMethod · 0.95
repaintSatellitePlotMethod · 0.95

Tested by

no test coverage detected