QP
0.7SNAPSHOT
Control software for the ??SRT telescope

Encapsulates a rotation of a point about an axis. More...
#include <rotation.h>
Public Member Functions  
const Quaternion &  start (void) const 
Return the start point of the rotation.  
const Quaternion &  axis (void) const 
Return the axis of rotation.  
Rotation (const Quaternion start, const Quaternion axis)  
Create a rotation. More...  
double  intersection (const Quaternion &normal, const Quaternion &pole) const 
Determine whether a point will be rotated across a meridian. More...  
double  intersection (const Quaternion &normal, const float h) const 
Determine whether a point will be rotated across a plane bounded by a small circle. More...  
Encapsulates a rotation of a point about an axis.
It mostly exists to support the two intersection
methods.
Rotation::Rotation  (  const Quaternion  start, 
const Quaternion  axis  
) 
Create a rotation.
start  the point which is rotated 
axis  the axis about which the point is rotated 
double Rotation::intersection  (  const Quaternion &  normal, 
const Quaternion &  pole  
)  const 
Determine whether a point will be rotated across a meridian.
The point start
is rotated around an axis axis
. At what point does it cross a plane which is perpendicular to normal
? We are interested in the meridian which is the intersection of this plane and the halfgreatcircle obtained by rotating pole
by pi clockwise about normal
.
Returns tan(theta/2), where theta is the angle by which start
must be rotated to intersect the meridian. Negative values should be interpreted as theta/2 being in the second quadrant rather than the fourth (that is, theta is in the third or fourth quadrants).
See quaternionpointing notes, section meridians
.
double Rotation::intersection  (  const Quaternion &  normal, 
const float  h  
)  const 
Determine whether a point will be rotated across a plane bounded by a small circle.
The point start
is rotated around an axis axis
. At what point does it cross a plane which is perpendicular to normal
and which cuts the vector normal
at a distance h
from the origin?
Returns tan(theta/2), where theta is the angle by which A must be rotated to intersect the plane. Negative values should be interpreted as theta/2 being in the second quadrant rather than the fourth (that is, theta is in the third or fourth quadrants). We return the value of tan(theta/2) corresponding to the smaller value of theta (that is, the first intersection of the rotation with the plane).
See quaternionpointing notes, section meridians
.