# Horizontal & vertical angle of antenna beams & UE position

1. Apr 10, 2015

### Aliakber2k10

Hi this is my first post here.
Sorry for this naive question xD

I want to calculate antenna gain for which I need the horizontal Φ and vertical θ angle of an antenna beam.
The formula for gain is.

is it ok to convert the rectangular coordinates of antenna into spherical coordinates and compute Φ & θ using standard equations (Cartesian to Spherical)
Similarly if there is a user in the cell can I calculate Φ & θ of user position, and then compute the relative difference and utilize it in the gain equation. i.e. .

Moreover is it also possible that i consider them in-terms of vectors and use inner product to compute the angles Φ & θ? e.g:

and their inner product which can be, .

I would appreciate any kind of help.