source: trunk/MagicSoft/slalib/kbj.c@ 5524

Last change on this file since 5524 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaKbj ( int jb, double e, char *k, int *j )
4/*
5** - - - - - - -
6** s l a K b j
7** - - - - - - -
8**
9** Select epoch prefix 'B' or 'J'.
10**
11** Given:
12** jb int slaDbjin prefix status: 0=none, 1='B', 2='J'
13** e double epoch - Besselian or Julian
14**
15** Returned:
16** *k char 'B' or 'J'
17** *j int status: 0=OK
18**
19** If jb=0, B is assumed for e < 1984.0, otherwise J.
20**
21** Last revision: 23 October 1993
22**
23** Copyright P.T.Wallace. All rights reserved.
24*/
25{
26
27/* Preset status */
28 *j = 0;
29
30/* If prefix given expressly, use it */
31 if ( jb == 1 ) {
32 *k = 'B';
33 } else if ( jb == 2 ) {
34 *k = 'J';
35
36/* If no prefix, examine the epoch */
37 } else if ( jb == 0 ) {
38
39 /* If epoch is pre-1984.0, assume Besselian; otherwise Julian */
40 if ( e < 1984.0 ) {
41 *k = 'B';
42 } else {
43 *k = 'J';
44 }
45
46/* If illegal prefix, return error status */
47 } else {
48 *k = ' ';
49 *j = 1;
50 }
51}
Note: See TracBrowser for help on using the repository browser.