22 public (
double cometRAHour,
double cometRAMin,
double cometDecDeg,
double cometDecMin,
double cometDistEarth)
PositionOfEllipticalComet(
double lctHour,
double lctMin,
double lctSec,
bool isDaylightSaving,
int zoneCorrectionHours,
double localDateDay,
int localDateMonth,
int localDateYear,
string cometName)
24 int daylightSaving = isDaylightSaving ? 1 : 0;
26 double greenwichDateDay =
PAMacros.
LocalCivilTimeGreenwichDay(lctHour, lctMin, lctSec, daylightSaving, zoneCorrectionHours, localDateDay, localDateMonth, localDateYear);
34 double mcRad = (mcDeg - 360 * (mcDeg / 360).Floor()).ToRadians();
38 double rAU = cometInfo.axis_SemiMajorAxisOfOrbit * (1 - eccentricity * eccentricity) / (1 + eccentricity * trueAnomalyDeg.ToRadians().Cosine());
43 double x = lcNodeRad.Cosine();
46 double rdAU = rAU * psiRad.Cosine();
48 double earthLongitudeLeDeg =
PAMacros.
SunLong(lctHour, lctMin, lctSec, daylightSaving, zoneCorrectionHours, localDateDay, localDateMonth, localDateYear) + 180.0;
49 double earthRadiusVectorAU =
PAMacros.
SunDist(lctHour, lctMin, lctSec, daylightSaving, zoneCorrectionHours, localDateDay, localDateMonth, localDateYear);
51 double leLdRad = (earthLongitudeLeDeg - ldDeg).ToRadians();
52 double aRad = (rdAU < earthRadiusVectorAU) ? (rdAU * leLdRad.Sine()).AngleTangent2(earthRadiusVectorAU - rdAU * leLdRad.Cosine()) : (earthRadiusVectorAU * (-leLdRad).Sine()).AngleTangent2(rdAU - earthRadiusVectorAU * leLdRad.Cosine());
55 double cometLongDeg = cometLongDeg1 - 360 * (cometLongDeg1 / 360).Floor();
56 double cometLatDeg =
PAMacros.
Degrees((rdAU * psiRad.Tangent() * (cometLongDeg1 - ldDeg).ToRadians().Sine() / (earthRadiusVectorAU * (-leLdRad).Sine())).AngleTangent());
58 double cometDecDeg1 =
PAMacros.
EcDec(cometLongDeg, 0, 0, cometLatDeg, 0, 0, greenwichDateDay, greenwichDateMonth, greenwichDateYear);
59 double cometDistanceAU = (Math.Pow(earthRadiusVectorAU, 2) + Math.Pow(rAU, 2) - 2.0 * earthRadiusVectorAU * rAU * (lcDeg - earthLongitudeLeDeg).ToRadians().Cosine() * psiRad.Cosine()).SquareRoot();
65 double cometDistEarth = Math.Round(cometDistanceAU, 2);
83 public (
double cometRAHour,
double cometRAMin,
double cometRASec,
double cometDecDeg,
double cometDecMin,
double cometDecSec,
double cometDistEarth)
PositionOfParabolicComet(
double lctHour,
double lctMin,
double lctSec,
bool isDaylightSaving,
int zoneCorrectionHours,
double localDateDay,
int localDateMonth,
int localDateYear,
string cometName)
85 int daylightSaving = isDaylightSaving ? 1 : 0;
87 double greenwichDateDay =
PAMacros.
LocalCivilTimeGreenwichDay(lctHour, lctMin, lctSec, daylightSaving, zoneCorrectionHours, localDateDay, localDateMonth, localDateYear);
97 double inclinationDeg = cometInfo.
Incl;
98 double perihelionDeg = cometInfo.
ArgPeri;
99 double nodeDeg = cometInfo.
Node;
101 (
double cometLongDeg,
double cometLatDeg,
double cometDistAU) cometLongLatDist =
PAMacros.
PCometLongLatDist(lctHour, lctMin, lctSec, daylightSaving, zoneCorrectionHours, localDateDay, localDateMonth, localDateYear, perihelionEpochDay, perihelionEpochMonth, perihelionEpochYear, qAU, inclinationDeg, perihelionDeg, nodeDeg);
104 double cometDecDeg1 =
PAMacros.
EcDec(cometLongLatDist.cometLongDeg, 0, 0, cometLongLatDist.cometLatDeg, 0, 0, greenwichDateDay, greenwichDateMonth, greenwichDateYear);
112 double cometDistEarth = Math.Round(cometLongLatDist.cometDistAU, 2);