Files
ECAP_Server/module/Local_Server/Aircraft/Flight_VTO.h
T
2026-07-27 15:17:13 +08:00

28 lines
1.3 KiB
C++

#pragma once
#include "global.h"
struct Flight_Track_Orientation {
double heading = 0.0; // 由最后两个空中位置点计算出的水平航迹角,单位:度
double pitch = 0.0; // 由最后两个空中位置点计算出的三维俯仰角,单位:度
double roll = 0.0; // 当前 ADS-B 位置轨迹没有横滚数据,保留给 Cesium 姿态结构
Psc::JSON to_json() const;
};
struct Flight_VTO {
std::string icao; // 飞机身份标识(四字节十六进制代码)
time_t time_stamp{}; // 时间(原始时间数据,可能需要翻译显示)
bool mlat;
RET<SSR::CPR::Position> pos; // 纬度(飞机的当前位置纬度)
RET<double> track; // 航迹(航迹方向,单位:度)
RET<Flight_Track_Orientation> track_orientation; // Cesium 使用的航迹姿态,单位:度
RET<double> speed; // 航速(单位:米/秒)
RET<double> vert_speed; // 航速(单位:米/秒)
RET<double> altitude; // 米
RET<std::string> call_sign;
RET<std::string> squawk;
RET<SSR::Vortex_Type> vortex_type;
Psc::JSON to_json();
Psc::JSON to_base_info_json();
Psc::JSON to_json(bool include_runtime_fields);
static std::string time_to_string(time_t time_stamp);
static Flight_VTO to_VTO(SSR::Aircraft_Info* info);
};