Beispiel #1
0
        private void CalculateAltitude()
        {
            var start = this._referenceDate;

            Altitudes.Clear();
            var siderealTime = Astrometry.GetLocalSiderealTime(start, _longitude);
            var hourAngle    = Astrometry.GetHourAngle(siderealTime, this.Coordinates.RA);

            for (double angle = hourAngle; angle < hourAngle + 24; angle += 0.1)
            {
                var degAngle = Astrometry.HoursToDegrees(angle);
                var altitude = Astrometry.GetAltitude(degAngle, _latitude, this.Coordinates.Dec);
                Altitudes.Add(new DataPoint(DateTimeAxis.ToDouble(start), altitude));
                start = start.AddHours(0.1);
            }

            MaxAltitude = Altitudes.OrderByDescending((x) => x.Y).FirstOrDefault();

            CalculateTransit(_latitude);
        }