Path: SCPro/ProSensors
% Compute horizon unit vectors
This generates unit vectors that go from r to the horizon of a
spherical planet. theta is about about the LVLH z-axis. It draws an
image of the cone. Theta starts at -y LVLH.
Type HorizonUnitVectors for a demo.
--------------------------------------------------------------------------
Form:
u = HorizonUnitVectors(r,v,a,theta)
--------------------------------------------------------------------------
------
Inputs
------
r (3,1) Spacecraft position vector (km)
v (3,1) Spacecraft velocity vector
a (1,1) Planet radius (km) (Default Earth)
theta (1,:) Angle from LVLH +x around +z
-------
Outputs
-------
uH (3,:) Horizon unit vectors
rH (3,:) Horizon vectors (km)
--------------------------------------------------------------------------