mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-02 00:43:42 -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 7c209efb9f
for context.
This commit is contained in:
@ -70,7 +70,9 @@ namespace Observatory.Explorer
|
|||||||
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)
|
||||||
{
|
{
|
||||||
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user