source: trunk/MagicSoft/slalib/pav.c@ 19661

Last change on this file since 19661 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3double slaPav ( float v1 [ 3 ], float v2 [ 3 ] )
4/*
5** - - - - - - -
6** s l a P a v
7** - - - - - - -
8**
9** Position angle of one celestial direction with respect to another.
10**
11** (single precision)
12**
13** Given:
14** v1 float[3] direction cosines of one point
15** v2 float[3] direction cosines of the other point
16**
17** (The coordinate frames correspond to RA,Dec, Long,Lat etc.)
18**
19** The result is the bearing (position angle), in radians, of point
20** v2 with respect to point v1. It is in the range +/- pi. The
21** sense is such that if v2 is a small distance east of v1, the
22** bearing is about +pi/2. Zero is returned if the two points
23** are coincident.
24**
25** The vectors v1 and v2 need not be unit vectors.
26**
27** The routine slaBear performs an equivalent function except
28** that the points are specified in the form of spherical
29** coordinates.
30**
31** Called: slaDpav
32**
33** Last revision: 9 December 1996
34**
35** Copyright P.T.Wallace. All rights reserved.
36*/
37{
38 int i;
39 double d1 [ 3 ], d2 [ 3 ];
40
41
42/* Call the double precision version. */
43 for ( i = 0; i < 3; i++ ) {
44 d1 [ i ] = (double) v1 [ i ];
45 d2 [ i ] = (double) v2 [ i ];
46 }
47 return (float) slaDpav ( d1, d2 );
48}
Note: See TracBrowser for help on using the repository browser.