Undefined Variable Error

I’m getting a undefined variable error on “B_STAR” from the line:
var propagator22 = (TLEPropagator) converter.convert(numProp, timeSpan, nbPoints, TLEPropagatorBuilder.B_STAR);
Is there something I’m doing wrong?

TLEPropagatorBuilder.B_STAR is trying to access a field from a constructor class, which doesn’t look right to me. Where are you getting the idea that ‘B_STAR’ is accessible?

Hard to really say what’s wrong without more context.

Hi, kst

I am not sure what you are doing. Your post is incomplete, I think.

While, there is a definition of B_STAR in class TLE, if you are looking for this.

Or you can just use the string “BSTAR”.

public class TLE implements TimeStamped, Serializable {

    /** Identifier for SGP type of ephemeris. */
    public static final int SGP = 1;

    /** Identifier for SGP4 type of ephemeris. */
    public static final int SGP4 = 2;

    /** Identifier for SDP4 type of ephemeris. */
    public static final int SDP4 = 3;

    /** Identifier for SGP8 type of ephemeris. */
    public static final int SGP8 = 4;

    /** Identifier for SDP8 type of ephemeris. */
    public static final int SDP8 = 5;

    /** Identifier for default type of ephemeris (SGP4/SDP4). */
    public static final int DEFAULT = 0;

    /** Parameter name for B* coefficient. */
    public static final String B_STAR = "BSTAR";

    /** Default value for epsilon. */
    private static final double EPSILON_DEFAULT = 1.0e-10;

......

Thanks for the reply Iirw1984. I think I have found my issue. The code I was using is from the “Get TLE after propagation” post. I had simply implemented the code from that post and was learning from it.