1 /*
2  *  - - - - - - - - - - - - - - - -
3  *   g a l _ m t c 2 t t _ t e s t
4  *  - - - - - - - - - - - - - - - -
5  *
6  *  This routine is part of the General Astrodynamics Library
7  *
8  *  Description:
9  *
10  *     Test gal_mtc2tt routine.
11  *
12  *  Status:
13  *
14  *     Internal test routine
15  *
16  *  Called:
17  *
18  *     gal_vdv
19  *     gal_mtc2tt
20  *
21  *  This Revision:
22  *
23  *     2009 January 5
24  *
25  *  Copyright (C) 2009 Paul C. L. Willmott. See notes at end.
26  */
27 
28 #include <math.h>
29 #include "gal_mtc2tt_test.h"
30 #include "gal_mtc2tt.h"
31 
32 void
gal_mtc2tt_test()33 gal_mtc2tt_test
34  (
35  )
36 
37 {
38 
39   double tt1, tt2 ;
40 
41   extern int gal_tfunc ;
42 
43 /*
44  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
45  */
46 
47   gal_mtc2tt (floor (44796.0 - 0.00096) , (44796.0 - 0.00096) - floor (44796.0 - 0.00096), &tt1, &tt2 ) ;
48   gal_vdv ( tt1, 2451549.0 , 1e-16, "gal_mtc2tt", "tt1 0" ) ;
49   gal_vdv ( tt2, 0.5 , 1e-5, "gal_mtc2tt", "tt2 0" ) ;
50 
51   gal_mtc2tt ( 44795.0, 23.99431/24.00, &tt1, &tt2 ) ;
52   gal_vdv ( tt1, 2451549.0, 1e-16, "gal_mtc2tt", "tt1 1" ) ;
53   gal_vdv ( tt2, 0.50074, 1e-5, "gal_mtc2tt", "tt2 1" ) ;
54 
55   gal_tfunc++ ;
56 
57 /*
58  * Finished.
59  */
60 
61 }
62 
63 /*
64  *  gal - General Astrodynamics Library
65  *  Copyright (C) 2009 Paul C. L. Willmott
66  *
67  *  This program is free software; you can redistribute it and/or modify
68  *  it under the terms of the GNU General Public License as published by
69  *  the Free Software Foundation; either version 2 of the License, or
70  *  (at your option) any later version.
71  *
72  *  This program is distributed in the hope that it will be useful,
73  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
74  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
75  *  GNU General Public License for more details.
76  *
77  *  You should have received a copy of the GNU General Public License along
78  *  with this program; if not, write to the Free Software Foundation, Inc.,
79  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
80  *
81  *  Contact:
82  *
83  *  Paul Willmott
84  *  vp9mu@amsat.org
85  */
86