Index out of bounds exception when using org.orekit.estimation.leastsquares.BatchLSEstimator.estimate()

Hello,
I am building AngularAzEl measurements and a BatchLSEstimator in Matlab, but when I run BatchLSEstimator.estimate() on the AngularAzEl measurements, I get an index out of bounds exception as follows:

Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: 1
at org.orekit.estimation.leastsquares.AbstractBatchLSModel.fetchEvaluatedMeasurement(AbstractBatchLSModel.java:447)
at org.orekit.estimation.leastsquares.MeasurementHandler.handleStep(MeasurementHandler.java:94)
at org.orekit.propagation.PropagatorsParallelizer$SinglePropagatorHandler.handleStep(PropagatorsParallelizer.java:276)
at
org.orekit.propagation.integration.AbstractIntegratedPropagator$AdaptedStepHandler.handleStep(AbstractIntegratedPropagator.java:969)
at org.hipparchus.ode.AbstractIntegrator.acceptStep(AbstractIntegrator.java:439)
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:285)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:477)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:425)
at org.orekit.propagation.PropagatorsParallelizer.propagate(PropagatorsParallelizer.java:140)
at org.orekit.estimation.leastsquares.AbstractBatchLSModel.value(AbstractBatchLSModel.java:319)
at
org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresFactory$LocalLeastSquaresProblem.evaluate(LeastSquaresFactory.java:440)
at org.orekit.estimation.leastsquares.BatchLSEstimator$TappedLSProblem.evaluate(BatchLSEstimator.java:615)
at org.hipparchus.optim.nonlinear.vector.leastsquares.LevenbergMarquardtOptimizer.optimize(LevenbergMarquardtOptimizer.java:333)
at org.orekit.estimation.leastsquares.BatchLSEstimator.estimate(BatchLSEstimator.java:435)

Is there somewhere in my code where I need to be sure that something is indexed properly for the orekit/java-based estimator to run? I did not have this problem when I was running the same estimator with Range measurements, in case that fact sheds any light on the issue.
Thank you for any help.
Erin

Hi @erinf

Can you show how do you initialize the AngularAzEl object?
You can check that you initialized the measurement weight and sigma for both azimuth and elevation using a 2-dimensional array.

If it doesn’t solve the issue, can you show us how do you initialize the estimator?

Regards,
Bryan

I did not originally have 2-dimensional weights, but now that I am initializing the AngularAzEl measurements with 2D weights, everything seems to work just fine.
Thanks for the help!
Erin