<< CL_gm_raan2beta Geometry and events CL_gm_stationPointing >>

CelestLab >> Geometry and events > CL_gm_reflectionPtSph

CL_gm_reflectionPtSph

Reflection point on a sphere

Calling Sequence

[posr,incid] = CL_gm_reflectionPtSph(pos1,pos2,srad,pos2_inf);

Description

Parameters

pos1:

Position of object 1 in cartesian coordinates (3xN or 3x1)

pos2:

Position of object 2 in cartesian coordinates (relative to the same frame as object 1) (3xN or 3x1)

srad:

Sphere radius (1xN or 1x1)

pos2_inf:

(optional, boolean) Computation option: %t if object 2 is considered to be at infinity, %f otherwise. Default is %f

posr:

Position of reflection point (3xN)

incid:

Incidence at reflection point. NB: can be more than 90 degrees (1xN)

Authors

Examples

alpha = linspace(-%pi/2, %pi/2, 11);
pos1 = 2 * [1;0;0];
pos2 = 2 * [cos(alpha); sin(alpha); zeros(alpha)];
[posr, incid] = CL_gm_reflectionPtSph(pos1, pos2, 1);
theta1 = CL_vectAngle(pos1*ones(alpha)-posr, posr);
theta2 = CL_vectAngle(pos2-posr, posr);
theta2 - theta1 // should be 0
theta1 - incid  // should be 0

Report an issue
<< CL_gm_raan2beta Geometry and events CL_gm_stationPointing >>