As it stands you cannot reverse them, you have to do some groundwork first.

That is, given R, to find X you must first replace 'Y' with what it corresponds to for X

Simple example:

R = 2X + 3Y

=> Y =

**(R-2X) / 3**

Hence:

R = 2X +

**(R-2X) / 3**

Once you reach that state, since you know the value of R and you want to find X, you then go about making X the subject of the equation

Continuing from the example above:

R = 2X + (R-2X) / 3

=> 3R = 6X + (R-2X)

=> 2R = 4X

=> X = R / 2

You do the SAME process for Y.

Thus given 'R' (range) you can find X and Y

You repeat the same steps for H (heading).