QP  0.7-SNAPSHOT Control software for the ??SRT telescope
Rotation Class Reference

Encapsulates a rotation of a point about an axis. More...

`#include <rotation.h>`

## Public Member Functions

const Quaternionstart (void) const
Return the start point of the rotation.

const Quaternionaxis (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...

## Detailed Description

Encapsulates a rotation of a point about an axis.

It mostly exists to support the two `intersection` methods.

## Constructor & Destructor Documentation

 Rotation::Rotation ( const Quaternion start, const Quaternion axis )

Create a rotation.

Parameters
 start the point which is rotated axis the axis about which the point is rotated

## Member Function Documentation

 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 half-great-circle 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 quaternion-pointing notes, section `meridians`.

Returns
tan(theta/2), as noted above; or return 0.0 if the rotation would not intersect the meridian at all
 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 quaternion-pointing notes, section `meridians`.

Returns
tan(theta/2), as noted above; or return 0.0 if the rotation would not intersect the meridian at all

The documentation for this class was generated from the following files: