TLE cannot be deserialized maybe due to the transient `bStarParameterDriver`
After I serialize a group of TLE sets to a file, when I try to load back the data, it gives the error that null
encountered.
The following line seems to be the problem, where the bStarParameterDriver
doesn't have a meaningful default value during the deserialization process.
// org/orekit/propagation/analytical/tle/TLE.java:192
private final transient ParameterDriver bStarParameterDriver;
After defining my own TLENoBStarDriver
class by only overriding the original getBStar()
method, the error had gone.
// add a private field
private final double bstar;
// include this in the constructor
public TLENoBStarDriver(String line1, String line2) throws OrekitException {
super(line1, line2);
this.bstar = this.getBStar();
}
// then override the super().getBStar()
@Override
public double getBStar() {
return this.bstar;
}
Is there any more "formal" way to fix it? And I don't need to adjust bStar in my work.
Edited by Hao Peng