forked from Nivekk/KOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrbit.cs
More file actions
36 lines (30 loc) · 819 Bytes
/
Orbit.cs
File metadata and controls
36 lines (30 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace kOS
{
public class OrbitInfo : SpecialValue
{
Orbit orbitRef;
public OrbitInfo(Orbit init)
{
this.orbitRef = init;
}
public override object GetSuffix(string suffixName)
{
if (suffixName == "APOAPSIS") return orbitRef.ApA;
else if (suffixName == "PERIAPSIS") return orbitRef.PeA;
else if (suffixName == "BODY") return orbitRef.referenceBody.name;
return base.GetSuffix(suffixName);
}
public override string ToString()
{
if (orbitRef != null)
{
return orbitRef.referenceBody.name;
}
return "";
}
}
}