Skip to content

Commit 1487468

Browse files
committed
update
1 parent 62582d9 commit 1487468

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5265
-4362
lines changed

BaseDefine.h

100644100755
File mode changed.

Common.cpp

100644100755
File mode changed.

Common.h

100644100755
File mode changed.

Dimap.cpp

100644100755
+1,513-1,513
Large diffs are not rendered by default.

Dimap.h

100644100755
+155-155
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,155 @@
1-
// Dimap.h: interface for the CDimap class.
2-
//
3-
//////////////////////////////////////////////////////////////////////
4-
5-
#if !defined(AFX_DIMAP_H__A7A24405_EE52_4F53_95FE_FDD167FB6B99__INCLUDED_)
6-
#define AFX_DIMAP_H__A7A24405_EE52_4F53_95FE_FDD167FB6B99__INCLUDED_
7-
8-
#if _MSC_VER > 1000
9-
#pragma once
10-
#endif // _MSC_VER > 1000
11-
12-
#include "Kernel.h"
13-
#include "RealVector.h"
14-
#include "FArray.hpp"
15-
16-
class CDimap
17-
{
18-
typedef enum
19-
{
20-
HJ1A,
21-
HJ1B
22-
}SATELLITEID;
23-
typedef enum
24-
{
25-
HJ1A_CCD1 = 0,
26-
HJ1A_CCD2 = 1,
27-
HJ1A_HSI = 2,
28-
HJ1B_CCD1 = 3,
29-
HJ1B_CCD2 = 4,
30-
HJ1B_IRS = 5,
31-
HJ1A_CCD = 6,
32-
HJ1B_CCD = 7
33-
}SENSORTYPE;
34-
typedef struct _tagCCDCamera
35-
{
36-
double lfFocus;
37-
double* sx;
38-
double* sy;
39-
double lfScanSize;
40-
double lfRoll;
41-
double lfPitch;
42-
double lfYaw;
43-
int nCCDLength;
44-
45-
_tagCCDCamera()
46-
{
47-
nCCDLength=12000;
48-
sx=NULL;
49-
sy=NULL;
50-
};
51-
~_tagCCDCamera()
52-
{
53-
if(sx!=NULL)
54-
{
55-
delete [] sx;
56-
sx=NULL;
57-
}
58-
if(sy!=NULL)
59-
{
60-
delete [] sy;
61-
sy=NULL;
62-
}
63-
};
64-
}CCDCamera;
65-
66-
typedef struct _tagScanCamera
67-
{
68-
double lfFocus;
69-
double sx;
70-
double* sy;
71-
double lfScanSize;
72-
double lfRoll;
73-
double lfPitch;
74-
double lfYaw;
75-
int nScanLength;
76-
double lfPixelFOV;
77-
double lfPixelTime;
78-
int nScanFrame;
79-
80-
_tagScanCamera()
81-
{
82-
nScanLength=4500;
83-
nScanFrame=20;
84-
sx=0;
85-
sy=NULL;
86-
};
87-
~_tagScanCamera()
88-
{
89-
if(sy!=NULL)
90-
{
91-
delete [] sy;
92-
sy=NULL;
93-
}
94-
};
95-
}ScanCamera;
96-
97-
typedef struct _tagEphemeris
98-
{
99-
CRealVector P;//位置
100-
CRealVector V;//速度
101-
double t;
102-
}Ephemeris;
103-
104-
typedef struct _tagAttitude
105-
{
106-
double YAW;
107-
double PITCH;
108-
double ROLL;
109-
double t;
110-
}Attitude;
111-
112-
public:
113-
HRESULT Image2Map(int nRow, int nCol, double fHeight, double *pGX, double *pGY);
114-
CDimap();
115-
virtual ~CDimap();
116-
117-
HRESULT Image2Geodetic(int nRow,int nCol,double fHeight,double* pLat,double* pLon,double* pAltitude);
118-
HRESULT Initialize(char* pszAuxFile,char* pszEphFile,char* pszAttFile,char* pszCamFile);
119-
HRESULT ContrustRPC(char* pszRPCFile);
120-
HRESULT Geodetic2Map(double Latitude, double Longitude, double * pX, double * pY); // Lat/Lon --> Geodetic coordinate. [WeiZ,4/21/2009]
121-
protected:
122-
void MultipleMatrix(double * m1 , double *m2 , double * multiple, int nDimension);
123-
void InitializeCamera(char* pszCamFile);
124-
void CreateRotMatrixPOK(double phi, double omega, double kappa, double rotMatrix[3][3]);
125-
void CreateRotMatrixPOK2(double phi, double omega, double kappa, double rotMatrix[3][3]);
126-
Attitude AttitudeDate(double fDate);
127-
Ephemeris EphemerisDate(double fDate);
128-
double LineDate(int nLine);
129-
double PixelDate(int nRow,int nCol);
130-
double ParseTime(char* pszTime);
131-
void dnrml (double* aa,int n,double bb,double* a,double* b);
132-
void pnrml(double *aa, int n, double bb, double *a, double *b, double p);
133-
void dsolve (double* a,double* b,double* x,int n,int wide);
134-
void dldltban1 (double* a,double* d,double* l,int n,int wide);
135-
void dldltban2 (double* l,double* d,double* b,double* x,int n,int wide);
136-
137-
private:
138-
int m_nRows,m_nCols;//景行列数
139-
double m_fT0;//景中心成像时间
140-
double m_fLSP;//Line Sampling Period
141-
CFArray<Ephemeris> m_Ephemeris;//星历参数
142-
CFArray<Attitude> m_Attitude;//姿态参数
143-
CFArray<double> m_ScanFrameTime;//IRS帧扫描开始时间
144-
double m_fDatasetFrameLat[4];
145-
double m_fDatasetFrameLon[4];
146-
double m_fDatasetCenterLat;
147-
double m_fDatasetCenterLon;
148-
CProjectWGS84 m_Projection;
149-
CCDCamera m_CCDCamera[5];
150-
ScanCamera m_ScanCamera;
151-
SATELLITEID m_nSatelliteID;
152-
SENSORTYPE m_nSensorType;
153-
};
154-
155-
#endif // !defined(AFX_DIMAP_H__A7A24405_EE52_4F53_95FE_FDD167FB6B99__INCLUDED_)
1+
// Dimap.h: interface for the CDimap class.
2+
//
3+
//////////////////////////////////////////////////////////////////////
4+
5+
#if !defined(AFX_DIMAP_H__A7A24405_EE52_4F53_95FE_FDD167FB6B99__INCLUDED_)
6+
#define AFX_DIMAP_H__A7A24405_EE52_4F53_95FE_FDD167FB6B99__INCLUDED_
7+
8+
#if _MSC_VER > 1000
9+
#pragma once
10+
#endif // _MSC_VER > 1000
11+
12+
#include "Kernel.h"
13+
#include "RealVector.h"
14+
#include "FArray.hpp"
15+
16+
class CDimap
17+
{
18+
typedef enum
19+
{
20+
HJ1A,
21+
HJ1B
22+
}SATELLITEID;
23+
typedef enum
24+
{
25+
HJ1A_CCD1 = 0,
26+
HJ1A_CCD2 = 1,
27+
HJ1A_HSI = 2,
28+
HJ1B_CCD1 = 3,
29+
HJ1B_CCD2 = 4,
30+
HJ1B_IRS = 5,
31+
HJ1A_CCD = 6,
32+
HJ1B_CCD = 7
33+
}SENSORTYPE;
34+
typedef struct _tagCCDCamera
35+
{
36+
double lfFocus;
37+
double* sx;
38+
double* sy;
39+
double lfScanSize;
40+
double lfRoll;
41+
double lfPitch;
42+
double lfYaw;
43+
int nCCDLength;
44+
45+
_tagCCDCamera()
46+
{
47+
nCCDLength=12000;
48+
sx=NULL;
49+
sy=NULL;
50+
};
51+
~_tagCCDCamera()
52+
{
53+
if(sx!=NULL)
54+
{
55+
delete [] sx;
56+
sx=NULL;
57+
}
58+
if(sy!=NULL)
59+
{
60+
delete [] sy;
61+
sy=NULL;
62+
}
63+
};
64+
}CCDCamera;
65+
66+
typedef struct _tagScanCamera
67+
{
68+
double lfFocus;
69+
double sx;
70+
double* sy;
71+
double lfScanSize;
72+
double lfRoll;
73+
double lfPitch;
74+
double lfYaw;
75+
int nScanLength;
76+
double lfPixelFOV;
77+
double lfPixelTime;
78+
int nScanFrame;
79+
80+
_tagScanCamera()
81+
{
82+
nScanLength=4500;
83+
nScanFrame=20;
84+
sx=0;
85+
sy=NULL;
86+
};
87+
~_tagScanCamera()
88+
{
89+
if(sy!=NULL)
90+
{
91+
delete [] sy;
92+
sy=NULL;
93+
}
94+
};
95+
}ScanCamera;
96+
97+
typedef struct _tagEphemeris
98+
{
99+
CRealVector P;//位置
100+
CRealVector V;//速度
101+
double t;
102+
}Ephemeris;
103+
104+
typedef struct _tagAttitude
105+
{
106+
double YAW;
107+
double PITCH;
108+
double ROLL;
109+
double t;
110+
}Attitude;
111+
112+
public:
113+
HRESULT Image2Map(int nRow, int nCol, double fHeight, double *pGX, double *pGY);
114+
CDimap();
115+
virtual ~CDimap();
116+
117+
HRESULT Image2Geodetic(int nRow,int nCol,double fHeight,double* pLat,double* pLon,double* pAltitude);
118+
HRESULT Initialize(char* pszAuxFile,char* pszEphFile,char* pszAttFile,char* pszCamFile);
119+
HRESULT ContrustRPC(char* pszRPCFile);
120+
HRESULT Geodetic2Map(double Latitude, double Longitude, double * pX, double * pY); // Lat/Lon --> Geodetic coordinate. [WeiZ,4/21/2009]
121+
protected:
122+
void MultipleMatrix(double * m1 , double *m2 , double * multiple, int nDimension);
123+
void InitializeCamera(char* pszCamFile);
124+
void CreateRotMatrixPOK(double phi, double omega, double kappa, double rotMatrix[3][3]);
125+
void CreateRotMatrixPOK2(double phi, double omega, double kappa, double rotMatrix[3][3]);
126+
Attitude AttitudeDate(double fDate);
127+
Ephemeris EphemerisDate(double fDate);
128+
double LineDate(int nLine);
129+
double PixelDate(int nRow,int nCol);
130+
double ParseTime(char* pszTime);
131+
void dnrml (double* aa,int n,double bb,double* a,double* b);
132+
void pnrml(double *aa, int n, double bb, double *a, double *b, double p);
133+
void dsolve (double* a,double* b,double* x,int n,int wide);
134+
void dldltban1 (double* a,double* d,double* l,int n,int wide);
135+
void dldltban2 (double* l,double* d,double* b,double* x,int n,int wide);
136+
137+
private:
138+
int m_nRows,m_nCols;//景行列数
139+
double m_fT0;//景中心成像时间
140+
double m_fLSP;//Line Sampling Period
141+
CFArray<Ephemeris> m_Ephemeris;//星历参数
142+
CFArray<Attitude> m_Attitude;//姿态参数
143+
CFArray<double> m_ScanFrameTime;//IRS帧扫描开始时间
144+
double m_fDatasetFrameLat[4];
145+
double m_fDatasetFrameLon[4];
146+
double m_fDatasetCenterLat;
147+
double m_fDatasetCenterLon;
148+
CProjectWGS84 m_Projection;
149+
CCDCamera m_CCDCamera[5];
150+
ScanCamera m_ScanCamera;
151+
SATELLITEID m_nSatelliteID;
152+
SENSORTYPE m_nSensorType;
153+
};
154+
155+
#endif // !defined(AFX_DIMAP_H__A7A24405_EE52_4F53_95FE_FDD167FB6B99__INCLUDED_)

DpsErrorCode.h

100644100755
File mode changed.

FArray.hpp

100644100755
File mode changed.

GCProjection.cpp

100644100755
File mode changed.

GCProjection.h

100644100755
File mode changed.

GcpMatch.cpp

100644100755
File mode changed.

GcpMatch.h

100644100755
File mode changed.

0 commit comments

Comments
 (0)