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

Method parseCurrentTLE

Components/FrequencyCorrectionDialog.cpp:892–916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892void
893FrequencyCorrectionDialog::parseCurrentTLE(void)
894{
895 QString tleData = this->ui->tleEdit->toPlainText();
896 std::string asStdString = tleData.toStdString();
897 const char *str = asStdString.c_str();
898
899 if (tleData.length() == 0) {
900 this->ui->tleStatusLabel->setText("Please input a valid TLE set");
901 this->setCurrentOrbit(nullptr);
902 } else {
903 orbit_t orbit = orbit_INITIALIZER;
904
905 if (orbit_init_from_data(
906 &orbit,
907 str,
908 static_cast<size_t>(asStdString.length())) > 0) {
909 this->setCurrentOrbit(&orbit);
910 orbit_finalize(&orbit);
911 this->ui->tleStatusLabel->setText("TLE is valid");
912 } else {
913 this->ui->tleStatusLabel->setText("TLE has errors");
914 }
915 }
916}
917
918FrequencyCorrectionDialog::~FrequencyCorrectionDialog()
919{

Callers 1

refreshOrbitMethod · 0.95

Calls 2

setCurrentOrbitMethod · 0.95
lengthMethod · 0.80

Tested by

no test coverage detected