Changing the control logic of a quadrotor circuit using a lighter-than-air model.

Please tell me about changing the control logic of the quadrotor circuit, provided that the model is lighter than air.

It is necessary that the motors, when stabilizing, holding the model in place and descending, create a negative thrust, and when lifting, a positive one, helping the model to take off.

What needs to be changed in the code for this logic to work correctly?

While experimenting on the Gazebo simulator, I added a plug-in for creating lift, so that the model rises up under the action of lift.

I tried to take off programmatically at the start of the simulation, but the simulation freezes.
Could you tell me how to properly take off in the code at the start of the simulation?

So far, I have done a lift operation starting from a height of 1 meter after a standard takeoff.
But the motors switch to low gas, and the model continues to fly up.

I tried to make changes in the code, but so far I have not achieved adequate work.

Please tell me what needs to be changed in the code for the flight of a lighter-than-air quadrotor model.

Thank you.