/// <summary> /// /// </summary> /// public SimulationMCU(SimulationAbsoluteEncoder azEncoder, SimulationAbsoluteEncoder elEncoder) { AzEncoder = azEncoder; ElEncoder = elEncoder; ActiveObjectiveOrientationMoveStart = DateTime.MinValue; ActiveObjectiveOrientation = null; ActiveObjectiveAzimuthProfile = null; ActiveObjectiveElevationProfile = null; RequestedStopType = SimulationStopTypeEnum.NONE; }
public void SetActiveObjectiveOrientationAndStartMove(Orientation orientationDegrees, bool forceLinear) { RequestedStopType = SimulationStopTypeEnum.NONE; ActiveObjectiveOrientation = orientationDegrees; if (forceLinear) { ActiveObjectiveAzimuthProfile = SimulationMCUTrajectoryProfile.ForceLinearInstance( AzEncoder, AzEncoder.CurrentPositionDegrees, 0.0, MCUConstants.SIMULATION_MCU_PEAK_VELOCITY, MCUConstants.SIMULATION_MCU_PEAK_ACCELERATION, orientationDegrees.Azimuth ); ActiveObjectiveElevationProfile = SimulationMCUTrajectoryProfile.ForceLinearInstance( ElEncoder, ElEncoder.CurrentPositionDegrees, 0.0, MCUConstants.SIMULATION_MCU_PEAK_VELOCITY, MCUConstants.SIMULATION_MCU_PEAK_ACCELERATION, orientationDegrees.Elevation ); } else { ActiveObjectiveAzimuthProfile = SimulationMCUTrajectoryProfile.CalculateInstance( AzEncoder, AzEncoder.CurrentPositionDegrees, 0.0, MCUConstants.SIMULATION_MCU_PEAK_VELOCITY, MCUConstants.SIMULATION_MCU_PEAK_ACCELERATION, orientationDegrees.Azimuth ); ActiveObjectiveElevationProfile = SimulationMCUTrajectoryProfile.CalculateInstance( ElEncoder, ElEncoder.CurrentPositionDegrees, 0.0, MCUConstants.SIMULATION_MCU_PEAK_VELOCITY, MCUConstants.SIMULATION_MCU_PEAK_ACCELERATION, orientationDegrees.Elevation ); } ActiveObjectiveOrientationMoveStart = DateTime.UtcNow; }