### SLA_REFV

Apply Refraction to Vector

ACTION:
Adjust an unrefracted Cartesian vector to include the effect of atmospheric refraction, using the simple $\Delta \zeta =atan\zeta +b{tan}^{3}\zeta$ model.
CALL:
CALL sla_REFV (VU, REFA, REFB, VR)
##### GIVEN:
 VU D unrefracted position of the source ($\left[\phantom{\rule{0.3em}{0ex}}Az,El\phantom{\rule{1em}{0ex}}\right]$ 3-vector) REFA D $tan\zeta$ coefficient (radians) REFB D ${tan}^{3}\zeta$ coefficient (radians)

##### RETURNED:
 VR D refracted position of the source ($\left[\phantom{\rule{0.3em}{0ex}}Az,El\phantom{\rule{1em}{0ex}}\right]$ 3-vector)

NOTES:
(1)
This routine applies the adjustment for refraction in the opposite sense to the usual one – it takes an unrefracted (in vacuo) position and produces an observed (refracted) position, whereas the $\Delta \zeta =atan\zeta +b{tan}^{3}\zeta$ model strictly applies to the case where an observed position is to have the refraction removed. The unrefracted to refracted case is harder, and requires an inverted form of the text-book refraction models; the algorithm used here is equivalent to one iteration of the Newton-Raphson method applied to the above formula.
(2)
Though optimized for speed rather than precision, the present routine achieves consistency with the refracted-to-unrefracted $\Delta \zeta =atan\zeta +b{tan}^{3}\zeta$ model at better than 1 microarcsecond within $3{0}^{\circ }$ of the zenith and remains within 1 milliarcsecond to $\zeta =7{0}^{\circ }$. The inherent accuracy of the model is, of course, far worse than this – see the documentation for sla_REFCO for more information.
(3)
At low elevations (below about ${3}^{\circ }$) the refraction correction is held back to prevent arithmetic problems and wildly wrong results. For optical/IR wavelengths, over a wide range of observer heights and corresponding temperatures and pressures, the following levels of accuracy (worst case) are achieved, relative to numerical integration through a model atmosphere:
 ${\zeta }_{obs}$ error $8{0}^{\circ }$ ′′07 $8{1}^{\circ }$ ′′13 $8{2}^{\circ }$ ′′25 $8{3}^{\circ }$ $5\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $8{4}^{\circ }$ $10\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $8{5}^{\circ }$ $20\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $8{6}^{\circ }$ $55\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $8{7}^{\circ }$ $160\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $8{8}^{\circ }$ $360\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $8{9}^{\circ }$ $640\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $9{0}^{\circ }$ $1100\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $9{1}^{\circ }$ $1700\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $<$ high-altitude $9{2}^{\circ }$ $2600\phantom{\rule{-0.54753pt}{0ex}}$${}^{\prime }{\phantom{\rule{-1.09506pt}{0ex}}}^{\prime }$ $<$ sites only
The results for radio are slightly worse over most of the range, becoming significantly worse below $\zeta =8{8}^{\circ }$ and unusable beyond $\zeta =9{0}^{\circ }$.
(4)
See also the routine sla_REFZ, which performs the adjustment to the zenith distance rather than in $\left[\phantom{\rule{0.3em}{0ex}}x,y,z\phantom{\rule{0.3em}{0ex}}\right]$. The present routine is faster than sla_REFZ and, except very low down, is equally accurate for all practical purposes. However, beyond about $\zeta =8{4}^{\circ }$ sla_REFZ should be used, and for the utmost accuracy iterative use of sla_REFRO should be considered.