30 lines
804 B
C++
30 lines
804 B
C++
#ifndef AIRPORT_TYPES_VEHICLE_DATA_H
|
|
#define AIRPORT_TYPES_VEHICLE_DATA_H
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include "BasicTypes.h"
|
|
|
|
// 前向声明
|
|
class CoordinateConverter;
|
|
|
|
enum class VehicleType {
|
|
AIRCRAFT,
|
|
VEHICLE
|
|
};
|
|
|
|
struct VehicleData {
|
|
std::string id; // 唯一标识
|
|
VehicleType type; // 类型
|
|
GeoPosition geo; // 地理坐标(经纬度)
|
|
Vector2D position; // 平面坐标(米)
|
|
Vector2D velocity; // 速度(米/秒)
|
|
double heading; // 航向角(度)
|
|
uint64_t timestamp; // 时间戳
|
|
double altitude{0.0}; // 高度(米,仅飞行器有效)
|
|
|
|
// 只保留声明
|
|
void updateLocalPosition(const CoordinateConverter& converter);
|
|
};
|
|
|
|
#endif // AIRPORT_TYPES_VEHICLE_DATA_H
|