Skip to content

v2.x to v3.0 C++ API Changes Overview

RTDynamics has made changes to the C++ API with the new version 3.0. These changes are listed below so that you can quickly port your v2.x code to v3.0.

All Products

Starting with v3.1, it will be required that all entities are given unique names. This will ensure among others the new snapshot and restore feature to work properly across simulations sessions. Therefore we suggest using unique names starting with v3.0 so that you can easily upgrade to v3.1 soon.

FixedWingLib FDM

1. Some simulation variables require the use of getValue method when setting and getting the value of the parameter.

theAirplane->getPilotInputData()->m_pitchRollControl[1] = -0.5f ;

becomes

theAirplane->getPilotInputData()->m_rollPitchControl.getValue()[1] = -0.5f ;

Please see the AirplaneFDMExample.cpp if your code doesn’t compile with v3.0.

1a. The m_pitchRollControl variable has been renamed to m_rollPitchControl, since it’s first component is the roll control.

2. It is not necessary anymore to explicitly delete the FixedWingLibFDM::GenAirplane100 object. Deleting the World object now cause all airplanes to be deleted.

3. FixedWingLibFDM::GenAirplane100 constructor can now load airplane configurations from XML files. For example:

theAirplane = new FixedWingLibFDM::GenAirplane100( &theWorld,  "ownship" , "A310-GenAirplane100.xml" );

RotorLib Auto

1. RotorLib Auto product is now called RotorLib CGF. The namespace “RotorLibAuto” has been changed to “RotorLibCGF”

2. It is not necessary anymore to explicitly delete the RotorLibCGF helicopters and the bots. Deleting the World object now causes all bots and helicopters to be deleted.

 

RotorLib FDM

1. It is not necessary anymore to explicitly delete the RotorLibFDM helicopters. Deleting the World object now causes all helicopters to be deleted.

1a. The m_pitchRollControl variable has been renamed to m_rollPitchControl, since it’s first component is the roll control.