UnivariateFunctions improvement

Hello everyone! :smiley:

I’ve been using (as I posted in another Topic) the UnivariateProcessNoise from Orekit and, thus, the UnivariateFunctions class and the predefined UnivariateFunctions, such as PolynomialFunction, Sqrt

I have encountered one issue (or something that could be improved, I don’t know how to name it). For example, imagine I want the function \sqrt{C\cdot t^{3} + D}, where C, D are constants. What I thought I could do using the predefined functions is the following (I code in Python):

myfun = Sqrt(PolynomialFunction([D, 0, 0, C]))

However, instead of returning at t_{user} \to C\cdot t_{user}^{3/2} + D, it returns \sqrt{t_{user}} (it completely ignores the PolynomialFunction).

I know there exist the UnivariateFunction (or the equivalent PythonUnivariateFunction) to create user-defined functions, but shouldn’t it be straightforward and easier to create those kind of functions using predefined functions? Just proposing :slight_smile:

Thank you so much in advance,
Antonio.

myfun = Sqrt(PolynomialFunction([D, 0, 0, C])), i am afraid this line of code is not allowed in orekit’s Python binding.

Is it because constants cant be passed?

i believe the Sqrt is imported from org.hipparchus.analysis.function, and its constructor should be called without any parameters.