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

Distinguish Close Belt proximity and Close Ring proximity criteria (#70)

If it's a belt, report it as a belt instead of a ring.

See 7c209efb9f1e4eeb248b36d65463aa10e6f2f70e for context.
This commit is contained in:
F K 2022-03-23 06:44:42 -04:00 committed by GitHub
parent 0c86590f75
commit fcf6f71abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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