You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
privateconstdoubleARCSECONDS_PER_RA_SECOND=15.0;// To convert "seconds of RA" (24 hours = a whole circle) to arc seconds (360 degrees = a whole circle)
privateconstdoubleSIDEREAL_RATE_DEG_PER_SIDEREAL_SECOND=360.0/(24.0*60.0*60.0);// Degrees per sidereal second, given the earth's rotation of 360 degrees in 1 sidereal day
78
+
privateconstdoubleSIDEREAL_RATE_DEG_PER_SI_SECOND=SIDEREAL_RATE_DEG_PER_SIDEREAL_SECOND/SIDEREAL_SECONDS_TO_SI_SECONDS;// Degrees per SI second
// Determine the changes in current axis position and target axis position required as a result of tracking
664
668
if(Tracking)// Tracking is enabled
665
669
{
666
-
doublehaChange=GetTrackingChange(timeInSecondsSinceLastUpdate);// Find the hour angle change that occurred during this interval
670
+
doublehaChange=GetTrackingChangeInDegrees(timeInSecondsSinceLastUpdate);// Find the hour angle change (in degrees )that occurred during this interval
667
671
switch(alignmentMode)
668
672
{
669
673
caseAlignmentMode.GermanPolar:// In polar aligned mounts an HA change moves only the RA (primary) axis so update this, no change is required to the Dec (secondary) axis
670
674
caseAlignmentMode.Polar:
671
-
change.X=haChange;// Set the change in the RA (primary) current axis position due to tracking
675
+
change.X=haChange;// Set the change in the RA (primary) current axis position due to tracking
672
676
targetAxes.X+=haChange;// Update the slew target's RA (primary) axis position that will also have changed due to tracking
673
677
break;
674
-
675
678
caseAlignmentMode.AltAz:// In Alt/Az aligned mounts the HA change moves both RA (primary) and Dec (secondary) axes so both need to be updated
676
679
change=ConvertRateToAltAz(haChange);// Set the change in the Azimuth (primary) and Altitude (secondary) axis positions due to tracking
677
680
targetAxes=MountFunctions.ConvertRaDecToAxes(targetRaDec,false);// Update the slew target's Azimuth (primary) and Altitude (secondary) axis positions that will also have changed due to tracking
678
681
break;
679
682
}
680
683
681
-
// We are tracking so apply any RightAScensionRate and DeclinationRate rate offsets, this assumes a polar mount.
684
+
// We are tracking so apply any RightAScensionRate and DeclinationRate rate offsets, this assumes a polar mount.
682
685
// This correction is not applied when MoveAxis is in effect because the interface specification says it is one or the other of these and not both at the same time
TL.LogMessage(LogLevel.Verbose,"MoveAxes",$"Time since last update: {timeInSecondsSinceLastUpdate} seconds. "+
690
+
$"Mount RA normal tracking movment: {changePreOffset.X} degrees. "+
691
+
$"RA normal tracking movement rate {changePreOffset.X*DEGREES_TO_ARCSECONDS/timeInSecondsSinceLastUpdate} arcseconds per SI second. "+
692
+
$"Length of sideral day at this tracking rate = {Utilities.HoursToHMS(1.0/(changePreOffset.X/timeInSecondsSinceLastUpdate)*(360.0/3600.0),":",":","",3)}. hh:mm:ss.xxx"+
$"RA movement rate including any RightAscensionrate additional movement: {change.X*DEGREES_TO_ARCSECONDS/timeInSecondsSinceLastUpdate} arcseconds per SI second. "
@@ -1280,7 +1292,7 @@ public static double DeclinationRate
1280
1292
set
1281
1293
{
1282
1294
rateRaDecOffsetExternal.Y=value;// Save the provided rate to be returned through the Get property
1283
-
rateRaDecOffsetInternal.Y=value*ARCSEC_TO_DEGREES;// Save the rate in the internal units that the simulator uses
1295
+
rateRaDecOffsetInternal.Y=value*ARCSECONDS_TO_DEGREES;// Save the rate in the internal units that the simulator uses
1284
1296
}
1285
1297
}
1286
1298
@@ -1367,14 +1379,28 @@ public static int DateDelta
1367
1379
}
1368
1380
}
1369
1381
1370
-
// converts the rate between seconds per sidereal second and seconds per second
1382
+
/// <summary>
1383
+
/// Manages RightAscensionRate. Units are "seconds of RA per sidereal second".
1384
+
/// </summary>
1385
+
/// <remarks>
1386
+
/// 1) This property retains the value supplied by set RightAscensionRate in the rateRaDecOffsetExternal.X vector element so that it can be returned by get RightAscensionRate.
1387
+
/// 2) The set RightAscensionRate value is also converted to the internal units used by the simulator (arcsec per SI second) and stored in the rateRaDecOffsetInternal.X vector element
1388
+
/// </remarks>
1371
1389
publicstaticdoubleRightAscensionRate
1372
1390
{
1373
1391
get{returnrateRaDecOffsetExternal.X;}
1374
1392
set
1375
1393
{
1376
-
rateRaDecOffsetExternal.X=value;// Save the provided rate to be returned through the Get property
1377
-
rateRaDecOffsetInternal.X=value*SIDEREAL_SECONDS_TO_SI_SECONDS*ARCSEC_TO_DEGREES;// Save the rate in the internal units that the simulator uses
1394
+
// Save the provided rate (seconds of RA per sidereal second) to be returned through the Get property
1395
+
rateRaDecOffsetExternal.X=value;
1396
+
1397
+
// Save the provided rate for internal use in the units (degrees per SI second) that the simulator uses.
1398
+
// SIDEREAL_SECONDS_TO_SI_SECONDS converts from sidereal seconds to SI seconds
1399
+
// Have to divide by the SIDEREAL_SECONDS_TO_SI_SECONDS conversion factor (0.99726956631945) because SI seconds are longer than sidereal seconds and hence the simulator movement will be greater in one SI second than in one sidereal second
1400
+
// ARCSECONDS_PER_RA_SECOND converts from seconds of RA (1 circle = 24 hours) to arcseconds (1 circle = 360 degrees)
1401
+
// ARCSECONDS_TO_DEGREES converts from arc seconds to degrees
TL.LogMessage(LogLevel.Information,"RightAscensionRate Set",$"Value to be set (as received): {value} seconds per sidereal second. Converted to internal rate of: {value/SIDEREAL_SECONDS_TO_SI_SECONDS} seconds per SI second = {rateRaDecOffsetInternal.X} degrees per SI second.");
0 commit comments