1.0.0-rc.87

This commit is contained in:
2025-09-30 20:43:53 +02:00
parent 79c3b3c5ea
commit 99b7dc07f7
157 changed files with 442 additions and 318 deletions
+19
View File
@@ -47,3 +47,22 @@ void FilterSpotsByCount(std::vector<SpotToSave> &input, int64_t count) {
});
input.resize(output_size);
}
std::optional<float> GetResolution(const std::vector<SpotToSave> &spots) {
if (spots.size() < 6)
return std::nullopt;
std::vector<float> resolutions;
resolutions.reserve(spots.size());
for (const auto &spot: spots) {
if (!spot.ice_ring)
resolutions.push_back(spot.d_A);
}
std::ranges::sort(resolutions);
if (spots.size() < 20)
return resolutions[2];
return resolutions[static_cast<size_t>(spots.size() * 0.95)];
}