Runway camera location control (#144)

* update ignore

* basics working

* set cam pos remotely

* log cam position

* keep default behaviour, if short view message is received

Compatibility with existing software

* all to tabs

* rename variable

* option to use camera direction fields
This commit is contained in:
Kai Lehmkuehler
2018-11-14 16:56:29 +01:00
committed by Jason Watkins
parent 136e0d5f2b
commit f9bfd6e3b9
3 changed files with 114 additions and 8 deletions

View File

@@ -7,6 +7,9 @@
#include <string>
#include <map>
#include "XPLMCamera.h"
namespace XPC
{
/// A function that handles a message.
@@ -26,10 +29,10 @@ namespace XPC
/// socket.
///
/// \details After a message is read, HandleMessage analyzes the sender's network address
/// to determine whether the sender is a new client. It then either loads
/// connection details for an existing client, or creates a new connection record
/// for new clients. Finally, the message handler checks the message type and
/// dispatches the message to the appropriate handler.
/// to determine whether the sender is a new client. It then either loads
/// connection details for an existing client, or creates a new connection record
/// for new clients. Finally, the message handler checks the message type and
/// dispatches the message to the appropriate handler.
/// \param msg The message to be processed.
static void HandleMessage(Message& msg);
@@ -54,6 +57,14 @@ namespace XPC
static void HandleXPlaneData(const Message& msg);
static void HandleUnknown(const Message& msg);
static int CamFunc( XPLMCameraPosition_t * outCameraPosition, int inIsLosingControl, void *inRefcon);
struct CameraProperties{
double loc[3];
float direction[3];
float zoom;
};
typedef struct
{