Hello everyone
I’m currently trying to compare some of my angular measurements to a reference from the ILRS but I have some unexpected bias that seems to be present so I’m trying to figure if it comes from a mistake somewhere in my code or if it is really due to the measures.
At first, I read the CPF file :
public static Map<String,CPF.CPFEphemeris> readCPFFile(String filepath) {
// Number of samples to use (does not change much the results)
int interpolationSamples = 20;
// Frames
final CelestialBodies celestialBodies = DataContext.getDefault().getCelestialBodies();
Frames frames = Frames.of(TimeScalesFactory.getTimeScales(), celestialBodies);
// Configure the CPF Parser
CPFParser cpfParser = new CPFParser(Constants.IERS2010_EARTH_MU,
interpolationSamples,
IERSConventions.IERS_2010,
TimeScalesFactory.getUTC(),
frames);
// Parse of the ILRS file
CPF cpfData = cpfParser.parse(new DataSource(filepath));
// Get the satellite Data
return cpfData.getSatellites();
}
With that, I can now get a propagator and a :
// Ephéméride lié au satellite recherché
CPFEphemeris ephemeris = mapCpfData.get(satName);
// Propagateur lié au satellite
BoundedPropagator propagator = ephemeris.getPropagator();
And now I compute the angles :
// Propagation at the desired date
SpacecraftState state = propagator.propagate(epoch);
// Position of the station in ITRF
final OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.IERS2010_EARTH_EQUATORIAL_RADIUS,
Constants.IERS2010_EARTH_FLATTENING,
FramesFactory.getITRF(ITRFVersion.ITRF_2020, IERSConventions.IERS_2010, false));
final TopocentricFrame topo = new TopocentricFrame(earth, coordStation, "topo");
final GroundStation station = new GroundStation(topo);
// Position of the station in ICRF
Vector3D stationIcrf = station.getBaseFrame().getPVCoordinates(epoch, FramesFactory.getICRF()).getPosition();
// Vector station -> satellite
Vector3D diffPosition = state.getOrbit().getPVCoordinates(FramesFactory.getICRF()).getPosition().subtract(stationIcrf);
// Refraction model
EarthITU453AtmosphereRefraction refractionModel = new EarthITU453AtmosphereRefraction(coordStation.getAltitude());
// Measurement angles
double rightAscension = Math.atan2(diffPosition.getY(), diffPosition.getX());
double declination = Math.asin(diffPosition.getZ() / diffPosition.getNorm());
double azimuth = topo.getAzimuth(state.getPVCoordinates().getPosition(), state.getFrame(), state.getDate());
double elevation = topo.getElevation(state.getPVCoordinates().getPosition(), state.getFrame(), state.getDate());
double refractionAngle = refractionModel.getRefraction(elevation);
Is there anywhere I did some mistake ?
Since the biais is mostly on the right ascension, it might be due to some frame incoherence ?
The CPF I use is this one :
ilrs_data.cpf (39.1 KB)
If you have any idea fr improvement, that would be great !
Have a nice day!