Fix getRorationMatrix bug with 1 motor position.

This commit is contained in:
sunwen
2023-05-30 15:37:23 +08:00
parent 0d1ea2afe4
commit bb1774c1fb

View File

@@ -98,7 +98,7 @@ TransFormInfo Recon::getTransformationMatrix(Parser* aParser, const Matrix& aMot
for(int i=0; i<maxMotorPosNum; ++i)
{
double rotation = movementsListReal.getData()[i];
double distance = movementsListReal.getData()[i + 2];
double distance = movementsListReal.getData()[i + maxMotorPosNum];
transformationMatrixListData[16*i + 0] = cos(rotation*PI/180);
transformationMatrixListData[16*i + 1] = sin(rotation*PI/180);
transformationMatrixListData[16*i + 4] = -sin(rotation*PI/180);
@@ -279,8 +279,8 @@ CEInfo Recon::getCEInfo(Parser* aParser, const MeasurementInfo aInfo)
}
else
{
double* ceData = new double[ceMeasuredLength];
std::copy(ceMeasuredData, ceMeasuredData + ceMeasuredLength, ceData);
double* ceData = new double[ceMeasuredLength * ceMeasuredPointer.getSize()];
std::copy(ceMeasuredData, ceMeasuredData + ceMeasuredLength * ceMeasuredPointer.getSize(), ceData);
ce = Matrix::fromRawData(ceData, ceMeasuredLength, ceMeasuredPointer.getSize());
}
if(aInfo.Bandpassundersampling)