Skip to content

Commit

Permalink
[SSE] Add links for multi-opposition unnumbered objects and one-oppos…
Browse files Browse the repository at this point in the history
…ition objects into bookmarks
  • Loading branch information
alex-w committed Aug 27, 2024
1 parent 3baac3c commit ad96058
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions plugins/SolarSystemEditor/src/gui/MpcImportWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ void MpcImportWindow::loadBookmarks()
while (it.hasNext())
{
it.next();
if (it.value().contains("dss.stellarium.org") || it.value().contains("2018/Soft00Bright.txt") || it.value().contains("iau/ECS/MPCAT/mpn.txt"))
if (it.value().contains("dss.stellarium.org") || it.value().contains("2018/Soft00Bright.txt") || it.value().contains("2023/Soft00Bright.txt") || it.value().contains("iau/ECS/MPCAT/mpn.txt"))
bookmarks[MpcMinorPlanets].remove(it.key());
}

Expand All @@ -1041,7 +1041,7 @@ void MpcImportWindow::loadBookmarks()
bookmarks[MpcMinorPlanets].insert("MPC's list of observable critical-list numbered minor planets", "https://www.minorplanetcenter.net/iau/Ephemerides/CritList/Soft00CritList.txt");
bookmarks[MpcMinorPlanets].insert("MPC's list of observable distant minor planets", "https://www.minorplanetcenter.net/iau/Ephemerides/Distant/Soft00Distant.txt");
bookmarks[MpcMinorPlanets].insert("MPC's list of observable unusual minor planets", "https://www.minorplanetcenter.net/iau/Ephemerides/Unusual/Soft00Unusual.txt");
bookmarks[MpcMinorPlanets].insert("MPC's list of bright minor planets for 2023", "https://www.minorplanetcenter.net/iau/Ephemerides/Bright/2023/Soft00Bright.txt");
bookmarks[MpcMinorPlanets].insert("MPC's list of bright minor planets at opposition in 2024", "https://www.minorplanetcenter.net/iau/Ephemerides/Bright/2024/Soft00Bright.txt");

bookmarks[MpcMinorPlanets].insert("MPCORB: near-Earth asteroids (NEAs)", "https://www.minorplanetcenter.net/iau/MPCORB/NEA.txt");
bookmarks[MpcMinorPlanets].insert("MPCORB: potentially hazardous asteroids (PHAs)", "https://www.minorplanetcenter.net/iau/MPCORB/PHA.txt");
Expand All @@ -1052,18 +1052,21 @@ void MpcImportWindow::loadBookmarks()

bookmarks[MpcMinorPlanets].insert("MPCAT: Unusual minor planets (including NEOs)", "https://www.minorplanetcenter.net/iau/ECS/MPCAT/unusual.txt");
bookmarks[MpcMinorPlanets].insert("MPCAT: Distant minor planets (Centaurs and transneptunians)", "https://www.minorplanetcenter.net/iau/ECS/MPCAT/distant.txt");
bookmarks[MpcMinorPlanets].insert("MPCAT: One-opposition objects (perturbed solutions)", "https://www.minorplanetcenter.net/iau/ECS/MPCAT/mpo.txt");
bookmarks[MpcMinorPlanets].insert("MPCAT: One-opposition objects (unperturbed solutions)", "https://www.minorplanetcenter.net/iau/ECS/MPCAT/mp1.txt");

const int start = 0;
const int finish = 72;
const int mpn = 73; // number of files for numbered minor planets
const int mpu = 65; // number of files for unnumbered minor planets
const int nsize = 6;
const QChar dash = QChar(0x2014);

QString limits, idx, leftLimit, rightLimit;

for (int i=start; i<=finish; i++)
for (int i=start; i<mpn; i++)
{
leftLimit = (i==start) ? QString::number(1).rightJustified(nsize, '0') : QString::number(i*10000).rightJustified(nsize, '0');
rightLimit = (i==finish) ? "..." : QString::number(i*10000 + 9999).rightJustified(nsize, '0');
rightLimit = (i==(mpn-1)) ? "..." : QString::number(i*10000 + 9999).rightJustified(nsize, '0');
limits = QString("%1%2%3").arg(leftLimit, dash, rightLimit);
idx = QString::number(i+1).rightJustified(2, '0');
bookmarks[MpcMinorPlanets].insert(
Expand All @@ -1072,6 +1075,15 @@ void MpcImportWindow::loadBookmarks()
);
}

for (int i=start; i<mpu; i++)
{
idx = QString::number(i+1).rightJustified(2, '0');
bookmarks[MpcMinorPlanets].insert(
QString("MPCAT: Multi-opposition unnumbered objects (part %1)").arg(idx),
QString("http://dss.stellarium.org/MPC/mpu-%1.txt").arg(idx)
);
}

bookmarks[MpcComets].insert("MPC's list of observable comets", "https://www.minorplanetcenter.net/iau/Ephemerides/Comets/Soft00Cmt.txt");
bookmarks[MpcComets].insert("MPCORB: comets", "https://www.minorplanetcenter.net/iau/MPCORB/CometEls.txt");
bookmarks[MpcComets].insert("MPCORB: all comets and A/-objects","https://www.minorplanetcenter.net/iau/MPCORB/AllCometEls.txt");
Expand Down

0 comments on commit ad96058

Please sign in to comment.