BatchLSEstimator Setup Error

Hello all,

I recently started using Orekit 10.3 in Matlab 2020a to use the BatchLSEstimator for orbit determination.
I have attached the Matlab script for reference. The execution of the following line:

estimator = BatchLSEstimator(optimizer, propagator_builder);

results in the following error:

No constructor 'org.orekit.estimation.leastsquares.BatchLSEstimator' with matching signature found.

I checked the BatchLSEstimator constructor’s arguments and they look fine, e.g., the optimizer is

GaussNewtonOptimizer{decomposer=org.hipparchus.linear.QRDecomposer@a308ffd, formNormalEquations=false}

and the propagator_builder is

org.orekit.propagation.conversion.NumericalPropagatorBuilder@36e8e3e1

Other operations like propagating orbits numerically/analytically, TLE fitting, position velocity transformations, etc. work fine. All the required Hipparchus 1.8 files - core, geometry, ode, fitting, optim, stat, filtering, fft, clustering, samples, migration are being used.

Any idea what’s causing the BatchLSEstimator to cause this error? Is it because it expects a IntegratedPropagatorBuilder object and I am providing a NumericalPropagatorBuilder object?

I have attached the Matlab code for your reference. I tested with Orekit 10.0, but same result. Appreciate you patience for reading this and your help. Thanks a lot!

SAT_OD_Orekit.m (5.9 KB)

Hi @Berliner_orbitman

Welcome to the Orekit forum!

The propagatorBuilder argument of the BatchLSEstimator class is a varargs argument (i.e. IntergratedPropagatorBuilder… builders). So you can provide one or several propagator builders depending if you calculate the orbit of one or several satellites.

In Java there is no problem when calling a method or a class constructor which has a varargs argument. But I think there is an additional action to do in Matlab. You should transform or put your propagator_builder object into an array.

Please find an example on the following link: Is it possible to invoke a method in a Java class that accepts variable number of input arguments in MATLAB 7.7(R2008b)? - MATLAB Answers - MATLAB Central

Best regards,
Bryan

1 Like

Hi @Berliner_orbitman ,

Welcome :slight_smile:

I did orbit determination (from laser ranging data) in Matlab some time ago, I found my old script, and as Bryan said, you need to put the propagator builder into an array:

propagatorBuilderArray = javaArray('org.orekit.propagation.conversion.NumericalPropagatorBuilder', 1);
propagatorBuilderArray(1) = propagatorBuilder;
estimator = BatchLSEstimator(optimizer, propagatorBuilderArray);
1 Like

Thanks a lot @bcazabonne and @yzokras for your time and replies. The issue is solved now after I applied your answers :slight_smile: . I get expected results.

Regards,
Debdeep