You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
3.4 KiB
C

#pragma once
#include <tuple>
#define CALC_EXPORT 1
#ifdef CALC_EXPORT
#define CALC_API __declspec(dllexport)
#else
#define CALC_API __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*---------------------计算目标点经纬度需求数据------------------------*/
typedef struct calcData
{
float LaserDistance; //激光测距距离(无激光测距值为0)
float PodPitchAngle; //吊舱俯仰角(向上为正 归中为0° -115~+90°)
float PodDirectionAngle; //吊舱方位角(-180~+180°)
float PodRollAngle; //吊舱滚转角
float FlyPitchAngle; //飞机俯仰角(-90~+90°)
float FlyHeadingAngle; //飞机航向角(0~360°)
float FlyRollAngle; //飞机滚转角(-90~+90°)
double FlyCurrentLongitude; //飞机当前经度
double FlyCurrentLatitude; //飞机当前纬度
float FlyCurrentHeight; //飞机当前高度
bool isUseRoll; //是否使用滚转 默认不使用(三轴光电吊舱)
}CALC_DES_DATA, FLY_DATA;
/*------------------------目标点位置信息数据--------------------------*/
typedef struct locationData
{
double DisLongitude; //目标点经度
double Dislatitude; //目标点纬度
float DisHeight; //目标点高度
/*locationData& operator=(const locationData& other)
{
this->DisHeight = other.DisHeight;
this->Dislatitude = other.Dislatitude;
this->DisLongitude = other.DisLongitude;
return *this;
}*/
}DES_LOCATION;
/*----------------根据空投点目标吊舱需要转动的角度-------------------*/
typedef struct podNeedAngle
{
float directionAngle; //吊舱方位角(-180~+180°)
float PitchAngle; //飞机俯仰角(-90~+90°)
}POD_NEED_ANGLE;
/**********************************************
* @func calcDisLocation
* @brief 计算目标点的位置
* @param CALC_DES_DATA 计算目标点经纬度需求数据
* @return DES_LOCATION 目标点位置信息数据
**********************************************/
CALC_API DES_LOCATION __stdcall calcDisLocation(CALC_DES_DATA calcData);
/**********************************************
* @func calcDisLocation
* @brief 计算目标点的位置(向量)
* @param CALC_DES_DATA 计算目标点经纬度需求数据
* @return DES_LOCATION 目标点位置信息数据
**********************************************/
CALC_API DES_LOCATION __stdcall calcDisLocation2(CALC_DES_DATA calcData);
/**********************************************
* @func calcPodNeedAngle
* @brief 计算空投目标点转向与俯仰应变化的角度
* @param CALC_DES_DATA 计算目标点经纬度需求数据
* @return POD_NEED_ANGLE 目标点位置信息数据
**********************************************/
CALC_API POD_NEED_ANGLE __stdcall calcPodNeedAngle(CALC_DES_DATA calcData, DES_LOCATION desLocation);
/**********************************************
* @func calcPodNeedAngle2
* @brief 计算空投目标点转向与俯仰应变化的角度(向量)
* @param CALC_DES_DATA 计算目标点经纬度需求数据
* @return POD_NEED_ANGLE 目标点位置信息数据
**********************************************/
CALC_API POD_NEED_ANGLE __stdcall calcPodNeedAngle2(CALC_DES_DATA calcData, DES_LOCATION desLocation);
#ifdef __cplusplus
}
#endif