Practical Astronomy Algorithms in .NET/C#
Loading...
Searching...
No Matches
PlanetData.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3
4namespace PALib.Data;
5
9public class PlanetData
10{
14 public string Name { get; set; }
15
23 public double tp_PeriodOrbit { get; set; }
24
32 public double long_LongitudeEpoch { get; set; }
33
41 public double peri_LongitudePerihelion { get; set; }
42
50 public double ecc_EccentricityOrbit { get; set; }
51
59 public double axis_AxisOrbit { get; set; }
60
68 public double incl_OrbitalInclination { get; set; }
69
77 public double node_LongitudeAscendingNode { get; set; }
78
86 public double theta0_AngularDiameter { get; set; }
87
95 public double v0_VisualMagnitude { get; set; }
96}
97
102{
106 public string Name { get; set; }
107
111 public double Value1 { get; set; }
112
116 public double Value2 { get; set; }
117
121 public double Value3 { get; set; }
122
126 public double Value4 { get; set; }
127
131 public double Value5 { get; set; }
132
136 public double Value6 { get; set; }
137
141 public double Value7 { get; set; }
142
146 public double Value8 { get; set; }
147
151 public double Value9 { get; set; }
152
156 public double APValue { get; set; }
157}
158
162public static class PlanetInfo
163{
164 static List<PlanetData> _planetData;
165
166 static PlanetInfo()
167 {
168 _planetData = new List<PlanetData>() {
169 new PlanetData() {
170 Name = "Mercury",
171 tp_PeriodOrbit = 0.24085,
172 long_LongitudeEpoch = 75.5671,
173 peri_LongitudePerihelion = 77.612,
174 ecc_EccentricityOrbit = 0.205627,
175 axis_AxisOrbit = 0.387098,
176 incl_OrbitalInclination = 7.0051,
177 node_LongitudeAscendingNode = 48.449,
178 theta0_AngularDiameter = 6.74,
179 v0_VisualMagnitude = -0.42
180 },
181 new PlanetData() {
182 Name = "Venus",
183 tp_PeriodOrbit = 0.615207,
184 long_LongitudeEpoch = 272.30044,
185 peri_LongitudePerihelion = 131.54,
186 ecc_EccentricityOrbit = 0.006812,
187 axis_AxisOrbit = 0.723329,
188 incl_OrbitalInclination = 3.3947,
189 node_LongitudeAscendingNode = 76.769,
190 theta0_AngularDiameter = 16.92,
191 v0_VisualMagnitude = -4.4
192 },
193 new PlanetData() {
194 Name = "Earth",
195 tp_PeriodOrbit = 0.999996,
196 long_LongitudeEpoch = 99.556772,
197 peri_LongitudePerihelion = 103.2055,
198 ecc_EccentricityOrbit = 0.016671,
199 axis_AxisOrbit = 0.999985,
200 incl_OrbitalInclination = -99.0,
201 node_LongitudeAscendingNode = -99.0,
202 theta0_AngularDiameter = -99.0,
203 v0_VisualMagnitude = -99.0
204 },
205 new PlanetData() {
206 Name = "Mars",
207 tp_PeriodOrbit = 1.880765,
208 long_LongitudeEpoch = 109.09646,
209 peri_LongitudePerihelion = 336.217,
210 ecc_EccentricityOrbit = 0.093348,
211 axis_AxisOrbit = 1.523689,
212 incl_OrbitalInclination = 1.8497,
213 node_LongitudeAscendingNode = 49.632,
214 theta0_AngularDiameter = 9.36,
215 v0_VisualMagnitude = -1.52
216 },
217 new PlanetData() {
218 Name = "Jupiter",
219 tp_PeriodOrbit = 11.857911,
220 long_LongitudeEpoch = 337.917132,
221 peri_LongitudePerihelion = 14.6633,
222 ecc_EccentricityOrbit = 0.048907,
223 axis_AxisOrbit = 5.20278,
224 incl_OrbitalInclination = 1.3035,
225 node_LongitudeAscendingNode = 100.595,
226 theta0_AngularDiameter = 196.74,
227 v0_VisualMagnitude = -9.4
228 },
229 new PlanetData() {
230 Name = "Saturn",
231 tp_PeriodOrbit = 29.310579,
232 long_LongitudeEpoch = 172.398316,
233 peri_LongitudePerihelion = 89.567,
234 ecc_EccentricityOrbit = 0.053853,
235 axis_AxisOrbit = 9.51134,
236 incl_OrbitalInclination = 2.4873,
237 node_LongitudeAscendingNode = 113.752,
238 theta0_AngularDiameter = 165.6,
239 v0_VisualMagnitude = -8.88
240 },
241 new PlanetData() {
242 Name = "Uranus",
243 tp_PeriodOrbit = 84.039492,
244 long_LongitudeEpoch = 356.135400,
245 peri_LongitudePerihelion = 172.884833,
246 ecc_EccentricityOrbit = 0.046321,
247 axis_AxisOrbit = 19.21814,
248 incl_OrbitalInclination = 0.773059,
249 node_LongitudeAscendingNode = 73.926961,
250 theta0_AngularDiameter = 65.8,
251 v0_VisualMagnitude = -7.19
252 },
253 new PlanetData() {
254 Name = "Neptune",
255 tp_PeriodOrbit = 165.845392,
256 long_LongitudeEpoch = 326.895127,
257 peri_LongitudePerihelion = 23.07,
258 ecc_EccentricityOrbit = 0.010483,
259 axis_AxisOrbit = 30.1985,
260 incl_OrbitalInclination = 1.7673,
261 node_LongitudeAscendingNode = 131.879,
262 theta0_AngularDiameter = 62.2,
263 v0_VisualMagnitude = -6.87
264 }
265 };
266 }
267
271 public static PlanetData GetPlanetInfo(string name)
272 {
273 PlanetData returnValue = _planetData
274 .Where(x => x.Name == name)
275 .Select(x => x)
276 .FirstOrDefault();
277
278 return (returnValue == null) ? new PlanetData() { Name = "NotFound" } : returnValue;
279 }
280}
Working data for precise planet calculations.
double Value1
Working value 1.
double Value3
Working value 3.
double Value2
Working value 2.
double APValue
Working AP value.
string Name
Name of planet.
double Value9
Working value 9.
double Value5
Working value 5.
double Value6
Working value 6.
double Value7
Working value 7.
double Value8
Working value 8.
double Value4
Working value 4.
Information about a planet.
Definition PlanetData.cs:10
double axis_AxisOrbit
Semi-major axis of the orbit.
Definition PlanetData.cs:59
double incl_OrbitalInclination
Orbital inclination.
Definition PlanetData.cs:68
double ecc_EccentricityOrbit
Eccentricity of the orbit.
Definition PlanetData.cs:50
double theta0_AngularDiameter
Angular diameter at 1 AU.
Definition PlanetData.cs:86
double v0_VisualMagnitude
Visual magnitude at 1 AU.
Definition PlanetData.cs:95
string Name
Name of planet.
Definition PlanetData.cs:14
double long_LongitudeEpoch
Longitude at the epoch.
Definition PlanetData.cs:32
double node_LongitudeAscendingNode
Longitude of the ascending node.
Definition PlanetData.cs:77
double peri_LongitudePerihelion
Longitude of the perihelion.
Definition PlanetData.cs:41
double tp_PeriodOrbit
Period of orbit.
Definition PlanetData.cs:23
Data manager for planets.
static PlanetData GetPlanetInfo(string name)
Get information about a planet.
static List< PlanetData > _planetData