Exemple #1
0
 public Transform()
 {
     this.disposedValue = false;
     this.TL            = new TraceLogger("", "Transform");
     this.TL.Enabled    = RegistryCommonCode.GetBool("Trace Transform", false);
     this.TL.LogMessage("New", "Trace logger created OK");
     this.Utl                 = new Util();
     this.Sw                  = new Stopwatch();
     this.SwRecalculate       = new Stopwatch();
     this.AstroUtl            = new ASCOM.Astrometry.AstroUtils.AstroUtils();
     this.SOFA                = new ASCOM.Astrometry.SOFA.SOFA();
     this.RAJ2000Value        = double.NaN;
     this.DECJ2000Value       = double.NaN;
     this.RATopoValue         = double.NaN;
     this.DECTopoValue        = double.NaN;
     this.SiteElevValue       = double.NaN;
     this.SiteLatValue        = double.NaN;
     this.SiteLongValue       = double.NaN;
     this.RefracValue         = false;
     this.LastSetBy           = ASCOM.Astrometry.Transform.Transform.SetBy.Never;
     this.RequiresRecalculate = true;
     this.JulianDateTTValue   = 0.0;
     this.CheckGAC();
     this.TL.LogMessage("New", "NOVAS initialised OK");
 }
Exemple #2
0
 public void SetAzimuthElevation(double Azimuth, double Elevation)
 {
     this.LastSetBy           = ASCOM.Astrometry.Transform.Transform.SetBy.AzimuthElevation;
     this.RequiresRecalculate = true;
     this.AzimuthTopoValue    = Azimuth;
     this.ElevationTopoValue  = Elevation;
     this.TL.LogMessage("SetAzimuthElevation", "Azimuth: " + this.FormatDec(Azimuth) + ", Elevation: " + this.FormatDec(Elevation));
 }
Exemple #3
0
 public void SetTopocentric(double RA, double DEC)
 {
     this.LastSetBy = ASCOM.Astrometry.Transform.Transform.SetBy.Topocentric;
     if (RA != this.RATopoValue | DEC != this.DECTopoValue)
     {
         this.RequiresRecalculate = true;
     }
     this.RATopoValue  = this.ValidateRA("SetTopocentric", RA);
     this.DECTopoValue = this.ValidateDec("SetTopocentric", DEC);
     this.TL.LogMessage("SetTopocentric", "RA: " + Strings.Format((object)RA, "") + ", DEC: " + this.FormatDec(DEC));
 }