修改前同步
parent
d5cc984434
commit
f9537bdaf8
|
@ -163,7 +163,7 @@ ErrorCode EchoL0Dataset::OpenOrNew(QString folder, QString filename, long PluseC
|
|||
CPLSetConfigOption("GDAL_FILENAME_IS_UTF8", "YES");
|
||||
|
||||
GDALDriver* poDriver = GetGDALDriverManager()->GetDriverByName("ENVI");
|
||||
std::shared_ptr<GDALDataset> poDstDS(poDriver->Create(this->echoDataFilePath.toUtf8().constData(), PlusePoints, PluseCount, 1, GDT_CFloat64, NULL));
|
||||
std::shared_ptr<GDALDataset> poDstDS(poDriver->Create(this->echoDataFilePath.toUtf8().constData(), PlusePoints, PluseCount, 1, GDT_CFloat32, NULL));
|
||||
GDALFlushCache((GDALDatasetH)poDstDS.get());
|
||||
poDstDS.reset();
|
||||
omp_unset_lock(&lock); //
|
||||
|
@ -500,7 +500,7 @@ std::shared_ptr<double> EchoL0Dataset::getAntPos()
|
|||
return temp;
|
||||
}
|
||||
|
||||
std::shared_ptr<std::complex<double>> EchoL0Dataset::getEchoArr(long startPRF, long PRFLen)
|
||||
std::shared_ptr<std::complex<float>> EchoL0Dataset::getEchoArr(long startPRF, long PRFLen)
|
||||
{
|
||||
if (!(startPRF < this->PluseCount)) {
|
||||
qDebug() << QString::fromStdString(errorCode2errInfo(ErrorCode::ECHO_L0DATA_PRFIDXOUTRANGE))<<startPRF<<" "<<this->PluseCount;
|
||||
|
@ -527,13 +527,13 @@ std::shared_ptr<std::complex<double>> EchoL0Dataset::getEchoArr(long startPRF, l
|
|||
long width = rasterDataset->GetRasterXSize();
|
||||
long height = rasterDataset->GetRasterYSize();
|
||||
long band_num = rasterDataset->GetRasterCount();
|
||||
std::shared_ptr<std::complex<double>> temp = nullptr;
|
||||
std::shared_ptr<std::complex<float>> temp = nullptr;
|
||||
if (height != this->PluseCount || width != this->PlusePoints) {
|
||||
qDebug() << QString::fromStdString(errorCode2errInfo(ErrorCode::ECHO_L0DATA_ECHOFILEFORMATERROR));
|
||||
}
|
||||
else {
|
||||
if (gdal_datatype == GDT_CFloat64) {
|
||||
temp= std::shared_ptr<std::complex<double>>(new std::complex<double>[PRFLen * width ], delArrPtr);
|
||||
temp= std::shared_ptr<std::complex<float>>(new std::complex<float>[PRFLen * width ], delArrPtr);
|
||||
poBand->RasterIO(GF_Read, 0, startPRF, width, PRFLen, temp.get(), width, PRFLen, GDT_CFloat64, 0, 0);
|
||||
GDALFlushCache((GDALDatasetH)rasterDataset.get());
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ std::shared_ptr<std::complex<double>> EchoL0Dataset::getEchoArr(long startPRF, l
|
|||
return temp;
|
||||
}
|
||||
|
||||
std::shared_ptr<std::complex<double>> EchoL0Dataset::getEchoArr()
|
||||
std::shared_ptr<std::complex<float>> EchoL0Dataset::getEchoArr()
|
||||
{
|
||||
return this->getEchoArr(0,this->PluseCount);
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ ErrorCode EchoL0Dataset::saveAntPos(std::shared_ptr<double> ptr)
|
|||
return ErrorCode::SUCCESS;
|
||||
}
|
||||
|
||||
ErrorCode EchoL0Dataset::saveEchoArr(std::shared_ptr<std::complex<double>> echoPtr, long startPRF, long PRFLen)
|
||||
ErrorCode EchoL0Dataset::saveEchoArr(std::shared_ptr<std::complex<float>> echoPtr, long startPRF, long PRFLen)
|
||||
{
|
||||
if (!(startPRF < this->PluseCount)) {
|
||||
qDebug() << QString::fromStdString(errorCode2errInfo(ErrorCode::ECHO_L0DATA_PRFIDXOUTRANGE));
|
||||
|
|
|
@ -176,11 +176,11 @@ public: //
|
|||
public:
|
||||
// 读取文件
|
||||
std::shared_ptr<double> getAntPos();
|
||||
std::shared_ptr<std::complex<double>> getEchoArr(long startPRF, long PRFLen);
|
||||
std::shared_ptr<std::complex<double>> getEchoArr();
|
||||
std::shared_ptr<std::complex<float>> getEchoArr(long startPRF, long PRFLen);
|
||||
std::shared_ptr<std::complex<float>> getEchoArr();
|
||||
//保存文件
|
||||
ErrorCode saveAntPos(std::shared_ptr<double> ptr); // 注意这个方法很危险,请写入前检查数据是否正确
|
||||
ErrorCode saveEchoArr(std::shared_ptr<std::complex<double>> echoPtr, long startPRF, long PRFLen);
|
||||
ErrorCode saveEchoArr(std::shared_ptr<std::complex<float>> echoPtr, long startPRF, long PRFLen);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -978,6 +978,7 @@ void RTPCProcessMain(long num_thread, QString TansformPatternFilePath, QString R
|
|||
qDebug() << "BandWidth: " << task->getBandWidth();
|
||||
qDebug() << "CenterFreq: " << task->getCenterFreq();
|
||||
qDebug() << "PRF: " << task->getPRF();
|
||||
qDebug() << "Lamda: " << task->getCenterLamda();
|
||||
qDebug() << "Fs: " << task->getFs();
|
||||
qDebug() << "POLAR: " << task->getPolarType();
|
||||
qDebug() << "NearRange: " << task->getNearRange();
|
||||
|
|
|
@ -26,7 +26,7 @@ void CreatePixelXYZ(std::shared_ptr<EchoL0Dataset> echoL0ds, QString outPixelXYZ
|
|||
double dx = LIGHTSPEED / 2 / echoL0ds->getFs();
|
||||
double Rnear = echoL0ds->getNearRange();
|
||||
|
||||
long echocol = 1073741824 / 8 / 4 / prfcount*32;
|
||||
long echocol = 1073741824 / 8 / 4 / prfcount*8;
|
||||
std::cout << "echocol:\t " << echocol << std::endl;
|
||||
echocol = echocol < 3000 ? 3000 : echocol;
|
||||
long startcolidx = 0;
|
||||
|
|
Loading…
Reference in New Issue