From 9185424daa5dd82c5ec9cd4acebab22a44d5b055 Mon Sep 17 00:00:00 2001 From: Norman Princen <63923352+NPrincen@users.noreply.github.com> Date: Sat, 2 May 2020 10:06:42 -0700 Subject: [PATCH] Added sendPOST function combining sendPOSI and getTERR --- C/src/xplaneConnect.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/C/src/xplaneConnect.h b/C/src/xplaneConnect.h index 67eafba..f3c8675 100644 --- a/C/src/xplaneConnect.h +++ b/C/src/xplaneConnect.h @@ -234,6 +234,23 @@ int sendPOSI(XPCSocket sock, double values[], int size, char ac); /// \returns 0 if successful, otherwise a negative value. int getTERR(XPCSocket sock, double posi[3], double values[11], char ac); +/// Sets the position and orientation and gets the terrain information of the specified aircraft. +/// +/// \param sock The socket to use to send the command. +/// \param posi A double array representing position data about the aircraft. The format of values is +/// [Lat, Lon, Alt, Pitch, Roll, Yaw, Gear]. If less than 7 values are specified, +/// the unspecified values will be left unchanged. +/// \param size The number of elements in posi. +/// \param values A double array with the information for the terrain output. The format of values is +/// [Lat, Lon, Alt, Nx, Ny, Nz, Vx, Vy, Vz, wet, result]. The first three are for output of +/// the Lat and Lon of the aircraft with the terrain height directly below. The next three +/// represent the terrain normal. The next three represent the velocity of the terrain. +/// The wet variable is 0.0 if the terrain is dry and 1.0 if wet. +/// The last output is the terrain probe result parameter. +/// \param ac The aircraft number to set the position of. 0 for the main/user's aircraft. +/// \returns 0 if successful, otherwise a negative value. +int sendPOST(XPCSocket sock, double posi[], int size, double values[11], char ac); + // Controls /// Gets the control surface information for the specified aircraft.