i coded a thing and it appears to be the inverse
btw for a point on pavala:
h = radius_of_pavala sin(lat)
w = radius_of_pavala cos(lat) cos(lon)
z = radius_of_pavala cos(lat) sin(lon)
r = sqrt((distance_from_pavala_to_haki - w)^2 + z^2)
alpha = arctan(sqrt(h^2+z^2)/r)
altitude = pi/2-arccos(cos(lat) cos(-lon))-abs(alpha)
(lat, lon) are relative to the equatorial plane and the meridian at which haki is located
(w, z, h) describes the point on the surface of pavala in cartesian coordinates from the center of pavala
h is a vertical axis parallel to pavala's
w is along the pavala-haki axis inside pavala
z is along the axis perpendicular to h and w
r is the distance between haki's center and the location on pavala
alpha is the corrective angle "below" the theoretical location of haki at infinite distance
altitude is your answer
i also have some code for a point which i'll upload