SOFA  20200721
Functions
vector/matrix support function

Functions

void iauA2af (int ndp, double angle, char *sign, int idmsf[4])
 Decompose radians into degrees, arcminutes, arcseconds, fraction. More...
 
void iauA2tf (int ndp, double angle, char *sign, int ihmsf[4])
 Decompose radians into hours, minutes, seconds, fraction. More...
 
double iauAnp (double a)
 Normalize angle into the range 0 <= a < 2pi. More...
 
double iauAnpm (double a)
 Normalize angle into the range -pi <= a < +pi. More...
 
void iauC2s (double p[3], double *theta, double *phi)
 P-vector to spherical coordinates. More...
 
void iauCp (double p[3], double c[3])
 Copy a p-vector. More...
 
void iauCpv (double pv[2][3], double c[2][3])
 Copy a position/velocity vector. More...
 
void iauCr (double r[3][3], double c[3][3])
 Copy an r-matrix. More...
 
void iauD2tf (int ndp, double days, char *sign, int ihmsf[4])
 Decompose days to hours, minutes, seconds, fraction. More...
 
void iauIr (double r[3][3])
 Initialize an r-matrix to the identity matrix. More...
 
void iauP2pv (double p[3], double pv[2][3])
 Extend a p-vector to a pv-vector by appending a zero velocity. More...
 
void iauP2s (double p[3], double *theta, double *phi, double *r)
 P-vector to spherical polar coordinates. More...
 
double iauPap (double a[3], double b[3])
 Position-angle from two p-vectors. More...
 
double iauPas (double al, double ap, double bl, double bp)
 Position-angle from spherical coordinates. More...
 
double iauPdp (double a[3], double b[3])
 p-vector inner (=scalar=dot) product. More...
 
double iauPm (double p[3])
 Modulus of p-vector. More...
 
void iauPmp (double a[3], double b[3], double amb[3])
 P-vector subtraction. More...
 
void iauPn (double p[3], double *r, double u[3])
 Convert a p-vector into modulus and unit vector. More...
 
void iauPpp (double a[3], double b[3], double apb[3])
 P-vector addition. More...
 
void iauPpsp (double a[3], double s, double b[3], double apsb[3])
 P-vector scale and addition. More...
 
void iauPv2p (double pv[2][3], double p[3])
 Discard velocity component of a pv-vector. More...
 
void iauPv2s (double pv[2][3], double *theta, double *phi, double *r, double *td, double *pd, double *rd)
 Convert position/velocity from Cartesian to spherical coordinates. More...
 
void iauPvdpv (double a[2][3], double b[2][3], double adb[2])
 Inner (=scalar=dot) product of two pv-vectors. More...
 
void iauPvm (double pv[2][3], double *r, double *s)
 Modulus of pv-vector. More...
 
void iauPvmpv (double a[2][3], double b[2][3], double amb[2][3])
 Subtract one pv-vector from another. More...
 
void iauPvppv (double a[2][3], double b[2][3], double apb[2][3])
 Add one pv-vector to another. More...
 
void iauPvu (double dt, double pv[2][3], double upv[2][3])
 Update a pv-vector. More...
 
void iauPvup (double dt, double pv[2][3], double p[3])
 Update a pv-vector, discarding the velocity component. More...
 
void iauPvxpv (double a[2][3], double b[2][3], double axb[2][3])
 Outer (=vector=cross) product of two pv-vectors.Notes: More...
 
void iauPxp (double a[3], double b[3], double axb[3])
 p-vector outer (=vector=cross) product. More...
 
void iauRm2v (double r[3][3], double w[3])
 Express an r-matrix as an r-vector. More...
 
void iauRv2m (double w[3], double r[3][3])
 Form the r-matrix corresponding to a given r-vector. More...
 
void iauRx (double phi, double r[3][3])
 Rotate an r-matrix about the x-axis. More...
 
void iauRxp (double r[3][3], double p[3], double rp[3])
 Multiply a p-vector by an r-matrix. More...
 
