source: trunk/MagicSoft/slalib/bear.c@ 6147

Last change on this file since 6147 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"
3float slaBear ( float a1, float b1, float a2, float b2 )
4/*
5** - - - - - - - -
6** s l a B e a r
7** - - - - - - - -
8**
9** Bearing (position angle) of one point on a sphere relative
10** to another.
11**
12** (single precision)
13**
14** Given:
15** a1,b1 float spherical coordinates of one point
16** a2,b2 float spherical coordinates of the other point
17**
18** (The spherical coordinates are RA,Dec, Long,Lat etc, in radians.)
19**
20** The result is the bearing (position angle), in radians, of point
21** a2,b2 as seen from point a1,b1. It is in the range +/- pi. The
22** sense is such that if a2,b2 is a small distance east of a1,b1,
23** the bearing is about +pi/2. Zero is returned if the two points
24** are coincident.
25**
26** If either b-coordinate is outside the range +/- pi/2, the
27** result may correspond to "the long way round".
28**
29** The routine slaPav performs an equivalent function except
30** that the points are specified in the form of Cartesian unit
31** vectors.
32**
33** Called: slaDbear
34**
35** Last revision: 8 December 1996
36**
37** Copyright P.T.Wallace. All rights reserved.
38*/
39{
40 return (float) slaDbear ( (double) a1, (double) b1,
41 (double) a2, (double) b2 );
42}
Note: See TracBrowser for help on using the repository browser.