SimsWorld/StandardGlobe/standardglobe.h

61 lines
980 B
C++

#pragma once
#include "standardglobe_global.h"
#include <qvector3d.h>
/// <summary>
/// 经纬高坐标系坐标
/// </summary>
struct LLAPos {
double _lon_deg = 0;
double _lat_deg = 0;
double _alt_m = 0;
};
/// <summary>
/// 地心坐标系
/// </summary>
struct ECEFPos {
double _x_pos = 0;
double _y_pos = 0;
double _z_pos = 0;
QVector3D getVec3() const;
};
/// <summary>
/// 东天北坐标系
/// </summary>
struct ENUPos {
double _e_pos = 0;
double _n_pos = 0;
double _t_pos = 0;
};
/// <summary>
/// 极坐标
/// </summary>
struct PolarPos {
double _dist_m = 0;
double _azimuth_deg = 0;
double _pitch_deg = 0;
};
/// <summary>
/// 标准球体坐标转换工具
/// </summary>
class STANDARDGLOBE_EXPORT StandardGlobe
{
private:
/// <summary>
/// 标准正球体星球直径
/// </summary>
static double _radius_m;
public:
StandardGlobe();
static ECEFPos llaToEcef(const LLAPos &v);
static void getDistanceWithin(const LLAPos &base, const LLAPos &target, double dist, double azi);
};