94 lines
2.7 KiB
C++
94 lines
2.7 KiB
C++
#pragma once
|
||
#pragma once
|
||
#ifndef BASETOOL_H
|
||
#define BASETOOL_H
|
||
|
||
///
|
||
/// 基本类、基本函数
|
||
///
|
||
//#define EIGEN_USE_MKL_ALL
|
||
//#define EIGEN_VECTORIZE_SSE4_2
|
||
//#include <mkl.h>
|
||
|
||
//#include <mkl.h>
|
||
#include <complex>
|
||
#include <iostream>
|
||
#include <Eigen/Core>
|
||
#include <Eigen/Dense>
|
||
#include <time.h>
|
||
#include <string>
|
||
#include <omp.h>
|
||
#include "referenceHeader.h"
|
||
#include <gdal.h>
|
||
#include <gdal_priv.h>
|
||
#include <gdalwarper.h>
|
||
#include <ogrsf_frmts.h>
|
||
#include <fstream>
|
||
#include "GeoOperator.h"
|
||
#include <vector>
|
||
#include <string>
|
||
|
||
|
||
using namespace std;
|
||
using namespace Eigen;
|
||
|
||
|
||
///////////////////////////////////// 运行时间打印 //////////////////////////////////////////////////////////
|
||
|
||
|
||
QString getCurrentTimeString();
|
||
QString getCurrentShortTimeString();
|
||
|
||
std::vector<QString> splitString(const QString& str, char delimiter);
|
||
|
||
|
||
|
||
/////////////////////////////// 基本图像类 结束 //////////////////////////////////////////////////////////
|
||
|
||
string Convert(float Num);
|
||
QString JoinPath(const QString& path, const QString& filename);
|
||
|
||
////////////////////////////// 坐标部分基本方法 //////////////////////////////////////////
|
||
|
||
|
||
////////////////////////////// 坐标部分基本方法 //////////////////////////////////////////
|
||
|
||
|
||
////////////////////////////// 插值 ////////////////////////////////////////////
|
||
|
||
complex<double> Cubic_Convolution_interpolation(double u, double v, Eigen::MatrixX<complex<double>> img);
|
||
|
||
complex<double> Cubic_kernel_weight(double s);
|
||
|
||
double Bilinear_interpolation(Landpoint p0, Landpoint p11, Landpoint p21, Landpoint p12, Landpoint p22);
|
||
|
||
bool onSegment(Point_3d Pi, Point_3d Pj, Point_3d Q);
|
||
|
||
Point_3d invBilinear(Point_3d p, Point_3d a, Point_3d b, Point_3d c, Point_3d d);
|
||
|
||
|
||
|
||
//
|
||
// WGS84 到J2000 坐标系的变换
|
||
// 参考网址:https://blog.csdn.net/hit5067/article/details/116894616
|
||
// 资料网址:http://celestrak.org/spacedata/
|
||
// 参数文件:
|
||
// a. Earth Orientation Parameter 文件: http://celestrak.org/spacedata/EOP-Last5Years.csv
|
||
// b. Space Weather Data 文件: http://celestrak.org/spacedata/SW-Last5Years.csv
|
||
// 备注:上述文件是自2017年-五年内
|
||
/**
|
||
在wgs84 坐标系转到J2000 坐标系 主要 涉及到坐标的相互转换。一般给定的WGS坐标为 给定时刻的 t ,BLH
|
||
转换步骤:
|
||
step 1: WGS 84 转换到协议地球坐标系
|
||
step 2: 协议地球坐标系 转换为瞬时地球坐标系
|
||
step 3: 瞬时地球坐标系 转换为 瞬时真天球坐标系
|
||
step 4: 瞬时真天球坐标系 转到瞬时平天球 坐标系
|
||
step 5: 瞬时平天球坐标系转换为协议天球坐标系(J2000)
|
||
**/
|
||
|
||
|
||
double sind(double degree);
|
||
|
||
double cosd(double d);
|
||
|
||
#endif |