Fixed issue with Target RA and Dec loosing precision
This commit is contained in:
@@ -395,13 +395,14 @@ namespace ASCOM.MeadeAutostar497.Controller
|
|||||||
if (_targetRightAscension == INVALID_PARAMETER)
|
if (_targetRightAscension == INVALID_PARAMETER)
|
||||||
throw new ASCOM.InvalidOperationException("Target not set");
|
throw new ASCOM.InvalidOperationException("Target not set");
|
||||||
|
|
||||||
var result = SerialPort.CommandTerminated(":Gr#", "#");
|
//var result = SerialPort.CommandTerminated(":Gr#", "#");
|
||||||
//:Gr# Get current/target object RA
|
////:Gr# Get current/target object RA
|
||||||
//Returns: HH: MM.T# or HH:MM:SS
|
////Returns: HH: MM.T# or HH:MM:SS
|
||||||
//Depending upon which precision is set for the telescope
|
////Depending upon which precision is set for the telescope
|
||||||
|
|
||||||
double targetRa = HmsToDouble(result);
|
//double targetRa = HmsToDouble(result);
|
||||||
return targetRa;
|
//return targetRa;
|
||||||
|
return _targetRightAscension;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
@@ -437,15 +438,15 @@ namespace ASCOM.MeadeAutostar497.Controller
|
|||||||
if (_targetDeclination == INVALID_PARAMETER)
|
if (_targetDeclination == INVALID_PARAMETER)
|
||||||
throw new ASCOM.InvalidOperationException("Target not set");
|
throw new ASCOM.InvalidOperationException("Target not set");
|
||||||
|
|
||||||
var result = SerialPort.CommandTerminated(":Gd#", "#");
|
//var result = SerialPort.CommandTerminated(":Gd#", "#");
|
||||||
//:Gd# Get Currently Selected Object/Target Declination
|
////:Gd# Get Currently Selected Object/Target Declination
|
||||||
//Returns: sDD* MM# or sDD*MM’SS#
|
////Returns: sDD* MM# or sDD*MM’SS#
|
||||||
//Depending upon the current precision setting for the telescope.
|
////Depending upon the current precision setting for the telescope.
|
||||||
|
|
||||||
double targetDec = DmsToDouble(result);
|
//double targetDec = DmsToDouble(result);
|
||||||
|
|
||||||
return targetDec;
|
|
||||||
|
|
||||||
|
//return targetDec;
|
||||||
|
return _targetDeclination;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user