mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-23 04:36:35 +00:00
Changed serial connection to UDP connection.
Added ZR10 support. Added automation to choose configuration.
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include "aienginedefinitions.h"
|
||||
#include "aienginegimbalserverserialcommand.h"
|
||||
#include "aienginegimbalserverserialport.h"
|
||||
#include "aienginegimbalserverserialresponse.h"
|
||||
#include "aienginegimbalserverudpcommand.h"
|
||||
#include "aienginegimbalserverudpresponse.h"
|
||||
#include "aienginegimbalserverudp.h"
|
||||
|
||||
|
||||
const double EARTH_RADIUS = 6371000.0; // Earth's radius in meters
|
||||
@@ -24,7 +24,6 @@ struct CameraData
|
||||
uint16_t width; // Pixels
|
||||
float pitch; // Degrees
|
||||
float yaw; // Degrees
|
||||
float fow; // Degrees
|
||||
};
|
||||
|
||||
|
||||
@@ -43,8 +42,8 @@ class AiEngineGimbalServerActions : public QObject
|
||||
public:
|
||||
explicit AiEngineGimbalServerActions(QObject *parent = nullptr);
|
||||
|
||||
public:
|
||||
void setup(AiEngineGimbalServerSerialPort *serialPort, AiEngineGimbalServerSerialCommand *serialCommand, AiEngineGimbalServerSerialResponse *serialResponse, AiEngineGimbalStatus *gimbalStatus);
|
||||
public slots:
|
||||
void setup(AiEngineGimbalServerUDP *udpSocket, AiEngineGimbalServerUDPCommand *udpCommand, AiEngineGimbalServerUDPResponse *udpResponse, AiEngineGimbalStatus *gimbalStatus);
|
||||
AiEngineRectangleProperties calculateRectangleProperties(int top, int left, int bottom, int right);
|
||||
void turnToTarget(AiEngineRectangleProperties rectangle);
|
||||
void zoomToTarget(AiEngineRectangleProperties rectangle);
|
||||
@@ -55,11 +54,12 @@ signals:
|
||||
void aiTargetZoomed(AiEngineTargetPosition);
|
||||
|
||||
private:
|
||||
AiEngineGimbalServerSerialPort *mSerialPort;
|
||||
AiEngineGimbalServerSerialCommand *mSerialCommand;
|
||||
AiEngineGimbalServerSerialResponse *mSerialResponse;
|
||||
AiEngineGimbalServerUDP *mUdpSocket;
|
||||
AiEngineGimbalServerUDPCommand *mUdpCommand;
|
||||
AiEngineGimbalServerUDPResponse *mUdpResponse;
|
||||
AiEngineGimbalStatus *mGimbalStatus;
|
||||
|
||||
private slots:
|
||||
CameraData getCameraData(void);
|
||||
void getAnglesToOnScreenTarget(int targetX, int targetY, float &resultYaw, float &resultPitch);
|
||||
AiEngineGeoPosition calculateTargetLocation(DroneData drone, CameraData camera);
|
||||
|
||||
Reference in New Issue
Block a user