public void SlewToCoordinatesAsync(double rightAscension, double declination) { RightAscensionConverter raConverter = new RightAscensionConverter((decimal)rightAscension); DeclinationConverter decConverter = new DeclinationConverter((decimal)declination); LogActivityLine(ActivityMessageTypes.Commands, "SlewToCoordinatesAsync \r\nRA {0}\r\nDec {1}: {2}" , raConverter, decConverter, SlewStarted); CheckDevice(); Status.Slewing = true; Service.SlewToCoordinatesAsync(rightAscension, declination); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string retval = "NO DATA"; double rawRA = (double)value; if (!Double.IsNaN(rawRA)) { RightAscensionConverter converter = new RightAscensionConverter((decimal)rawRA); retval = converter.ToString(); } return(retval); }
public PierSide DestinationSideOfPier(double rightAscension, double declination) { RightAscensionConverter raConverter = new RightAscensionConverter((decimal)rightAscension); DeclinationConverter decConverter = new DeclinationConverter((decimal)declination); LogActivityStart(ActivityMessageTypes.Other, " Get DestinationSideOfPier \r\n RA {0}\r\n Dec {1}:", raConverter, decConverter); CheckDevice(); PierSide retval = Service.DestinationSideOfPier(rightAscension, declination); string name = GetPierSideName(retval); LogActivityEnd(ActivityMessageTypes.Other, "{0} {1}", name, Done); return(retval); }
public void SyncToCoordinates(double rightAscension, double declination) { RightAscensionConverter raConverter = new RightAscensionConverter((decimal)rightAscension); DeclinationConverter decConverter = new DeclinationConverter((decimal)declination); LogActivityLine(ActivityMessageTypes.Commands, "SlewToCoordinates \r\nRA {0}\r\nDec {1}:", raConverter, decConverter); CheckDevice(); Service.SyncToCoordinates(rightAscension, declination); Status.Slewing = true; Status.TargetRightAscension = Service.TargetRightAscension; Status.TargetDeclination = Service.TargetDeclination; Status.RightAscension = Service.RightAscension; Status.Declination = Service.Declination; Status.Azimuth = Service.Azimuth; Status.Altitude = Service.Altitude; LogActivityLine(ActivityMessageTypes.Commands, "SyncToCoordinates: {0}", Done); }
private void EditRightAscension() { decimal ra = Double.IsNaN( TargetRightAscension ) ? 0.0m : (decimal)TargetRightAscension; RightAscensionConverter converter = new RightAscensionConverter( ra ); RightAscensionValuesEntryViewModel vm = new RightAscensionValuesEntryViewModel(); vm.InitializeValues( converter.Values ); IDialogService svc = ServiceContainer.Instance.GetService<IDialogService>(); bool? result = svc.ShowDialog( vm ); if ( result.HasValue && result.Value ) { int[] values = vm.GetValues(); converter = new RightAscensionConverter( values ); TargetRightAscension = (double)converter.Value; } vm.Dispose(); vm = null; }