Skip to content

Commit

Permalink
Fix bug in dome altitude slewing
Browse files Browse the repository at this point in the history
  • Loading branch information
astroman133 committed Dec 8, 2023
1 parent f14bd16 commit e3be41b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
26 changes: 14 additions & 12 deletions ConformanceTests/TelescopeDriverConformance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public TestContext TestContext
private static int _valueNotSet2;
private static double _saneAltitude = 50.0;
private static double _saneAzimuth = 135.0;
private static double _tolerance = 0.02;
private static double _tolerance = 0.05;

private static Telescope Telescope { get; set; }
private static Util Util { get; set; }
Expand Down Expand Up @@ -511,36 +511,38 @@ private void TestSyncToAltAz_Valid()
try
{
// Reduce the Azimuth by 4 minutes.

double trueAz = target.X - ( 4.0 / 60.0 );

// Reduce the Altitude by 1 degree;
// Given the sanity of the target, subtracting 1 degree should still be valid.

double trueAlt = target.Y - 1.0;

Telescope.SyncToAltAz( trueAz, trueAlt );
//Thread.Sleep( 5000 );
Thread.Sleep( 5000 );

double actualAz = Telescope.Azimuth;
double actualAlt = Telescope.Altitude;

if ( Math.Abs( trueAz - actualAz ) > _tolerance )
if ( Math.Abs(trueAz - actualAz) > _tolerance)
{
status = _error;
msg1 = String.Format( "Sync completed, but Azimuth does not match - Expected = {0}, Actual = {1}"
, trueAz, actualAz );
msg1 = String.Format("Sync completed, but Azimuth does not match - Expected = {0}, Actual = {1}"
, trueAz, actualAz);
}
else if ( Math.Abs( trueAlt - actualAlt ) > _tolerance )
else if (Math.Abs(trueAlt - actualAlt) > _tolerance)
{
status = _error;
msg1 = String.Format( "Sync completed, but Altitude does not match - Expected = {0}, Actual = {1}"
, trueAlt, actualAlt );
msg1 = String.Format("Sync completed, but Altitude does not match - Expected = {0}, Actual = {1}"
, trueAlt, actualAlt);
}
else
{
string text = Util.DegreesToDMS( trueAz, ":", ":", "", 2 );
msg1 = String.Format( "Synced to sync position OK. AZ: {0}", text );
text = Util.DegreesToDMS( trueAlt, ":", ":", "", 2 );
msg2 = String.Format( "Synced to sync position OK. ALT: {0}", text );
string text = Util.DegreesToDMS(trueAz, ":", ":", "", 2);
msg1 = String.Format("Synced to sync position OK. AZ: {0}", text);
text = Util.DegreesToDMS(trueAlt, ":", ":", "", 2);
msg2 = String.Format("Synced to sync position OK. ALT: {0}", text);
}
}
catch ( Exception xcp )
Expand Down
2 changes: 1 addition & 1 deletion DeviceHub/DeviceManagers/DomeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ private void SlaveDomePointing( Point scopePosition, double localHourAngle, Pier
//{
// SlewToAltitude( targetAltitude );
//}, CancellationToken.None );
SlewToAzimuth( targetAltitude );
SlewToAltitude( targetAltitude );
moving = true;
}

Expand Down
6 changes: 3 additions & 3 deletions Inno Setup/ASCOM Device Hub Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
;

#define MyAppName "ASCOM.DeviceHub"
#define MyAppVersion "6.6.1.3"
#define MyAppVersion "6.6.1.4"
#define MyDestSubdirName "DeviceHub"
; #define MyPlatformRoot "D:\Github Repos\ASCOMPlatform\"
#define MyPlatformRoot "D:\My Projects\Visual Studio 2022\Ascom\"
Expand All @@ -28,8 +28,8 @@ OutputBaseFilename={#MyAppName}({#MyAppVersion})_setup
Compression=lzma
SolidCompression=yes
; Put there by Platform if Driver Installer Support selected
WizardImageFile="D:\Github Repos\ASCOMPlatform\Driver Inst\InstallerGen\Graphics\WizardImage.bmp"
LicenseFile="D:\Github Repos\ASCOMPlatform\Driver Inst\InstallerGen\License\CreativeCommons.txt"
WizardImageFile="D:\Github Repos\ASCOM\Platform\Driver Inst\InstallerGen\Graphics\WizardImage.bmp"
LicenseFile="D:\Github Repos\ASCOM\Platform\Driver Inst\InstallerGen\License\CreativeCommons.txt"
UninstallFilesDir="{cf}\ASCOM\Uninstall\{#MyDestSubdirName}"
; SourceDir="{#MyPlatformRoot}Drivers and Simulators\ASCOM Device Hub\DeviceHub\bin\Release"
SourceDir="{#MyPlatformRoot}ASCOMDeviceHub\DeviceHub\bin\Release"
Expand Down
2 changes: 1 addition & 1 deletion ProductAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "6.6.1.3" )]
[assembly: AssemblyVersion( "6.6.1.4" )]

0 comments on commit e3be41b

Please sign in to comment.