Is it a bug in the estimation/performance in the Orekit tutorial?

If I want to generate a PV measurement data, the unit written in the generator program should be kilometers.
estimation/performance/MeasurementGenerator.java

        } else {
            lineFormat = "%-24s\t%-5s\t%-10s\t%15.9f\t%15.9f\t%15.9f\t%12.9f\t%12.9f\t%12.9f%n";
            final PV pv = (PV) measurement;
            outputStream.format(Locale.US, lineFormat,
                                pv.getDate().toStringWithoutUtcOffset(TimeScalesFactory.getUTC(), 3), "PV",
                                "-----",
                                pv.getObservedValue()[0] * 1.e-3, pv.getObservedValue()[1] * 1.e-3, pv.getObservedValue()[2] * 1.e-3,
                                pv.getObservedValue()[3] * 1.e-3, pv.getObservedValue()[4] * 1.e-3, pv.getObservedValue()[5] * 1.e-3);
        }

But the orbit determination engine seems to use meters when reading the data in PV format?
estimation/common/AbstractOrbitDeterminationEngine.java

                        final PV pv = new PVParser().parseFields(fields, stations, pvData, satellite,
                                                                 satRangeBias, weights,
                                                                 line, lineNumber, source.getName(), true);

If the last parameter is true, it means that the dimension is meters?

Hi @houmingyang,

Yes.
If you look into method PVParser()#parseFields() you will see these kind of lines:

new Vector3D(isMeters ? Double.parseDouble(fields[3]) :
                                                                                 Double.parseDouble(fields[3]) * 1000.0,

So the tutorials are consistent: we’re writing custom measurement files in km, and reading them in km too.

Hope this helps,
Maxime

Thank you for your reply.

But my question is that there is a discrepancy between the “AbstractOrbitDetermination” class and the “AbstractOrbitDeterminationEngine” class when they all reading PV data in the tutorial.I don’t know if there was any particular purpose for this, or if it was a clerical bug.

When I run the “performance” example, if the measurement data type used for generation and estimation is RANGE, there is no problem . However, when I changed the data type used for generation and estimation to PV type, the result was obviously wrong.

Sorry @houmingyang I ended up looking only into AbstractOrbitDetermination so it looked ok.
I think it’s a bug yes, reading the PV should be consistent with generating them in PerformanceTesting.
Please open a bug report on the tutorials forge.

Thank you,
Maxime

I’m just reminding the maintainers of the tutorial examples, and this is really a tiny tiny bug in the tutorial. I’m a beginner, and I don’t have a gitlab account . I don’t know how to link a forum account with a gitlab account to report bugs, should I wrote a request email?
Best wishes
houmingyang

Hello,

I have opened an issue on the forge : Reading the PV should be consistent with generating them in PerformanceTesting (#31) · Issues · Orekit / Orekit Tutorials · GitLab

Cheers,
Vincent