I’m not quite sure what your question is, SC. Short answer to the question of finding distance to the sea level horizon (ignoring refraction, which should be small in Mars’ atmosphere) is to apply the Pythagorean Theorem, using Excel notation:
R^2 + d^2 = (R+h)^2
solving for d:
d = sqrt(2*R*h+h^2)
Surface distance is then given by:
S = R*atan(d/R);
where:
R = planetary radius
h = observer (or target) height about sea level
d = slant distance between observer and sea level horizon
S = surface distance between observer and sea level horizon
atan() in radians, of course.
R, h in the same units, e.g., feet or meters.
Sea level = notional spherical equipotential surface.
Simplifying approximations are available:
when h << R, d ~ s and d ~ sqrt(2*R*h) ~ k*sqrt(h), where k is planetary constant and can be adjusted to account for refraction and differing units (feet for height, miles for distance, e.g.) on earth, k ~ 1.28 when R is in miles and h is in feet. See “The Practical American Navigator” for more details.
Note also that to determine the distance at which an observer above sea level can see a target above sea level, calculate d_observer and d_target separately and add. (Note also S_observer_target = S_observer+S_target, iow, don’t add slant ranges (d) and apply the atan formula.
Good luck.
Thanks LiM!