Coordinate System Transformation


I am new to Orekit and I am trying to convert computed x, y, z (ECEF) coordinates to azimuth and elevation values relative to my local center. Is there a way of doing that using the orekit library?

Best Regards,

Hi @efeerdogannn welcome

Yes, you can do that. You have to create a TopocentricFrame from you local center, then call its getAzimuth and getElevation methods using the position vector as input. Beware this does not take into account light time delay. If you want something that is more representative of a measurement made for example by a ground telescope, then you should use the AngularAzEl measurement type, but it is more complex to set up.

Hello @luc, thank you for your very quick response.

Can I use the getElevation and getAzimuth methods for any ECEF coordinate in the Topocentricframe? I computed my antennas beams center position around the expected position of the satellite. I am tiring to perform a conical search around the propagated trajectory and my antennas control system accepts only azimuth and elevation as inputs. So I want to convert these ECEF coordinates of the antenna beam in azimuth and elevation. I saved all the beams center ECEF coordinates in a variable called beam_positions. Can you may be give me an example on how to use orekit to translate this ECEF coordinates (beam_positions) to azimuth and elevation? Here is how I set up the model :

mytle = TLE(tle_line1,tle_line2, timeScale = ‘utc’)

ITRF = FramesFactory.getITRF(IERSConventions.IERS_2010, True)
earth = OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,

longitude = radians(9.103642) #radians
latitude = radians(48.749592) #radians
altitude = 487.80 #meter

lla = np.vstack((latitude,longitude,altitude)) # watch out the order, latitude comes first becouse of pm.ecef2are
station = GeodeticPoint(latitude, longitude, altitude)
station_frame = TopocentricFrame(earth, station, “Esrange”)

inertialFrame = FramesFactory.getEME2000()
propagator = TLEPropagator.selectExtrapolator(mytle)

extrapDate = AbsoluteDate(UTC_start_year, UTC_start_month ,UTC_start_day, UTC_start_hour, UTC_start_minutes, 0.0, TimeScalesFactory.getUTC()) # start time in UTC
finalDate = extrapDate.shiftedBy(60.0*duration)

The getElevation and getAzimut method can be fed with coordinates in any frame, ECEF or not. In fact, the second argument (frame) describes the coordinates in which the first argument (extPoint) is defined. The method takes care to convert frames internally, from the provided frame to the topocentric frame itself. So when you get a SpacecraftState from your propagator, the simplest is to call

  double azimuth   = topo.getAzimuth(state.getPVCoordinates().getPosition(), state.getFrame(), state.getDate());
  double elevation = topo.getElevation(state.getPVCoordinates().getPosition(), state.getFrame(), state.getDate());

This means that you feed the topocentric frame with a position in some inertial frame used by the propagator (it will be TEME if you use a TLE propagator), and this vector will be converted internally.

Note that the convention for azimuth is the regular one with 0 radians towards North, π/2 radians towards East, π radians towards South and 3π/2 radians towards West.

Then you should add the search pattern for your antenna beam around these theoretical values.

1 Like