New SITL simulator

I’d like to try and get the reafflight 9.5 working as a SITL with PX4.
I’ve successfully gotten the realflight flightaxis data exchange working.
(Its a soap http exchange) I’ve even written my own very simplistic toy flight simulator that can fly a fixed wing model around the realflight simulator…
I’m trying to understand what would be necessary to attach this to px4 for sitl.

I think I just need to exchange mavlink messages with the simulator…
Can someone point me to where the jsbsim or gazebo source
that does this is? or if there is an intermediate interface code module where that is?

Basically I send an set of actuator positions in the output SOAP request and a receive back a data blob. The data blob I’m recieveing from the simulator is :

struct data_exchange_result
double channelvalues[12]; //12 RC channels 0 to 1 scale from the realflight contrtoller.
double currentPhysicsTime_SEC;
double currentPhysicsSpeedMultiplier;
double airspeed_MPS;
double altitudeASL_MTR;
double altitudeAGL_MTR;
double groundspeed_MPS;
double pitchRate_DEGpSEC;
double rollRate_DEGpSEC;
double yawRate_DEGpSEC;
double azimuth_DEG;
double inclination_DEG;
double roll_DEG;
double orientationQuaternion_X;
double orientationQuaternion_Y;
double orientationQuaternion_Z;
double orientationQuaternion_W;
double aircraftPositionX_MTR;
double aircraftPositionY_MTR;
double velocityWorldU_MPS;
double velocityWorldV_MPS;
double velocityWorldW_MPS;
double velocityBodyU_MPS;
double velocityBodyV_MPS;
double velocityBodyW_MPS;
double accelerationWorldAX_MPS2;
double accelerationWorldAY_MPS2;
double accelerationWorldAZ_MPS2;
double accelerationBodyAX_MPS2;
double accelerationBodyAY_MPS2;
double accelerationBodyAZ_MPS2;
double windX_MPS;
double windY_MPS;
double windZ_MPS;
double propRPM;
double heliMainRotorRPM;
double batteryVoltage_VOLTS;
double batteryCurrentDraw_AMPS;
double batteryRemainingCapacity_MA;
double fuelRemaining_OZ;
bool bisLocked;
bool bhasLostComponents;
bool banEngineIsRunning;
bool bisTouchingGround;
bool bflightAxisControllerIsActive;
char bcurrentAircraftStatus[20]; //Have not idea what modes
bool bresetButtonHasBeenPressed; //Detects controller reset button

Thanks for any pointers…

1 Like

Here is a video of my toy simulator flying a pattern in realflight… (Sorry the video is messed up the capture wants to cram the RF window in the corner…)

Hello Pbreed, Did you ever get any further with this?