mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
Merge pull request #894 from srcejon/fix_sat_tracker_tle_excepton
Catch TleException in Satellite Selection Dialog to avoid crash
This commit is contained in:
commit
7184ae925d
@ -224,14 +224,21 @@ void SatelliteSelectionDialog::displaySatInfo(const QString& name)
|
|||||||
}
|
}
|
||||||
if (sat->m_tle != nullptr)
|
if (sat->m_tle != nullptr)
|
||||||
{
|
{
|
||||||
info.append("Orbit:");
|
try
|
||||||
Tle tle = Tle(sat->m_tle->m_tle0.toStdString(),
|
{
|
||||||
sat->m_tle->m_tle1.toStdString(),
|
info.append("Orbit:");
|
||||||
sat->m_tle->m_tle2.toStdString());
|
Tle tle = Tle(sat->m_tle->m_tle0.toStdString(),
|
||||||
OrbitalElements ele(tle);
|
sat->m_tle->m_tle1.toStdString(),
|
||||||
info.append(QString(" Period: %1 mins").arg(ele.Period()));
|
sat->m_tle->m_tle2.toStdString());
|
||||||
info.append(QString(" Inclination: %1%2").arg(Units::radiansToDegrees(ele.Inclination())).arg(QChar(0xb0)));
|
OrbitalElements ele(tle);
|
||||||
info.append(QString(" Eccentricity: %1").arg(ele.Eccentricity()));
|
info.append(QString(" Period: %1 mins").arg(ele.Period()));
|
||||||
|
info.append(QString(" Inclination: %1%2").arg(Units::radiansToDegrees(ele.Inclination())).arg(QChar(0xb0)));
|
||||||
|
info.append(QString(" Eccentricity: %1").arg(ele.Eccentricity()));
|
||||||
|
}
|
||||||
|
catch (TleException tlee)
|
||||||
|
{
|
||||||
|
qDebug() << "SatelliteSelectionDialog::displaySatInfo: TleException " << tlee.what();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->satInfo->setText(info.join("\n"));
|
ui->satInfo->setText(info.join("\n"));
|
||||||
|
Loading…
Reference in New Issue
Block a user