...
- Calculate the coords of the antennas in X,Y,Z relative to the array centre's X,Y,Z: this is just a vector difference:
ant_geo_X = ant_X - arr_X
ant_geo_Y = ant_Y - arr_Y
ant_geo_Z = ant_Z - arr_Z - Rotate the longitude:
x_local = x_geo*math.cos(lon_rad) + math.sin(lon_rad)*y_geo
y_local = y_geo*math.cos(lon_rad) - math.sin(lon_rad)*x_geo
z_local = z_geo - Rotate the latitude:
e_local = y_local
n_local = z_local*math.cos(lat_rad) - math.sin(lat_rad)*x_local
u_local = x_local*math.cos(lat_rad) + math.sin(lat_rad)*z_local