2024-12-24 02:50:25 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
/*****************************************************************//**
|
|
|
|
|
* \file EchoDataFormat.h
|
|
|
|
|
* \brief <EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еĸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
|
|
|
|
*
|
|
|
|
|
* \author 30453
|
|
|
|
|
* \date October 2024
|
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "BaseConstVariable.h"
|
|
|
|
|
|
|
|
|
|
#include <complex>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <Eigen/Core>
|
|
|
|
|
#include <Eigen/Dense>
|
|
|
|
|
#include <omp.h>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <io.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "BaseTool.h"
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <fstream>
|
|
|
|
|
#include <complex>
|
|
|
|
|
#include <gdal.h>
|
|
|
|
|
#include <gdal_priv.h>
|
|
|
|
|
#include <gdalwarper.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <cpl_conv.h> // for CPLMalloc()
|
|
|
|
|
|
|
|
|
|
//========================================================================
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>ʽ
|
|
|
|
|
// file type:
|
|
|
|
|
// PRFCOUNT
|
|
|
|
|
// PRFPOINT
|
|
|
|
|
// nearRange
|
|
|
|
|
// farRange
|
|
|
|
|
// PRF1,time,Px,Py,Pz,Vx,Vy,Vz
|
|
|
|
|
// PRF2,time,Px,Py,Pz,Vx,Vy,Vz
|
|
|
|
|
// ------------------ <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD> --------------------------------------
|
|
|
|
|
// PRF1,time,Px,Py,Pz,Vx,Vy,Vz,PRFPOINT,RealData,imagData
|
|
|
|
|
// PRF2,time,Px,Py,Pz,Vx,Vy,Vz,PRFPOINT,RealData,imagData
|
|
|
|
|
// --------------------------------------------------------------
|
|
|
|
|
// ע<><D7A2>Bp<42><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>ֻ<EFBFBD>ǹ<EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>Ĭ<EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֯
|
|
|
|
|
//========================================================================
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>õĻز<C4BB><D8B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ʽ
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD>--<2D><><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
struct PluseData {
|
|
|
|
|
long id; // PRF id
|
|
|
|
|
double time;// ʱ<><CAB1>
|
|
|
|
|
double Px; // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
double Py;
|
|
|
|
|
double Pz;
|
|
|
|
|
double Vx; // <20>ٶ<EFBFBD>
|
|
|
|
|
double Vy;
|
|
|
|
|
double Vz;
|
|
|
|
|
long plusePoints; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
std::shared_ptr<std::complex<double>> echoData; // <20>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
};
|
|
|
|
|
|
2025-02-02 14:06:45 +00:00
|
|
|
|
long BASECONSTVARIABLEAPI getPluseDataSize(PluseData& pluseData);
|
|
|
|
|
ErrorCode BASECONSTVARIABLEAPI getPluseDataFromBuffer(char* buffer, PluseData& data);
|
|
|
|
|
std::shared_ptr<PluseData> BASECONSTVARIABLEAPI CreatePluseDataArr(long pluseCount);
|
|
|
|
|
std::shared_ptr<std::complex<double>> BASECONSTVARIABLEAPI CreateEchoData(long plusePoints);
|
2024-12-24 02:50:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <20><>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
|
|
|
|
|
/// </summary>
|
|
|
|
|
struct PluseAntPos {
|
|
|
|
|
long id; // PRF id
|
|
|
|
|
double time;// ʱ<><CAB1>
|
|
|
|
|
double Px; // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
double Py;
|
|
|
|
|
double Pz;
|
|
|
|
|
double Vx; // <20>ٶ<EFBFBD>
|
|
|
|
|
double Vy;
|
|
|
|
|
double Vz;
|
|
|
|
|
};
|
2025-02-02 14:06:45 +00:00
|
|
|
|
std::shared_ptr<PluseAntPos> BASECONSTVARIABLEAPI CreatePluseAntPosArr(long pluseCount);
|
2024-12-24 02:50:25 +00:00
|
|
|
|
|
|
|
|
|
|
2025-03-05 09:10:21 +00:00
|
|
|
|
class BASECONSTVARIABLEAPI SatelliteAntPosOperator {
|
|
|
|
|
public:
|
|
|
|
|
static std::shared_ptr<SatelliteAntPos> readAntPosFile(QString filepath,long& count);
|
|
|
|
|
static void writeAntPosFile(QString filepath, std::shared_ptr< SatelliteAntPos> data,const long count);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-24 02:50:25 +00:00
|
|
|
|
// <20><><EFBFBD><EFBFBD>L0<4C><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-02-02 14:06:45 +00:00
|
|
|
|
class BASECONSTVARIABLEAPI EchoL0Dataset {
|
2024-12-24 02:50:25 +00:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
EchoL0Dataset();
|
|
|
|
|
~EchoL0Dataset();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ErrorCode OpenOrNew(QString folder, QString filename,long PluseCount,long PlusePoints);
|
|
|
|
|
ErrorCode Open(QString xmlfilepath);
|
|
|
|
|
ErrorCode Open(QString folder, QString filename);
|
|
|
|
|
QString getxmlName();
|
|
|
|
|
QString getGPSPointFilename();
|
|
|
|
|
QString getEchoDataFilename();
|
2025-03-06 05:43:56 +00:00
|
|
|
|
QString getGPSPointFilePath();
|
|
|
|
|
QString getEchoDataFilePath();
|
2025-01-08 05:50:02 +00:00
|
|
|
|
void initEchoArr(std::complex<double> init0);
|
2024-12-24 02:50:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: // <20><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
QString folder;
|
|
|
|
|
QString filename;
|
|
|
|
|
QString xmlname;
|
|
|
|
|
QString GPSPointFilename;
|
|
|
|
|
QString echoDataFilename;
|
|
|
|
|
//
|
|
|
|
|
QString xmlFilePath;
|
|
|
|
|
QString GPSPointFilePath;
|
|
|
|
|
QString echoDataFilePath;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
// Getter <20><> Setter <20><><EFBFBD><EFBFBD>
|
|
|
|
|
long getPluseCount() ;
|
|
|
|
|
void setPluseCount(long pulseCount);
|
|
|
|
|
|
|
|
|
|
long getPlusePoints() ;
|
|
|
|
|
void setPlusePoints(long pulsePoints);
|
|
|
|
|
|
|
|
|
|
double getNearRange() ;
|
|
|
|
|
void setNearRange(double nearRange);
|
|
|
|
|
|
|
|
|
|
double getFarRange() ;
|
|
|
|
|
void setFarRange(double farRange);
|
|
|
|
|
|
|
|
|
|
double getCenterFreq() ;
|
|
|
|
|
void setCenterFreq(double freq);
|
|
|
|
|
|
|
|
|
|
double getFs() ;
|
|
|
|
|
void setFs(double samplingFreq);
|
|
|
|
|
|
|
|
|
|
QString getSimulationTaskName() ;
|
|
|
|
|
void setSimulationTaskName(const QString& taskName);
|
|
|
|
|
|
|
|
|
|
double getCenterAngle();
|
|
|
|
|
void setCenterAngle(double angle);
|
|
|
|
|
|
|
|
|
|
QString getLookSide();
|
|
|
|
|
void setLookSide(QString lookside);
|
|
|
|
|
|
2025-01-02 10:53:33 +00:00
|
|
|
|
double getBandwidth();
|
|
|
|
|
void setBandwidth(double Inbandwidth);
|
|
|
|
|
|
2024-12-24 02:50:25 +00:00
|
|
|
|
SatelliteAntPos getSatelliteAntPos(long plusePRFID);
|
2025-01-06 11:56:45 +00:00
|
|
|
|
|
|
|
|
|
void setRefPhaseRange(double refRange);
|
2025-02-24 10:53:35 +00:00
|
|
|
|
double getRefPhaseRange();
|
2024-12-24 02:50:25 +00:00
|
|
|
|
// <20><>ӡ<EFBFBD><D3A1>Ϣ<EFBFBD>ij<EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
|
|
|
|
|
void printInfo() ;
|
|
|
|
|
|
|
|
|
|
private: // <20>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
long PluseCount;
|
|
|
|
|
long PlusePoints;
|
|
|
|
|
double NearRange;
|
|
|
|
|
double FarRange;
|
|
|
|
|
double centerFreq; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
|
|
|
|
|
double Fs; // <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
|
|
|
|
|
QString simulationTaskName;
|
|
|
|
|
|
|
|
|
|
double CenterAngle;
|
|
|
|
|
QString LookSide;
|
2025-01-06 11:56:45 +00:00
|
|
|
|
double refPhaseRange;
|
2025-01-02 10:53:33 +00:00
|
|
|
|
double bandwidth;
|
|
|
|
|
|
2024-12-24 02:50:25 +00:00
|
|
|
|
public: // <20><>д XML <20>ĺ<EFBFBD><C4BA><EFBFBD>
|
|
|
|
|
void saveToXml();
|
|
|
|
|
ErrorCode loadFromXml();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// <20><>ȡ<EFBFBD>ļ<EFBFBD>
|
|
|
|
|
std::shared_ptr<double> getAntPos();
|
2025-03-04 08:18:35 +00:00
|
|
|
|
std::shared_ptr<std::complex<double>> getEchoArr(long startPRF, long& PRFLen);
|
2025-01-08 05:50:02 +00:00
|
|
|
|
std::shared_ptr<std::complex<double>> getEchoArr();
|
2024-12-24 02:50:25 +00:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
ErrorCode saveAntPos(std::shared_ptr<double> ptr); // ע<><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>д<EFBFBD><D0B4>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ȷ
|
2025-01-08 05:50:02 +00:00
|
|
|
|
ErrorCode saveEchoArr(std::shared_ptr<std::complex<double>> echoPtr, long startPRF, long PRFLen);
|
2024-12-24 02:50:25 +00:00
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|