void iauRxpv (double r[3][3], double pv[2][3], double rpv[2][3])
 Multiply a pv-vector by an r-matrix. More...
 
void iauRxr (double a[3][3], double b[3][3], double atb[3][3])
 Multiply two r-matrices. More...
 
void iauRy (double theta, double r[3][3])
 Rotate an r-matrix about the y-axis. More...
 
void iauRz (double psi, double r[3][3])
 Rotate an r-matrix about the z-axis. More...
 
void iauS2c (double theta, double phi, double c[3])
 Convert spherical coordinates to Cartesian. More...
 
void iauS2p (double theta, double phi, double r, double p[3])
 Convert spherical polar coordinates to p-vector. More...
 
void iauS2xpv (double s1, double s2, double pv[2][3], double spv[2][3])
 Multiply a pv-vector by two scalars. More...
 
double iauSepp (double a[3], double b[3])
 Angular separation between two p-vectors. More...
 
double iauSeps (double al, double ap, double bl, double bp)
 Angular separation between two sets of spherical coordinates. More...
 
void iauSxp (double s, double p[3], double sp[3])
 Multiply a p-vector by a scalar. More...
 
void iauSxpv (double s, double pv[2][3], double spv[2][3])
 Multiply a pv-vector by a scalar. More...
 
void iauTr (double r[3][3], double rt[3][3])
 Transpose an r-matrix. More...
 
void iauTrxp (double r[3][3], double p[3], double trp[3])
 Multiply a p-vector by the transpose of an r-matrix. More...
 
void iauTrxpv (double r[3][3], double pv[2][3], double trpv[2][3])
 Multiply a pv-vector by the transpose of an r-matrix. More...
 
void iauZp (double p[3])
 Zero a p-vector. More...
 
void iauZpv (double pv[2][3])
 Zero a pv-vector. More...
 
void iauZr (double r[3][3])
 Initialize an r-matrix to the null matrix. More...
 

Detailed Description

Function Documentation

◆ iauA2af()

void iauA2af ( int  ndp,
double  angle,
char *  sign,
int  idmsf[4] 
)

Decompose radians into degrees, arcminutes, arcseconds, fraction.

1) The argument ndp is interpreted as follows:

     ndp         resolution
      :      ...0000 00 00
     -7         1000 00 00
     -6          100 00 00
     -5           10 00 00
     -4            1 00 00
     -3            0 10 00
     -2            0 01 00
     -1            0 00 10
      0            0 00 01
      1            0 00 00.1
      2            0 00 00.01
      3            0 00 00.001
      :            0 00 00.000...
* 

2) The largest positive useful value for ndp is determined by the size of angle, the format of doubles on the target platform, and the risk of overflowing idmsf[3]. On a typical platform, for angle up to 2pi, the available floating-point precision might correspond to ndp=12. However, the practical limit is typically ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is only 16 bits.

3) The absolute value of angle may exceed 2pi. In cases where it does not, it is up to the caller to test for and handle the case where angle is very nearly 2pi and rounds up to 360 degrees, by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.

Parameters
[in]ndpresolution
[in]angleangle in radians
[out]sign'+' or '-'
[out]idmsfdegrees, arcminutes, arcseconds, fraction
Here is the call graph for this function:

◆ iauA2tf()

void iauA2tf ( int  ndp,
double  angle,
char *  sign,
int  ihmsf[4] 
)

Decompose radians into hours, minutes, seconds, fraction.

1) The argument ndp is interpreted as follows:

     ndp         resolution
      :      ...0000 00 00
     -7         1000 00 00
     -6          100 00 00
     -5           10 00 00
     -4            1 00 00
     -3            0 10 00
     -2            0 01 00
     -1            0 00 10
      0            0 00 01
      1            0 00 00.1
      2            0 00 00.01
      3            0 00 00.001
      :            0 00 00.000...
* 

2) The largest positive useful value for ndp is determined by the size of angle, the format of doubles on the target platform, and the risk of overflowing ihmsf[3]. On a typical platform, for angle up to 2pi, the available floating-point precision might correspond to ndp=12. However, the practical limit is typically ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is only 16 bits.

