Practical Astronomy Algorithms in .NET/C#
Loading...
Searching...
No Matches
BinaryData.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3
4namespace PALib.Data;
5
9public class BinaryData
10{
14 public string Name { get; set; }
15
19 public double Period { get; set; }
20
24 public double EpochPeri { get; set; }
25
29 public double LongPeri { get; set; }
30
34 public double Ecc { get; set; }
35
39 public double Axis { get; set; }
40
44 public double Incl { get; set; }
45
49 public double PANode { get; set; }
50}
51
55public static class BinaryInfo
56{
57 static List<BinaryData> _binaryData;
58
59 static BinaryInfo()
60 {
61 _binaryData = new List<BinaryData>()
62 {
63 new BinaryData() {
64 Name = "eta-Cor",
65 Period = 41.623,
66 EpochPeri = 1934.008,
67 LongPeri = 219.907,
68 Ecc = 0.2763,
69 Axis = 0.907,
70 Incl = 59.025,
71 PANode = 23.717
72 },
73 new BinaryData() {
74 Name = "gamma-Vir",
75 Period = 171.37,
76 EpochPeri = 1836.433,
77 LongPeri = 252.88,
78 Ecc = 0.8808,
79 Axis = 3.746,
80 Incl = 146.05,
81 PANode = 31.78,
82 },
83 new BinaryData() {
84 Name = "eta-Cas",
85 Period = 480.0,
86 EpochPeri = 1889.6,
87 LongPeri = 268.59,
88 Ecc = 0.497,
89 Axis = 11.9939,
90 Incl = 34.76,
91 PANode = 278.42,
92 },
93 new BinaryData() {
94 Name = "zeta-Ori",
95 Period = 1508.6,
96 EpochPeri = 2070.6,
97 LongPeri = 47.3,
98 Ecc = 0.07,
99 Axis = 2.728,
100 Incl = 72.0,
101 PANode = 155.5,
102 },
103 new BinaryData() {
104 Name = "alpha-CMa",
105 Period = 50.09,
106 EpochPeri = 1894.13,
107 LongPeri = 147.27,
108 Ecc = 0.5923,
109 Axis = 7.5,
110 Incl = 136.53,
111 PANode = 44.57,
112 },
113 new BinaryData() {
114 Name = "delta-Gem",
115 Period = 1200.0,
116 EpochPeri = 1437.0,
117 LongPeri = 57.19,
118 Ecc = 0.11,
119 Axis = 6.9753,
120 Incl = 63.28,
121 PANode = 18.38,
122 },
123 new BinaryData() {
124 Name = "alpha-Gem",
125 Period = 420.07,
126 EpochPeri = 1965.3,
127 LongPeri = 261.43,
128 Ecc = 0.33,
129 Axis = 6.295,
130 Incl = 115.94,
131 PANode = 40.47,
132 },
133 new BinaryData() {
134 Name = "aplah-CMi",
135 Period = 40.65,
136 EpochPeri = 1927.6,
137 LongPeri = 269.8,
138 Ecc = 0.4,
139 Axis = 4.548,
140 Incl = 35.7,
141 PANode = 284.3,
142 },
143 new BinaryData() {
144 Name = "alpha-Cen",
145 Period = 79.92,
146 EpochPeri = 1955.56,
147 LongPeri = 231.56,
148 Ecc = 0.516,
149 Axis = 17.583,
150 Incl = 79.24,
151 PANode = 204.868,
152 },
153 new BinaryData() {
154 Name = "alpha Sco",
155 Period = 900.0,
156 EpochPeri = 1889.0,
157 LongPeri = 0.0,
158 Ecc = 0.0,
159 Axis = 3.21,
160 Incl = 86.3,
161 PANode = 273.0,
162 }
163 };
164 }
165
170 public static BinaryData GetBinaryInfo(string name)
171 {
172 BinaryData returnValue = _binaryData
173 .Where(x => x.Name == name)
174 .Select(x => x)
175 .FirstOrDefault();
176
177 return (returnValue == null) ? new BinaryData() { Name = "NotFound" } : returnValue;
178 }
179}
Holds information about binary star systems.
Definition BinaryData.cs:10
double Ecc
Eccentricity of the orbit.
Definition BinaryData.cs:34
double Incl
Orbital inclination.
Definition BinaryData.cs:44
double Period
Period of the orbit.
Definition BinaryData.cs:19
double EpochPeri
Epoch of the perihelion.
Definition BinaryData.cs:24
double LongPeri
Longitude of the perihelion.
Definition BinaryData.cs:29
string Name
Name of binary system.
Definition BinaryData.cs:14
double PANode
Position angle of the ascending node.
Definition BinaryData.cs:49
double Axis
Semi-major axis of the orbit.
Definition BinaryData.cs:39
Binary star system data manager.
Definition BinaryData.cs:56
static BinaryData GetBinaryInfo(string name)
Retrieve information about a specific binary star system.
static List< BinaryData > _binaryData
Definition BinaryData.cs:57