2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

Close Ring Proximity criteria: Prevent it from triggering on a belt (#56)

I actually had this recently, which is how I found it.
This commit is contained in:
F K 2022-02-26 15:48:49 -05:00 committed by GitHub
parent b465b3d886
commit d9fbdd5269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ namespace Observatory.Explorer
foreach (var ring in parent.Rings) foreach (var ring in parent.Rings)
{ {
var separation = Math.Min(Math.Abs(scan.SemiMajorAxis - ring.OuterRad), Math.Abs(ring.InnerRad - scan.SemiMajorAxis)); var separation = Math.Min(Math.Abs(scan.SemiMajorAxis - ring.OuterRad), Math.Abs(ring.InnerRad - scan.SemiMajorAxis));
if (separation < scan.Radius * 10) if (separation < scan.Radius * 10 && !ring.Name.Contains("Belt"))
{ {
results.Add("Close Ring Proximity", $"Orbit: {scan.SemiMajorAxis / 1000:N0}km, Radius: {scan.Radius / 1000:N0}km, Distance from ring: {separation / 1000:N0}km"); results.Add("Close Ring Proximity", $"Orbit: {scan.SemiMajorAxis / 1000:N0}km, Radius: {scan.Radius / 1000:N0}km, Distance from ring: {separation / 1000:N0}km");
} }