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 (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",
                outputStream.format(Locale.US, "%n");
            } else if (m instanceof Range) {
                final Range range = (Range) m;
                outputStream.format(Locale.US, lineFormat,
                                    range.getDate(), "RANGE",
                outputStream.format(Locale.US, "%n");
            } else {
      "unexpected measurement type: " + m.getClass().getSimpleName());

Is that what you are looking for?


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

:+1: Glad I could help!

Thanks very much.