coord.h
1/***************************************************************************
2 *
3 * Copyright (C) 1999 by Willem van Straten
4 * Licensed under the Academic Free License version 2.1
5 *
6 ***************************************************************************/
7// psrchive/Util/genutil/coord.h
8
9#ifndef __COORD_H
10#define __COORD_H
11
12#ifdef __cplusplus
13
14#include "MJD.h"
15
16/* ********************************************************************
17 bary_earth -
18 given an MJD, latitude and longitude in degrees, and elevation
19 in metres, returns the barycentric velocity (fraction of c)
20 and position (fraction of AU) of telescope.
21 ******************************************************************** */
22int bary_earth (const MJD& mjd_date, double longitude, double latitude,
23 double elevation, double* baryvel, double* barypos);
24
25/* ********************************************************************
26 doppler_factor -
27 given an MJD, then latitude, longitude and elevation (degrees
28 and metres), and the ra and dec of an astronomical source
29 (considered at rest), returns the doppler shift due to the
30 telescope's barycentric velocity
31 ******************************************************************** */
32int doppler_factor (const MJD& date, double ra, double dec,
33 double longitude, double latitude, double elevation,
34 double* dfactor);
35
36extern "C" {
37
38#endif
39
40/* ********************************************************************
41 str2coord -
42 converts a string with RA and DEC in their human notations:
43 RA in time-measure (1h = 15 deg)
44 DEC in sexagesimal angular measure
45 into an ra and dec in radians
46 ******************************************************************** */
47 int str2coord (double *ra, double *dec, const char* coordstr);
48 int str2ra (double *ra, const char* rastr);
49 int str2dec2 (double *dec, const char* decstr);
50
51 int coord2str (char* coordstring, unsigned strlen,
52 double ra, double dec, unsigned places);
53 int ra2str (char* rastr, unsigned rastrlen, double ra, unsigned places);
54 int dec2str2 (char* decstr, unsigned decstrlen, double dec, unsigned places);
55
56
57 int coord2name (char* pulsar, double ra, double dec);
58
59#ifdef __cplusplus
60 }
61#endif
62
63#endif
Class for representing modified Julian dates with high precision.
Definition MJD.h:23

Generated using doxygen 1.14.0