3) The absolute value of angle may exceed 2pi. In cases where it does not, it is up to the caller to test for and handle the case where angle is very nearly 2pi and rounds up to 24 hours, by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero.

Parameters
[in]ndpresolution
[in]angleangle in radians
[out]sign'+' or '-'
[out]ihmsfhours, minutes, seconds, fraction
Here is the call graph for this function:

◆ iauAnp()

double iauAnp ( double  a)

Normalize angle into the range 0 <= a < 2pi.

Parameters
[in]aangle (radians)
Returns
angle in range 0-2pi

◆ iauAnpm()

double iauAnpm ( double  a)

Normalize angle into the range -pi <= a < +pi.

Parameters
[in]aangle (radians)
Returns
angle in range +/-pi

◆ iauC2s()

void iauC2s ( double  p[3],
double *  theta,
double *  phi 
)

P-vector to spherical coordinates.

Parameters
[in]pp-vector
[out]thetalongitude angle (radians)
[out]philatitude angle (radians)

Notes:

1) The vector p can have any magnitude; only its direction is used.

2) If p is null, zero theta and phi are returned.

3) At either pole, zero theta is returned.

◆ iauCp()

void iauCp ( double  p[3],
double  c[3] 
)

Copy a p-vector.

Parameters
[in]pp-vector to be copied
[out]ccopy

◆ iauCpv()

void iauCpv ( double  pv[2][3],
double  c[2][3] 
)

Copy a position/velocity vector.

Parameters
[in]pvposition/velocity vector to be copied
[out]ccopy
Here is the call graph for this function:

◆ iauCr()

void iauCr ( double  r[3][3],
double  c[3][3] 
)

Copy an r-matrix.

Parameters
[in]rr-matrix to be copied
[out]char[]copy
Here is the call graph for this function:

◆ iauD2tf()

void iauD2tf ( int  ndp,
double  days,
char *  sign,
int  ihmsf[4] 
)

Decompose days to hours, minutes, seconds, fraction.

Parameters
[in]ndpresolution (Note 1)
[in]daysinterval in days
[out]sign'+' or '-'
[out]ihmsfhours, minutes, seconds, fraction

Notes:

1) The argument ndp is interpreted as follows:

*     ndp         resolution
*      :      ...0000 00 00
*     -7         1000 00 00
*     -6          100 00 00
*     -5           10 00 00
*     -4            1 00 00
*     -3            0 10 00
*     -2            0 01 00
*     -1            0 00 10
*      0            0 00 01
*      1            0 00 00.1
*      2            0 00 00.01
*      3            0 00 00.001
*      :            0 00 00.000...
*

2) The largest positive useful value for ndp is determined by the size of days, the format of double on the target platform, and the risk of overflowing ihmsf[3]. On a typical platform, for days up to 1.0, the available floating-point precision might correspond to ndp=12. However, the practical limit is typically ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is only 16 bits.

3) The absolute value of days may exceed 1.0. In cases where it does not, it is up to the caller to test for and handle the case where days is very nearly 1.0 and rounds up to 24 hours, by testing for ihmsf[0]=24 and setting ihmsf[0-3] to zero.

◆ iauIr()

void iauIr ( double  r[3][3])

Initialize an r-matrix to the identity matrix.

Returned:

Parameters
[out]rr-matrix

◆ iauP2pv()

void iauP2pv ( double  p[3],
double  pv[2][3] 
)

Extend a p-vector to a pv-vector by appending a zero velocity.

Parameters
[in]pp-vector
[out]pvpv-vector
Here is the call graph for this function:

◆ iauP2s()

void iauP2s ( double  p[3],
double *  theta,
double *  phi,
double *  r 
)

P-vector to spherical polar coordinates.

Parameters
[in]pp-vector
[out]thetalongitude angle (radians)
[out]philatitude angle (radians)
[out]rradial distance

Notes:

1) If P is null, zero theta, phi and r are returned.

