Unfortunately, we have not had much success from this.
You might try the response at:
https://stackoverflow.com/questions/43741885/how-to-convert-spherical-coordinates-to-equirectangular-projection-coordinates
This was our best attempt, but it does not take into account the non-linearity of the photosphere, so it is very imprecise on the sides of the center.
procedure PitchHeadFromClientCoords(viewer: TImageEnView; X, Y: integer; var pitch, heading: double);
var
fov: double;
uX, uY: double;
odx, ody: double;
begin
with (viewer.IEBitmap.VirtualBitmapProvider as TIEEquirectangularRenderer) do
begin
fov := CamFov;
pitch := CamPitch;
heading := CamHeading;
end;
// unitary desidered point
uX := X / viewer.ExtentX;
uY := Y / viewer.ExtentY;
// unitary distances from center to desidered point
odx := 0.5 - uX;
ody := 0.5 - uY;
mainform.Label10.Caption:=floattostr(odx);
// calc and add offset from current position
pitch := pitch - ody * fov;
heading := heading + odx * fov;
end;
Nigel
Xequte Software
www.imageen.com