//public double RightAscensionRate //{ // get // { // double rightAscensionRate = 0.0; // tl.LogMessage("RightAscensionRate", "Get - " + rightAscensionRate.ToString()); // return rightAscensionRate; // } // set // { // tl.LogMessage("RightAscensionRate Set", "Not implemented"); // throw new ASCOM.PropertyNotImplementedException("RightAscensionRate", true); // } //} //public void SetPark() //{ // tl.LogMessage("SetPark", "Not implemented"); // throw new ASCOM.MethodNotImplementedException("SetPark"); //} private void UpdateSideOfPier() { if (Slewing || AtHome) { UpdatingSideOfPier = false; return; } double HourAngle = astroUtilities.ConditionHA(SiderealTime - RightAscension); bool NearMeridian = (HourAngle < -11 || HourAngle > 11) || (HourAngle > -1 && HourAngle < 1); if (!NearMeridian) // SideOfPier is constrained by mount design (no need to send :pS# command) { _SideOfPier = (HourAngle > 0) ? PierSide.pierEast : PierSide.pierWest; UpdatingSideOfPier = false; return; } //Command: “:pS#” //Response: “0” East, “1” West. var SideOfPierTransaction = new ZEQ25BooleanTransaction(":pS#") { Timeout = TimeSpan.FromSeconds(2) }; Task.Run(() => transactionProcessor.CommitTransaction(SideOfPierTransaction)); SideOfPierTransaction.WaitForCompletionOrTimeout(); String response = SideOfPierTransaction.Response.ToString(); log.Info("Update SideOfPier (Response): {0}", SideOfPierTransaction.Response); // pierEast is returned when the mount is observing at an hour angle between -12.0 and -6.0 // pierWest is returned when the mount is observing at an hour angle between -6.0 and 0.0 // pierEast is returned when the mount is observing at an hour angle between 0.0 and +6.0 // pierWest is returned when the mount is observing at an hour angle between +6.0 and +12.0 // "Through the pole" if (HourAngle < -6 || HourAngle > 6) // between -12.0 and -6.0 or between + 6.0 and + 12.0 { _SideOfPier = SideOfPierTransaction.Value ? PierSide.pierEast : PierSide.pierWest; } else // between -6.0 and 0.0 or between 0.0 and + 6.0 (Normal pointing state) - 1 = West, 0 = East { _SideOfPier = SideOfPierTransaction.Value ? PierSide.pierWest : PierSide.pierEast; } UpdatingSideOfPier = false; }