Access to AngularAzEl values

I have used various tutorials to build a Java program to generate range, azimuth and elevation data from several sites to one satellite. I can get the access time and the range values but I haven’t been able to determine how to access the azimuth and elevation values from the ObservedMeasurement variable. I have attached my code and output file.DataGen.java (24.6 KB)data.out (70 KB)

Hi @StephenC,

I added it directly into your code (not tested though).
Use FastMath.toDegrees(angle) if you want to have the angles in degrees instead of radians.

    for (final ObservedMeasurement<?> m : generated) {
            if (m instanceof AngularAzEl) {
                final AngularAzEl azel = (AngularAzEl) m;
                outputStream.format(Locale.US, lineFormat + "\t%20.9f",
                                    azel.getDate(), "AZEL",
                                    azel.getStation().getBaseFrame().getName(),
                                    azel.getObservedValue()[0],
                                    azel.getObservedValue()[1]);
                outputStream.format(Locale.US, "%n");
                ++nbAzEl;
            } else if (m instanceof Range) {
                final Range range = (Range) m;
                outputStream.format(Locale.US, lineFormat,
                                    range.getDate(), "RANGE",
                                    range.getStation().getBaseFrame().getName(),
                                    range.getObservedValue()[0]);
                outputStream.format(Locale.US, "%n");
                ++nbRange;
            } else {
                Assert.fail("unexpected measurement type: " + m.getClass().getSimpleName());
            }
        }

Is that what you are looking for?

Cheers,
Maxime

Yes. That is exactly what I am looking for. That solves my issue.

:+1: Glad I could help!

Thanks very much.