重构改名
This commit is contained in:
parent
a8119869eb
commit
4e4b2ff9b4
|
@ -104,13 +104,13 @@
|
||||||
<ClCompile Include="componentbasic.cpp" />
|
<ClCompile Include="componentbasic.cpp" />
|
||||||
<ClCompile Include="DeduceFramework.cpp" />
|
<ClCompile Include="DeduceFramework.cpp" />
|
||||||
<ClCompile Include="InvisibleComponent.cpp" />
|
<ClCompile Include="InvisibleComponent.cpp" />
|
||||||
<ClCompile Include="MapRoute.cpp" />
|
<ClCompile Include="RouteManage.cpp" />
|
||||||
<ClCompile Include="VisibleCube.cpp" />
|
<ClCompile Include="VisibleCube.cpp" />
|
||||||
<ClInclude Include="componentbasic_global.h" />
|
<ClInclude Include="componentbasic_global.h" />
|
||||||
<ClInclude Include="componentbasic.h" />
|
<ClInclude Include="componentbasic.h" />
|
||||||
<QtMoc Include="DeduceFramework.h" />
|
<QtMoc Include="DeduceFramework.h" />
|
||||||
<ClInclude Include="InvisibleComponent.h" />
|
<ClInclude Include="InvisibleComponent.h" />
|
||||||
<ClInclude Include="MapRoute.h" />
|
<ClInclude Include="RouteManage.h" />
|
||||||
<ClInclude Include="VisibleCube.h" />
|
<ClInclude Include="VisibleCube.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<ClInclude Include="VisibleCube.h">
|
<ClInclude Include="VisibleCube.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="MapRoute.h">
|
<ClInclude Include="RouteManage.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="InvisibleComponent.h">
|
<ClInclude Include="InvisibleComponent.h">
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<ClCompile Include="VisibleCube.cpp">
|
<ClCompile Include="VisibleCube.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="MapRoute.cpp">
|
<ClCompile Include="RouteManage.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="DeduceFramework.cpp">
|
<ClCompile Include="DeduceFramework.cpp">
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
#include "MapRoute.h"
|
|
|
@ -0,0 +1 @@
|
||||||
|
#include "RouteManage.h"
|
|
@ -15,8 +15,8 @@ class COMPONENTBASIC_EXPORT VisibleCubePlugin : public ProcList<
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::weak_ptr<WsEntity> _bind_entity;
|
std::weak_ptr<WsEntity> _bind_entity;
|
||||||
D3Data _self_d3;
|
VolumeData _self_d3;
|
||||||
LLAPos _self_lla;
|
LonLatAltPos _self_lla;
|
||||||
Posture _self_posture;
|
Posture _self_posture;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -100,9 +100,11 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="route_access.cpp" />
|
||||||
<ClInclude Include="messagebasic_global.h" />
|
<ClInclude Include="messagebasic_global.h" />
|
||||||
<ClInclude Include="messagebasic.h" />
|
<ClInclude Include="messagebasic.h" />
|
||||||
<ClCompile Include="messagebasic.cpp" />
|
<ClCompile Include="messagebasic.cpp" />
|
||||||
|
<ClInclude Include="route_access.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||||
|
|
|
@ -32,5 +32,13 @@
|
||||||
<ClInclude Include="messagebasic.h">
|
<ClInclude Include="messagebasic.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="route_access.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="route_access.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -94,7 +94,7 @@ struct Posture {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 三维数据结构定义
|
/// 三维数据结构定义
|
||||||
/// </summary>
|
/// </summary>
|
||||||
struct D3Data {
|
struct VolumeData {
|
||||||
double _length_m = 0;
|
double _length_m = 0;
|
||||||
double _width_m = 0;
|
double _width_m = 0;
|
||||||
double _height_m = 0;
|
double _height_m = 0;
|
||||||
|
@ -104,9 +104,9 @@ struct D3Data {
|
||||||
/// 体积盒详细数据定义
|
/// 体积盒详细数据定义
|
||||||
/// </summary>
|
/// </summary>
|
||||||
struct MESSAGEBASIC_EXPORT Box3DDesc : public AbstractMessage {
|
struct MESSAGEBASIC_EXPORT Box3DDesc : public AbstractMessage {
|
||||||
D3Data _d3_data;
|
VolumeData _d3_data;
|
||||||
Posture _posture_d3;
|
Posture _posture_d3;
|
||||||
LLAPos _lla_pos;
|
LonLatAltPos _lla_pos;
|
||||||
|
|
||||||
Box3DDesc();
|
Box3DDesc();
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ struct MESSAGEBASIC_EXPORT Box3DDesc : public AbstractMessage {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MESSAGEBASIC_EXPORT Set3DBoxD3Data : public AbstractMessage {
|
struct MESSAGEBASIC_EXPORT Set3DBoxD3Data : public AbstractMessage {
|
||||||
D3Data _d3_data;
|
VolumeData _d3_data;
|
||||||
|
|
||||||
Set3DBoxD3Data();
|
Set3DBoxD3Data();
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ struct MESSAGEBASIC_EXPORT Set3DBoxPosture : public AbstractMessage
|
||||||
|
|
||||||
struct MESSAGEBASIC_EXPORT Set3DBoxLLAPos : public AbstractMessage
|
struct MESSAGEBASIC_EXPORT Set3DBoxLLAPos : public AbstractMessage
|
||||||
{
|
{
|
||||||
LLAPos _lla_pos;
|
LonLatAltPos _lla_pos;
|
||||||
|
|
||||||
Set3DBoxLLAPos();
|
Set3DBoxLLAPos();
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#include "route_access.h"
|
|
@ -0,0 +1,6 @@
|
||||||
|
#pragma once
|
||||||
|
#include "messagebasic.h"
|
||||||
|
|
||||||
|
struct NewPlainRoute : public AbstractMessage {
|
||||||
|
QList<QPointF> lonlatList;
|
||||||
|
};
|
|
@ -11,7 +11,7 @@ StandardGlobe::StandardGlobe()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ECEFPos StandardGlobe::llaToEcef(const LLAPos& v)
|
ECEFPos StandardGlobe::llaToEcef(const LonLatAltPos& v)
|
||||||
{
|
{
|
||||||
// 柴麻鉦宣白伉鉦宣
|
// 柴麻鉦宣白伉鉦宣
|
||||||
auto axis_r_g = v._alt_m + _radius_m;
|
auto axis_r_g = v._alt_m + _radius_m;
|
||||||
|
@ -27,7 +27,7 @@ ECEFPos StandardGlobe::llaToEcef(const LLAPos& v)
|
||||||
return ECEFPos{ axis_x, axis_y, axis_z };
|
return ECEFPos{ axis_x, axis_y, axis_z };
|
||||||
}
|
}
|
||||||
|
|
||||||
LLAPos StandardGlobe::ecefToLLA(const ECEFPos& v)
|
LonLatAltPos StandardGlobe::ecefToLLA(const ECEFPos& v)
|
||||||
{
|
{
|
||||||
auto r2 = std::sqrt(v._x_pos * v._x_pos + v._y_pos * v._y_pos);
|
auto r2 = std::sqrt(v._x_pos * v._x_pos + v._y_pos * v._y_pos);
|
||||||
auto rad_lon = acos(v._x_pos / r2);
|
auto rad_lon = acos(v._x_pos / r2);
|
||||||
|
@ -36,7 +36,7 @@ LLAPos StandardGlobe::ecefToLLA(const ECEFPos& v)
|
||||||
auto rx = std::sqrt(v._x_pos * v._x_pos + v._y_pos * v._y_pos + v._z_pos * v._z_pos);
|
auto rx = std::sqrt(v._x_pos * v._x_pos + v._y_pos * v._y_pos + v._z_pos * v._z_pos);
|
||||||
auto rad_lat = asin(v._z_pos / rx);
|
auto rad_lat = asin(v._z_pos / rx);
|
||||||
|
|
||||||
LLAPos ret;
|
LonLatAltPos ret;
|
||||||
ret._lon_deg = rad2d(rad_lon);
|
ret._lon_deg = rad2d(rad_lon);
|
||||||
ret._lat_deg = rad2d(rad_lat);
|
ret._lat_deg = rad2d(rad_lat);
|
||||||
ret._alt_m = rx - _radius_m;
|
ret._alt_m = rx - _radius_m;
|
||||||
|
@ -44,7 +44,7 @@ LLAPos StandardGlobe::ecefToLLA(const ECEFPos& v)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StandardGlobe::getDistanceWithTargetLLA(const LLAPos& base, const LLAPos& target, double& dist, double& azi)
|
void StandardGlobe::getDistanceWithTargetLLA(const LonLatAltPos& base, const LonLatAltPos& target, double& dist, double& azi)
|
||||||
{
|
{
|
||||||
// ecef文楚
|
// ecef文楚
|
||||||
auto vec_base = llaToEcef(base).getVec3();
|
auto vec_base = llaToEcef(base).getVec3();
|
||||||
|
@ -75,7 +75,7 @@ void StandardGlobe::getDistanceWithTargetLLA(const LLAPos& base, const LLAPos& t
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <qquaternion.h>
|
#include <qquaternion.h>
|
||||||
void StandardGlobe::getTargetLLAWithDistance(const LLAPos& base, double dist, double azi, LLAPos& target)
|
void StandardGlobe::getTargetLLAWithDistance(const LonLatAltPos& base, double dist, double azi, LonLatAltPos& target)
|
||||||
{
|
{
|
||||||
auto ecef_bvec = llaToEcef(base).getVec3().normalized();
|
auto ecef_bvec = llaToEcef(base).getVec3().normalized();
|
||||||
QQuaternion u0(-deg2a(azi), ecef_bvec);
|
QQuaternion u0(-deg2a(azi), ecef_bvec);
|
||||||
|
@ -96,7 +96,7 @@ void StandardGlobe::getTargetLLAWithDistance(const LLAPos& base, double dist, do
|
||||||
target = ecefToLLA(sv);
|
target = ecefToLLA(sv);
|
||||||
}
|
}
|
||||||
|
|
||||||
PolarPos StandardGlobe::getPolarWithLLA(const LLAPos& base, const LLAPos& target)
|
PolarPos StandardGlobe::getPolarWithLLA(const LonLatAltPos& base, const LonLatAltPos& target)
|
||||||
{
|
{
|
||||||
// ecef文楚
|
// ecef文楚
|
||||||
auto vec_base = llaToEcef(base).getVec3();
|
auto vec_base = llaToEcef(base).getVec3();
|
||||||
|
@ -134,7 +134,7 @@ PolarPos StandardGlobe::getPolarWithLLA(const LLAPos& base, const LLAPos& target
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLAPos StandardGlobe::getLLAWithPolar(const LLAPos& base, const PolarPos& target)
|
LonLatAltPos StandardGlobe::getLLAWithPolar(const LonLatAltPos& base, const PolarPos& target)
|
||||||
{
|
{
|
||||||
auto ecef_b = llaToEcef(base).getVec3();
|
auto ecef_b = llaToEcef(base).getVec3();
|
||||||
auto u_azi = QQuaternion(-deg2a(target._azimuth_deg), ecef_b.normalized());
|
auto u_azi = QQuaternion(-deg2a(target._azimuth_deg), ecef_b.normalized());
|
||||||
|
|
|
@ -4,10 +4,18 @@
|
||||||
|
|
||||||
class QVector3D;
|
class QVector3D;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ¾Î³¶È×ø±ê
|
||||||
|
/// </summary>
|
||||||
|
struct LonLatPos {
|
||||||
|
double _lon_deg = 0;
|
||||||
|
double _lat_deg = 0;
|
||||||
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 经纬高坐标系坐标
|
/// 经纬高坐标系坐标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
struct LLAPos {
|
struct LonLatAltPos {
|
||||||
double _lon_deg = 0;
|
double _lon_deg = 0;
|
||||||
double _lat_deg = 0;
|
double _lat_deg = 0;
|
||||||
double _alt_m = 0;
|
double _alt_m = 0;
|
||||||
|
@ -56,8 +64,8 @@ private:
|
||||||
public:
|
public:
|
||||||
StandardGlobe();
|
StandardGlobe();
|
||||||
|
|
||||||
static ECEFPos llaToEcef(const LLAPos &v);
|
static ECEFPos llaToEcef(const LonLatAltPos &v);
|
||||||
static LLAPos ecefToLLA(const ECEFPos &v);
|
static LonLatAltPos ecefToLLA(const ECEFPos &v);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据LLA坐标获取两点之间的大地线长度和b->t初始方位角,warning:本计算忽视LLA的高度值
|
/// 根据LLA坐标获取两点之间的大地线长度和b->t初始方位角,warning:本计算忽视LLA的高度值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -65,7 +73,7 @@ public:
|
||||||
/// <param name="target"></param>
|
/// <param name="target"></param>
|
||||||
/// <param name="dist"></param>
|
/// <param name="dist"></param>
|
||||||
/// <param name="azi"></param>
|
/// <param name="azi"></param>
|
||||||
static void getDistanceWithTargetLLA(const LLAPos &base, const LLAPos &target, double &dist, double &azi);
|
static void getDistanceWithTargetLLA(const LonLatAltPos &base, const LonLatAltPos &target, double &dist, double &azi);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据两点之间的大地线长度和b->t初始方位角,计算目标LLA定位坐标
|
/// 根据两点之间的大地线长度和b->t初始方位角,计算目标LLA定位坐标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -73,19 +81,19 @@ public:
|
||||||
/// <param name="dist"></param>
|
/// <param name="dist"></param>
|
||||||
/// <param name="azi"></param>
|
/// <param name="azi"></param>
|
||||||
/// <param name="target"></param>
|
/// <param name="target"></param>
|
||||||
static void getTargetLLAWithDistance(const LLAPos& base, double dist, double azi, LLAPos& target);
|
static void getTargetLLAWithDistance(const LonLatAltPos& base, double dist, double azi, LonLatAltPos& target);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通过LLA坐标,获取目标极坐标
|
/// 通过LLA坐标,获取目标极坐标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="base"></param>
|
/// <param name="base"></param>
|
||||||
/// <param name="target"></param>
|
/// <param name="target"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
static PolarPos getPolarWithLLA(const LLAPos &base, const LLAPos &target);
|
static PolarPos getPolarWithLLA(const LonLatAltPos &base, const LonLatAltPos &target);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通过极坐标,获取目标LLA坐标
|
/// 通过极坐标,获取目标LLA坐标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="base"></param>
|
/// <param name="base"></param>
|
||||||
/// <param name="target"></param>
|
/// <param name="target"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
static LLAPos getLLAWithPolar(const LLAPos &base, const PolarPos &target);
|
static LonLatAltPos getLLAWithPolar(const LonLatAltPos &base, const PolarPos &target);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue