示例#1
0
        /// <summary>
        /// Constructor that takes an AbstractRadioTelescope object and sets the
        /// corresponding field.
        /// </summary>
        /// <param name="radioTelescope"></param>
        public RadioTelescopeController(RadioTelescope radioTelescope)
        {
            RadioTelescope       = radioTelescope;
            CoordinateController = new CoordinateCalculationController(radioTelescope.Location);

            overrides = new OverrideSwitchData(radioTelescope);
            radioTelescope.PLCDriver.Overrides = overrides;

            SensorMonitoringThread = new Thread(SensorMonitor);
            SensorMonitoringThread.Start();
            MonitoringSensors = true;
            AllSensorsSafe    = true;

            MaxAzTempThreshold = DatabaseOperations.GetThresholdForSensor(SensorItemEnum.AZ_MOTOR_TEMP);
            MaxElTempThreshold = DatabaseOperations.GetThresholdForSensor(SensorItemEnum.ELEV_MOTOR_TEMP);

            previousSnowDumpAzimuth = 0;

            snowDumpTimer           = new System.Timers.Timer(DatabaseOperations.FetchWeatherThreshold().SnowDumpTime * 1000 * 60);
            snowDumpTimer.Elapsed  += AutomaticSnowDumpInterval;
            snowDumpTimer.AutoReset = true;
            snowDumpTimer.Enabled   = true;

            FinalCalibrationOffset = new Orientation(0, 0);
        }
 /// <summary>
 /// Constructor that takes an AbstractRadioTelescope object and sets the
 /// corresponding field.
 /// </summary>
 /// <param name="radioTelescope"></param>
 public RadioTelescopeController(RadioTelescope radioTelescope)
 {
     RadioTelescope       = radioTelescope;
     CoordinateController = new CoordinateCalculationController(radioTelescope.Location);
 }