2) At either pole, zero theta is returned.

Here is the call graph for this function:

◆ iauPap()

double iauPap ( double  a[3],
double  b[3] 
)

Position-angle from two p-vectors.

Parameters
[in]adirection of reference point
[in]bdirection of point whose PA is required
Returns
position angle of b with respect to a (radians)

Notes:

1) The result is the position angle, in radians, of direction b with respect to direction a. It is in the range -pi to +pi. The sense is such that if b is a small distance "north" of a the position angle is approximately zero, and if b is a small distance "east" of a the position angle is approximately +pi/2.

2) The vectors a and b need not be of unit length.

3) Zero is returned if the two directions are the same or if either vector is null.

4) If vector a is at a pole, the result is ill-defined.

Here is the call graph for this function:

◆ iauPas()

double iauPas ( double  al,
double  ap,
double  bl,
double  bp 
)

Position-angle from spherical coordinates.

Parameters
[in]allongitude of point A (e.g. RA) in radians
[in]aplatitude of point A (e.g. Dec) in radians
[in]bllongitude of point B
[in]bplatitude of point B
Returns
position angle of B with respect to A

Notes:

1) The result is the bearing (position angle), in radians, of point B with respect to point A. It is in the range -pi to +pi. The sense is such that if B is a small distance "east" of point A, the bearing is approximately +pi/2.

2) Zero is returned if the two points are coincident.

◆ iauPdp()

double iauPdp ( double  a[3],
double  b[3] 
)

p-vector inner (=scalar=dot) product.

Parameters
[in]afirst p-vector
[in]bsecond p-vector
Returns
a . b

◆ iauPm()

double iauPm ( double  p[3])

Modulus of p-vector.

Parameters
[in]pp-vector
Returns
modulus

◆ iauPmp()

void iauPmp ( double  a[3],
double  b[3],
double  amb[3] 
)

P-vector subtraction.

Parameters
[in]afirst p-vector
[in]bsecond p-vector
[out]amba - b

Note: It is permissible to re-use the same array for any of the arguments.

◆ iauPn()

void iauPn ( double  p[3],
double *  r,
double  u[3] 
)

Convert a p-vector into modulus and unit vector.

Parameters
[in]pp-vector
[out]rmodulus
[out]uunit vector

Notes:

1) If p is null, the result is null. Otherwise the result is a unit vector.

2) It is permissible to re-use the same array for any of the arguments.

Here is the call graph for this function:

◆ iauPpp()

void iauPpp ( double  a[3],
double  b[3],
double  apb[3] 
)

P-vector addition.

Parameters
[in]afirst p-vector
[in]bsecond p-vector
[out]apba + b

Note: It is permissible to re-use the same array for any of the arguments.

◆ iauPpsp()

void iauPpsp ( double  a[3],
double  s,
double  b[3],
double  apsb[3] 
)

P-vector scale and addition.

Parameters
[in]afirst p-vector
[in]sscalar (multiplier for b)
[in]bsecond p-vector
[out]apsba + s*b

Note: It is permissible for any of a, b and apsb to be the same array.

Here is the call graph for this function:

◆ iauPv2p()

void iauPv2p ( double  pv[2][3],
double  p[3] 
)

Discard velocity component of a pv-vector.

Parameters
[in]pvpv-vector
[out]pp-vector
Here is the call graph for this function:

◆ iauPv2s()

void iauPv2s ( double  pv[2][3],
double *  theta,
double *  phi,
double *  r,
double *  td,
double *  pd,
double *  rd 
)

Convert position/velocity from Cartesian to spherical coordinates.

Parameters
[in]pvpv-vector
[out]thetalongitude angle (radians)
[out]philatitude angle (radians)
[out]rradial distance
[out]tdrate of change of theta
[out]pdrate of change of phi
[out]rdrate of change of r

Notes:

1) If the position part of pv is null, theta, phi, td and pd are indeterminate. This is handled by extrapolating the position through unit time by using the velocity part of pv. This moves the origin without changing the direction of the velocity component. If the position and velocity components of pv are both null, zeroes are returned for all six results.

