I found some issues when implementing the formulas from my master's thesis. I maintain wrong formulas in the code, but commented with "#WRONG".
The correct formula for the discrepancies between direct and reflected elevation angles is $\Delta e_r = e_d - e_r^s$. In the thesis, it's presented as $\Delta e_r = -e_d - e_r^s$ (p. 69, eq. 114);
The second formula for $D_i$ (p. 73, eq. 123) is incorrect. It should be reformulated or discarded. The first formula $D_i = D_l^s*(\sqrt\gamma- sin(g))$ is correct;
The formula of altimetry correction on eq. 126 (p. 74) is not correct. It should be revised and reformulated. To compute altimetry correction I'm using the gradient.
I found some issues when implementing the formulas from my master's thesis. I maintain wrong formulas in the code, but commented with "#WRONG".
Originally posted by @vitorhjr in https://github.com/vitorhjr/geo-alhazen/issues/7#issuecomment-1295253432
https://github.com/vitorhjr/geo-alhazen/blob/main/get_spherical_reflection_trig.m