I am using orekit with python. For my caclulation I need the rotation function from
I found examples for using it in java as follows:
Rotation rotation = new Rotation(q0, q1, q2, q3, true);
However using this in python gives me a missing argument error.
Looking into the class I found the following:
def init(self, double: float, double2: float, double3: float, double4: float, boolean: bool):
Is it possible to use this in python without the ‘self’ argument? Only handing over the quaternions like in the java example?
Thank you so much.
self is always the first argument in the declaration of a constructor in Python. You don’t need to pass anything, it’s implicit by using the name of the class.
Your argument error is more likely to come from the type of q0, ..., q3
Are they float (and not Numpy’s float64)? Cast them to be sure.
Hi @Serrof , thank you so much for the explanation with the self argument. It helped me a lot with debbuging my code.
At the end the bool value was not handed over correctly as booI. I wasn’t able to see this because it only gave me the standard argument error.
Thank you for your help!