2) If the position is a pole, theta, td and pd are indeterminate. In such cases zeroes are returned for all three.

◆ iauPvdpv()

void iauPvdpv ( double  a[2][3],
double  b[2][3],
double  adb[2] 
)

Inner (=scalar=dot) product of two pv-vectors.

Parameters
[in]afirst pv-vector
[in]bsecond pv-vector
[out]adba . b (see note)

Note:

If the position and velocity components of the two pv-vectors are ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of numbers ( ap . bp , ap . bv + av . bp ). The two numbers are the dot-product of the two p-vectors and its derivative.

Here is the call graph for this function:

◆ iauPvm()

void iauPvm ( double  pv[2][3],
double *  r,
double *  s 
)

Modulus of pv-vector.

Parameters
[in]pvpv-vector
[out]rmodulus of position component
[out]smodulus of velocity component
Here is the call graph for this function:

◆ iauPvmpv()

void iauPvmpv ( double  a[2][3],
double  b[2][3],
double  amb[2][3] 
)

Subtract one pv-vector from another.

Parameters
[in]afirst pv-vector
[in]bsecond pv-vector
[out]amba - b

Note: It is permissible to re-use the same array for any of the arguments.

Here is the call graph for this function:

◆ iauPvppv()

void iauPvppv ( double  a[2][3],
double  b[2][3],
double  apb[2][3] 
)

Add one pv-vector to another.

Parameters
[in]afirst pv-vector
[in]bsecond pv-vector
[out]apba + b

Note: It is permissible to re-use the same array for any of the arguments.

Here is the call graph for this function:

◆ iauPvu()

void iauPvu ( double  dt,
double  pv[2][3],
double  upv[2][3] 
)

Update a pv-vector.

Parameters
[in]dttime interval
[in]pvpv-vector
[out]upvp updated, v unchanged

Notes:

1) "Update" means "refer the position component of the vector to a new date dt time units from the existing date".

2) The time units of dt must match those of the velocity.

3) It is permissible for pv and upv to be the same array.

Here is the call graph for this function:

◆ iauPvup()

void iauPvup ( double  dt,
double  pv[2][3],
double  p[3] 
)

Update a pv-vector, discarding the velocity component.

Parameters
[in]dttime interval
[in]pvpv-vector
[out]pp-vector

Notes:

1) "Update" means "refer the position component of the vector to a new date dt time units from the existing date".

2) The time units of dt must match those of the velocity.

◆ iauPvxpv()

void iauPvxpv ( double  a[2][3],
double  b[2][3],
double  axb[2][3] 
)

Outer (=vector=cross) product of two pv-vectors.Notes:

Outer (=vector=cross) product of two pv-vectors.

1) If the position and velocity components of the two pv-vectors are ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of vectors ( ap x bp, ap x bv + av x bp ). The two vectors are the cross-product of the two p-vectors and its derivative.

2) It is permissible to re-use the same array for any of the arguments.

Parameters
[in]afirst pv -vector
[in]bsecond pv -vector
[out]axbax b
[in]afirst pv-vector
[in]bsecond pv-vector
[out]axba x b

Notes:

1) If the position and velocity components of the two pv-vectors are ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of vectors ( ap x bp, ap x bv + av x bp ). The two vectors are the cross-product of the two p-vectors and its derivative.

2) It is permissible to re-use the same array for any of the arguments.

Here is the call graph for this function:

◆ iauPxp()

void iauPxp ( double  a[3],
double  b[3],
double  axb[3] 
)

p-vector outer (=vector=cross) product.

Parameters
[in]afirst p-vector
[in]bsecond p-vector
[out]axba x b

Note: It is permissible to re-use the same array for any of the arguments.

◆ iauRm2v()

void iauRm2v ( double  r[3][3],
double  w[3] 
)

Express an r-matrix as an r-vector.

Parameters
[in]rrotation matrix
[out]wrotation vector (Note 1)

Notes:

