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