FPV Drone controls, how can I add expo curves to controller inputs?

Hello, I’m currently researching how I can add some expo curves to my controller inputs, this is needed to recreate how real fpv drone inputs are controlled. Very precise expo curves are needed to allow fine control of the craft during acrobatic maneuverers.

I’ve had some success with using the expo function but it seems I can only use very limited varibles with it and really I need a visual curve that I can control the expo with. I have some math references of how this should be built taken from a drone flight controllers code, this has been implemented into other games but by using C++ but i’m no coder and was wondering if there’s a blueprint way of plugging this all together.

Here is the code ref:
public static float CalculateDegSec(float input, float rate, float grate, float usecurve) {
//http://ultraesc.de/KISSFC/rates.html
float setpoint = input;
float RPY_useRates = 1-Mathf.Abs(input)grate;
float rxRaw = input1000f;
float curve = rxRawrxRaw/1000000f;
setpoint = ((setpointcurve)usecurve+setpoint(1-usecurve))( rate/10f);
return Mathf.Round(((2000f(1/RPY_useRates))*setpoint)*100f)/100f;
}

To see the curve graph visit here: link text

Any help most appreciated :slight_smile:

I think you should try using Curve assets. You can add them using Add Asset>Misc. They let you have a visual representation of a curve, and you can get the value from a time on them via blueprints using the “Get Float Value” node.

You can read about Curves here:

Hope this helps!

Heya, yes indeed this does look like the way forwards, I stumbled across the curves videos before I sore this comment. I’ll get stuck in soon and hopefully get a solution I can post here :slight_smile: