Hello,
I am a very new Orekit-user and currently working on the Doppler shift function in my project. I am attempting to use the basic Doppler shift formula for calculations (get inspiration from Calculating Doppler Shift for satellites - Amateur Radio Stack Exchange). However, I am unsure if I am doing it correctly, as I currently can not test it with physical radio equipment. I would appreciate it if someone could help me verify if I have implemented it correctly.
public static double calcDopplerFactor(TLE tle, Position gsPos, AbsoluteDate date) {
TopocentricFrame groundStationFrame = new TopocentricFrame(
new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
Constants.WGS84_EARTH_FLATTENING,
FramesFactory.getITRF(IERSConventions.IERS_2010, true)),
new GeodeticPoint(Math.toRadians(gsPos.azimuth()), Math.toRadians(gsPos.elevation()), gsPos.distance()),
"Ground Station");
// Initialize TLE propagator
TLEPropagator propagator = TLEPropagator.selectExtrapolator(tle);
// Propagate satellite position to current date
PVCoordinates pv = propagator.propagate(date).getPVCoordinates();
// Calculate satellite velocity
Vector3D satelliteVelocity = pv.getVelocity();
// Calculate ground station velocity
Vector3D groundStationVelocity = groundStationFrame.getPVCoordinates(date, FramesFactory.getITRF(IERSConventions.IERS_2010, true)).getVelocity();
// Calculate relative velocity
Vector3D relativeVelocity = satelliteVelocity.subtract(groundStationVelocity);
double relativeVelocityNorm = relativeVelocity.getNorm();
// Calculate Doppler shift
return relativeVelocityNorm / Constants.SPEED_OF_LIGHT;
}