1) A rotation matrix describes a rotation through some angle about some arbitrary axis called the Euler axis. The "rotation vector" returned by this function has the same direction as the Euler axis, and its magnitude is the angle in radians. (The magnitude and direction can be separated by means of the function iauPn.)

2) If r is null, so is the result. If r is not a rotation matrix the result is undefined; r must be proper (i.e. have a positive determinant) and real orthogonal (inverse = transpose).

3) The reference frame rotates clockwise as seen looking along the rotation vector from the origin.

◆ iauRv2m()

void iauRv2m ( double  w[3],
double  r[3][3] 
)

Form the r-matrix corresponding to a given r-vector.

Parameters
[in]wrotation vector (Note 1)
[out]rrotation matrix

Notes:

1) A rotation matrix describes a rotation through some angle about some arbitrary axis called the Euler axis. The "rotation vector" supplied to This function has the same direction as the Euler axis, and its magnitude is the angle in radians.

2) If w is null, the unit matrix is returned.

3) The reference frame rotates clockwise as seen looking along the rotation vector from the origin.

◆ iauRx()

void iauRx ( double  phi,
double  r[3][3] 
)

Rotate an r-matrix about the x-axis.

Parameters
[in]phiangle (radians)
[in,out]rr-matrix, rotated

Notes:

1) Calling this function with positive phi incorporates in the supplied r-matrix r an additional rotation, about the x-axis, anticlockwise as seen looking towards the origin from positive x.

2) The additional rotation can be represented by this matrix:

   (  1        0            0      )
   (                               )
   (  0   + cos(phi)   + sin(phi)  )
   (                               )
   (  0   - sin(phi)   + cos(phi)  )

◆ iauRxp()

void iauRxp ( double  r[3][3],
double  p[3],
double  rp[3] 
)

Multiply a p-vector by an r-matrix.

Parameters
[in]rr-matrix
[in]pp-vector
[out]rpr * p

Note: It is permissible for p and rp to be the same array.

Here is the call graph for this function:

◆ iauRxpv()

void iauRxpv ( double  r[3][3],
double  pv[2][3],
double  rpv[2][3] 
)

Multiply a pv-vector by an r-matrix.

Parameters
[in]rr-matrix
[in]pvpv-vector
[out]rpvr * pv

Note: It is permissible for pv and rpv to be the same array.

Here is the call graph for this function:

◆ iauRxr()

void iauRxr ( double  a[3][3],
double  b[3][3],
double  atb[3][3] 
)

Multiply two r-matrices.

Parameters
[in]afirst r-matrix
[in]bsecond r-matrix
[out]atba * b

Note: It is permissible to re-use the same array for any of the arguments.

Here is the call graph for this function:

◆ iauRy()

void iauRy ( double  theta,
double  r[3][3] 
)

Rotate an r-matrix about the y-axis.

Parameters
[in]thetaangle (radians)
[in,out]rr-matrix, rotated

Notes:

1) Calling this function with positive theta incorporates in the supplied r-matrix r an additional rotation, about the y-axis, anticlockwise as seen looking towards the origin from positive y.

2) The additional rotation can be represented by this matrix:

   (  + cos(theta)     0      - sin(theta)  )
   (                                        )
   (       0           1           0        )
   (                                        )
   (  + sin(theta)     0      + cos(theta)  )

◆ iauRz()

void iauRz ( double  psi,
double  r[3][3] 
)

Rotate an r-matrix about the z-axis.

Parameters
[in]psiangle (radians)
[in,out]rr-matrix, rotated

Notes:

1) Calling this function with positive psi incorporates in the supplied r-matrix r an additional rotation, about the z-axis, anticlockwise as seen looking towards the origin from positive z.

2) The additional rotation can be represented by this matrix:

   (  + cos(psi)   + sin(psi)     0  )
   (                                 )
   (  - sin(psi)   + cos(psi)     0  )
   (                                 )
   (       0            0         1  )

◆ iauS2c()

void iauS2c ( double  theta,
double  phi,
double  c[3] 
)

