Issue with Vector3D normalize method

Hi,

I’m not sure if this is a bug or just a problem with my setup. Can anyone else recreate this issue?

I installed the Orekit Python Wrapper into a conda environment running Python=3.11.8

Initially I installed orekit=12.0.1. When I ran the normalize method for a Vector3D object I got the following error:

<AttributeError: ‘Vector3D’ object has no attribute ‘normalize’>

However, when I downgrade to orekit=11.3.3 the method works.

The Hipparchus API doc still shows it as an inherited method for Vector3D. Vector3D (Hipparchus 3.0 API)

Thanks,
Sam

Hi,

Since Orekit 12.0, you need to cast to Vector in order to use normalize. Like that:

Vector.cast_(my_vector_3d).normalize()

Cheers,
Romain.

1 Like