Changeset 4508
- Timestamp:
- 08/05/04 06:01:46 (20 years ago)
- Location:
- trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/activemirrorcontrol.cpp
r4473 r4508 193 193 int iStateCaCo, iStateCalib, iStateSentinel, iStateHVPS, iStateLid; 194 194 int iStateLV, iStateCool, iStateHV, iStateDC, iStateCaosLEDs; 195 int iStateFADCFans, iStateCalCan, iStateCalIO, iStateCalLV , iStateAMCLEDs;195 int iStateFADCFans, iStateCalCan, iStateCalIO, iStateCalLV; 196 196 qts >> iStateCaCo >> iStateCalib >> iStateSentinel >> iStateHVPS >> iStateLid; 197 197 qts >> iStateLV >> iStateCool >> iStateHV >> iStateDC >> iStateCaosLEDs; 198 qts >> iStateFADCFans >> iStateCalCan >> iStateCalIO >> iStateCalLV >> iStateAMCLEDs;198 qts >> iStateFADCFans >> iStateCalCan >> iStateCalIO >> iStateCalLV; 199 199 int iStateAMC, iStateHEAT; 200 200 qts >> iStateAMC >> iStateHEAT; 201 201 int iStateLIDAR, iStateOptical, iStateL2T, iStateAUX, iStateGRB; 202 202 qts >> iStateLIDAR >> iStateOptical >> iStateL2T >> iStateAUX >> iStateGRB; 203 int iStateAMCLEDs; 204 qts >> iStateAMCLEDs; 203 205 double dZd, dAz, dDec, dRA; 204 206 qts >> dZd >> dAz >> dDec >> dRA; -
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amccmdserversocket.cpp
r3401 r4508 59 59 m_qtTimer.stop(); 60 60 m_qtTimer.start( CC_REPORT_TIMEOUT, true ); 61 //qDebug( msg );61 qDebug( msg ); 62 62 emit reportFromCC( msg ); 63 63 // m_pParent->setAMCState( iStatus ); -
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcdefs.h
r4478 r4508 16 16 ***************************************************************************/ 17 17 18 #define AMC_VERSION "2.0 1"18 #define AMC_VERSION "2.03" 19 19 20 20 #define CAMERA_X 344.0 // -
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/amcmirrorpanel.cpp
r4481 r4508 209 209 double dX = p_dX; 210 210 double dY = p_dY; 211 double dAlpha1 = atan( getSlopeX() ); 212 double dAlpha2 = atan( getSlopeY() ); 213 211 214 if( m_zReversed ) 212 215 { 213 216 dX = p_dY; 214 217 dY = p_dX; 218 // dAlpha1 = atan( getSlopeY() ); 219 // dAlpha2 = atan( getSlopeX() ); 215 220 } 216 // qDebug("Dx Dy: %4.0f %4.0f", dX, dY ); 217 218 double dAlpha1 = atan( getSlopeX() ); 219 double dAlpha2 = atan( getSlopeY() ); 220 // qDebug("alpha1, alpha2: %7.2f %7.2f", dAlpha1 * 180.0 / 3.1415, dAlpha2 * 180.0 / 3.1415 ); 221 qDebug("Dx Dy: %5.1f %5.1f", dX, dY ); 222 qDebug("SlopeX, SlopeY: %7.4f %7.4f", getSlopeY(), getSlopeX() ); 223 qDebug("alpha1, alpha2: %7.2f %7.2f", dAlpha1 * 180.0 / 3.1415, dAlpha2 * 180.0 / 3.1415 ); 221 224 222 225 double dSinA1 = sin( dAlpha1 ); … … 228 231 dFacX /= ( dCosA1 - dSinA1 * dCosA2 / dSinA2 ); 229 232 double dFacY = ( dY - dFacX * dSinA1 ) / dSinA2; 230 // qDebug("Factor x,y: %8.2f %8.2f", dFacX, dFacY ); 231 233 qDebug("Factor x,y: %8.2f %8.2f", dFacX, dFacY ); 234 235 p_iStepsX = (int) ( dFacX * getConversionX() ); 236 p_iStepsY = (int) ( dFacY * getConversionY() ); 232 237 if( m_zReversed ) 233 238 { 234 p_iStepsY = (int) ( dFacY * getConversionY() ); 235 p_iStepsX = (int) ( dFacX * getConversionX() ); 236 } 237 else 238 { 239 p_iStepsX = (int) ( dFacX * getConversionX() ); 240 p_iStepsY = (int) ( dFacY * getConversionY() ); 239 if(getSlopeX() < 0.0) 240 p_iStepsX = (int) ( dFacX * -1.0 * getConversionX() ); 241 if(getSlopeY() < 0.0) 242 p_iStepsY = (int) ( dFacY * -1.0 * getConversionY() ); 241 243 } 242 244 … … 253 255 void AMCMirrorPanel::getCorrectedRef( double& p_dRefX, double& p_dRefY ) 254 256 { 255 const double kPixelperMMX = 0.44;257 const double kPixelperMMX = -0.44; 256 258 const double kPixelperMMY = 0.44; 257 259 … … 270 272 271 273 /* 272 * We assume that the video camera is horizontally alligned with mirror dish.274 * We assume that the video camera is horizontally alligned with mirror dish. 273 275 * If we have a rotation of the video image in respect to the mirror frame we 274 276 * must add an extra correction here. 275 * As the coordinate system of the video image has a reversed Y axis ( 0rign being277 * As the coordinate system of the video image has a reversed Y axis ( origin being 276 278 * the upper left corner) we have to multiply the Y correction with -1. to get the right 277 279 * sign. … … 280 282 double dCorrSpotY = -1.0 * cos( dZeta ) * dCorrection; 281 283 282 p_dRefX += dCorrSpotY* kPixelperMMX;283 284 p_dRefX += dCorrSpotX * kPixelperMMX; 285 p_dRefY += dCorrSpotY * kPixelperMMY; 284 286 qDebug( "Laser spot position after applying correction: %f %f", p_dRefX, p_dRefY ); 285 287 } -
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/laseradjustthread.cpp
r4505 r4508 100 100 101 101 // check if the laser adjustment converged 102 double dX,dY;103 102 getSpot(); 104 getDistToRef(dX, dY);105 103 int x,y; 106 104 calcSteps( x, y ); … … 109 107 m_pPanel->setLaserOn( false ); 110 108 109 double dRefX, dRefY; 110 m_pPanel->getCorrectedRef( dRefX, dRefY ); 111 double dX, dY; 112 dX = dRefX - m_dSpotX; 113 dY = dRefY - m_dSpotY; 114 111 115 if( (fabs(dX) > 1.5) || (fabs(dY) > 1.5) ) 112 116 { … … 214 218 double dRefX; 215 219 double dRefY; 216 // dRefX = m_pPanel->getLaserX();217 // dRefY = m_pPanel->getLaserY();218 220 m_pPanel->getCorrectedRef( dRefX, dRefY ); 219 221
Note:
See TracChangeset
for help on using the changeset viewer.