Convert spherical coordinates to Cartesian.

Parameters
[in]thetalongitude angle (radians)
[in]philatitude angle (radians)
[out]cdirection cosines

◆ iauS2p()

void iauS2p ( double  theta,
double  phi,
double  r,
double  p[3] 
)

Convert spherical polar coordinates to p-vector.

Parameters
[in]thetalongitude angle (radians)
[in]philatitude angle (radians)
[in]rradial distance
[out]pCartesian coordinates
Here is the call graph for this function:

◆ iauS2xpv()

void iauS2xpv ( double  s1,
double  s2,
double  pv[2][3],
double  spv[2][3] 
)

Multiply a pv-vector by two scalars.

Parameters
[in]s1scalar to multiply position component by
[in]s2scalar to multiply velocity component by
[in]pvpv-vector
[out]spvpv-vector: p scaled by s1, v scaled by s2

Note: It is permissible for pv and spv to be the same array.

Here is the call graph for this function:

◆ iauSepp()

double iauSepp ( double  a[3],
double  b[3] 
)

Angular separation between two p-vectors.

Parameters
[in]afirst p-vector (not necessarily unit length)
[in]bsecond p-vector (not necessarily unit length)
Returns
angular separation (radians, always positive)

Notes:

1) If either vector is null, a zero result is returned.

2) The angular separation is most simply formulated in terms of scalar product. However, this gives poor accuracy for angles near zero and pi. The present algorithm uses both cross product and dot product, to deliver full accuracy whatever the size of the angle.

Here is the call graph for this function:

◆ iauSeps()

double iauSeps ( double  al,
double  ap,
double  bl,
double  bp 
)

Angular separation between two sets of spherical coordinates.

Parameters
[in]alfirst longitude (radians)
[in]apfirst latitude (radians)
[in]blsecond longitude (radians)
[in]bpsecond latitude (radians)
Returns
angular separation (radians)
Here is the call graph for this function:

◆ iauSxp()

void iauSxp ( double  s,
double  p[3],
double  sp[3] 
)

Multiply a p-vector by a scalar.

Parameters
[in]sscalar
[in]pp-vector
[out]sps * p

Note: It is permissible for p and sp to be the same array.

◆ iauSxpv()

void iauSxpv ( double  s,
double  pv[2][3],
double  spv[2][3] 
)

Multiply a pv-vector by a scalar.

Parameters
[in]sscalar
[in]pvpv-vector
[out]spvs * pv

Note: It is permissible for pv and spv to be the same array

Here is the call graph for this function:

◆ iauTr()

void iauTr ( double  r[3][3],
double  rt[3][3] 
)

Transpose an r-matrix.

Parameters
[in]rr-matrix
[out]rttranspose

Note: It is permissible for r and rt to be the same array.

Here is the call graph for this function:

◆ iauTrxp()

void iauTrxp ( double  r[3][3],
double  p[3],
double  trp[3] 
)

Multiply a p-vector by the transpose of an r-matrix.

Parameters
[in]rr-matrix
[in]pp-vector
[out]trpr^T * p

Note: It is permissible for p and trp to be the same array.

Here is the call graph for this function:

◆ iauTrxpv()

void iauTrxpv ( double  r[3][3],
double  pv[2][3],
double  trpv[2][3] 
)

Multiply a pv-vector by the transpose of an r-matrix.

Parameters
[in]rr-matrix
[in]pvpv-vector
[out]trpvr * pv

Note: It is permissible for pv and trpv to be the same array.

Here is the call graph for this function:

◆ iauZp()

iauZp ( double  p[3])

Zero a p-vector.

Returned:

Parameters
[out]pp-vector

◆ iauZpv()

void iauZpv ( double  pv[2][3])

Zero a pv-vector.

Returned:

Parameters
[out]pvpv-vector
Here is the call graph for this function:

◆ iauZr()

void iauZr ( double  r[3][3])

Initialize an r-matrix to the null matrix.

Returned:

Parameters
[out]rr-matrix