Hello @Vincent ,

Sorry to bother you again. I have been trying to get a simple example working but I keep getting this error:

```
----> 2 poc = Patera2005.compute(orbit1, covariance1, radius1, orbit2, covariance2, radius2)
TypeError: descriptor 'compute' for 'Patera2005' objects doesn't apply to a 'CartesianOrbit' object
```

I have tried with `KeplerianOrbit`

, `CartesianOrbit`

, `EquinoctialOrbit`

and `CircularOrbit`

.

Am I maybe using the wrong kind of `Orbit`

? Should I be using a different kind of class?

My full code snippet is here:

```
#placeholder states and TCA
state1 = [7000000.0, 0.0, 0.0, 0.0, 7000.0, 0.0]
state2 = [7100000.0, 0.0, 0.0, 0.0, 7000.1, 0.0]
tca = datetime.datetime(2020, 1, 1, 0, 0, 0)
orbit1 = CartesianOrbit(PVCoordinates(Vector3D(float(state1[0]), float(state1[1]), float(state1[2])),
Vector3D(float(state1[3]), float(state1[4]), float(state1[5]))),
FramesFactory.getEME2000(),
datetime_to_absolutedate(tca),
Constants.WGS84_EARTH_MU)
orbit2 = CartesianOrbit(PVCoordinates(Vector3D(float(state2[0]), float(state2[1]), float(state2[2])),
Vector3D(float(state2[3]), float(state2[4]), float(state2[5]))),
FramesFactory.getEME2000(),
datetime_to_absolutedate(tca),
Constants.WGS84_EARTH_MU)
radius1 = 1.0
radius2 = 1.0
covariance1 = MatrixUtils.createRealMatrix(6, 6)
covariance2 = MatrixUtils.createRealMatrix(6, 6)
#fill covariance with random values
for i in range(6):
for j in range(6):
covariance1.setEntry(i, j, random.random())
covariance2.setEntry(i, j, random.random())
# Patera2005.compute(Orbit primaryAtTCA, StateCovariance primaryCovariance, double primaryRadius, Orbit secondaryAtTCA, StateCovariance secondaryCovariance, double secondaryRadius)
poc = Patera2005.compute(orbit1, covariance1, radius1, orbit2, covariance2, radius2)
print(f"Probability of collision: {poc}")
```

Thanks in advance!

Charles

EDIT: just realized my covariance is not passed as `StateCovariance`

. Will try fixing that now! Sorry

EDIT2: I get a new error nowâ€¦

```
InvalidArgsError: (<class 'org.orekit.ssa.collision.shorttermencounter.probability.twod.Patera2005'>, 'compute', (<CartesianOrbit: Cartesian parameters: {P(7000000.0, 0.0, 0.0), V(0.0, 7000.0, 0.0)}>, <StateCovariance: org.orekit.propagation.StateCovariance@6601cc93>, 1.0, <CartesianOrbit: Cartesian parameters: {P(7100000.0, 0.0, 0.0), V(0.0, 7000.1, 0.0)}>, <StateCovariance: org.orekit.propagation.StateCovariance@63716833>, 1.0))
```

From this code:

```
state1 = [7000000.0, 0.0, 0.0, 0.0, 7000.0, 0.0]
state2 = [7100000.0, 0.0, 0.0, 0.0, 7000.1, 0.0]
tca = datetime.datetime(2020, 1, 1, 0, 0, 0)
orbit1 = CartesianOrbit(PVCoordinates(Vector3D(float(state1[0]), float(state1[1]), float(state1[2])),
Vector3D(float(state1[3]), float(state1[4]), float(state1[5]))),
FramesFactory.getEME2000(),
datetime_to_absolutedate(tca),
Constants.WGS84_EARTH_MU)
orbit2 = CartesianOrbit(PVCoordinates(Vector3D(float(state2[0]), float(state2[1]), float(state2[2])),
Vector3D(float(state2[3]), float(state2[4]), float(state2[5]))),
FramesFactory.getEME2000(),
datetime_to_absolutedate(tca),
Constants.WGS84_EARTH_MU)
radius1 = 1.0
radius2 = 1.0
cov_mat1 = MatrixUtils.createRealMatrix(6, 6)
cov_mat2 = MatrixUtils.createRealMatrix(6, 6)
for i in range(6):
for j in range(6):
cov_mat1.setEntry(i, j, random.random())
cov_mat2.setEntry(i, j, random.random())
covariance1 = StateCovariance(cov_mat1, datetime_to_absolutedate(tca), FramesFactory.getEME2000(), OrbitType.CARTESIAN, PositionAngleType.TRUE)
covariance2 = StateCovariance(cov_mat2, datetime_to_absolutedate(tca), FramesFactory.getEME2000(), OrbitType.CARTESIAN, PositionAngleType.TRUE)
# Patera2005.compute(Orbit primaryAtTCA, StateCovariance primaryCovariance, double primaryRadius, Orbit secondaryAtTCA, StateCovariance secondaryCovariance, double secondaryRadius)
patera2005 = Patera2005()
poc_result = patera2005.compute(orbit1, covariance1, radius1, orbit2, covariance2, radius2)
print(f"Probability of collision: {poc_result}")
```

EDIT3:

Fixed it by changing the method call to:

```
patera2005 = Patera2005()
poc_result = patera2005.compute(orbit1, covariance1, orbit2, covariance2, radius2, 1e-10)
```

and putting real values in my covariance matrix (otherwise i was getting some non symmetric matrix error).