Welcome to the Orekit forum!
The problem is that you are assuming that the spacecraft’s position is given in topocentric frame. However, I don’t think that you used
TopocentricFrame as the reference frame of the spacecraft’s orbit. I would recommend you to directly use
s.getFrame() when defining the spacecraft frame in
getElevation() method. Indeed, the
frame argument of this method is the frame in which the position is defined. So, by using
s.getFrame() you are at 100% sure to have the good one.
You can therefore easily calculate the elevation and azimuth angles of the spacecraft from the topocentric frame using:
// compute elevation
final double elevation = FastMath.toDegrees(c.getElevation(s.getPVCoordinates().getPosition(), s.getFrame(), s.getDate()));
// compute azimuth
final double azimuth = FastMath.toDegrees(c.getAzimuth(s.getPVCoordinates().getPosition(), s.getFrame(), s.getDate()));
In addition, to have the distance of the satellite from your station the easiest solution in your situation (i.e., with a topocentric frame and a spacecraft state) is to use
c.getRange(). Please find an example below
// compute range
final double range = c.getRange(s.getPVCoordinates().getPosition(), s.getFrame(), s.getDate());
I hope these comments will help you.