How to find point on sphere from pitch and heading

789 Views Asked by At

I have a sphere of radius R and I would like to draw some vector positions on it given pitch and heading.

I have a heading between 0 and 360 (0 being +x direction), and a pitch between -90 and 90 (90 being straight up +z, -90 being straight down -z).

Given these two values, how can I calculate position on the surface of the sphere as a function of pitch and heading?

1

There are 1 best solutions below

3
On BEST ANSWER

$$ (x, y, z) = (\cos p' \cos h', \cos p' \sin h' , \sin p') $$ where $p$ is the pitch angle and $h$ is the heading, and $p' = \frac{\pi p}{180}, h' = \frac{\pi h}{180}$.