Files
autopilot/ai_controller/aienginedefinitions.h
T
Tuomas Järvinen 45c19baa45 Changed directory structure and renamed applications
- autopilot -> drone_controller
- rtsp_ai_player -> ai_controller
- added top level qmake project file
- updated documentation
- moved small demo applications from tmp/ to misc/
2024-10-19 14:44:34 +02:00

94 lines
2.0 KiB
C

#pragma once
#include <QByteArray>
#include <QString>
#include "aienginegimbalserverdefines.h"
// Common geoposition
typedef struct {
float lat;
float lon;
float alt;
} AiEngineGeoPosition;
// AiEngineGimbalClient -> AiEngineGimbalServer is sent when location or position of the drone changes.
typedef struct {
AiEngineGeoPosition position;
float pitch;
float yaw;
} AiEngineDronePosition;
typedef struct {
int left;
int top;
int right;
int bottom;
} AiEngineRectangle;
// AiEngineGimbalClient -> AiEngineGimbalServer when AI finds the target. Index is a new variable to
// keep track of the targets.
typedef struct {
int index;
AiEngineRectangle rectangle;
} AiEngineCameraTarget;
// AiEngineGimbalServer -> AiEngineGimbalClient when AiEngineGimbalServer has zoomed to the target
// defined in AiEngineCameraTarget. Position variable contains calculated geoposition of the target.
typedef struct {
int targetIndex;
AiEngineGeoPosition position;
} AiEngineTargetPosition;
// AiEngineGimbalClient -> AiEngineGimbalServer when AI asks to change camera direction. For example
// nothing interesting was not found. AiEngineGimbalServer -> AiEngineGimbalClient every few second so
// that AI knows the position of the camera.
typedef struct {
float yaw;
float pitch;
float zoom;
} AiEngineCameraPosition;
struct AiEngineRectangleProperties
{
int width;
int height;
int middleX;
int middleY;
};
typedef struct {
// Get these only once
uint resolutionX;
uint resolutionY;
uint hardwareID;
float maxZoom;
float aiEngineCameraFOVHMin;
float aiEngineCameraFOVHMax;
float aiEngineCameraFOVVMin;
float aiEngineCameraFOVVMax;
float aiEngineCameraFLMin;
float aiEngineCameraFLMax;
// Update these before every command
float currentYaw;
float currentPitch;
float currentRoll;
float currentZoom;
} AiEngineGimbalStatus;
struct AiEngineServerSerialCommandStructure
{
UDP_COMMAND_ID id;
QByteArray command;
QString description;
};