| 890 | } |
| 891 | |
| 892 | void |
| 893 | FrequencyCorrectionDialog::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 | |
| 918 | FrequencyCorrectionDialog::~FrequencyCorrectionDialog() |
| 919 | { |
no test coverage detected