CppEphem
cppephem
src
mjd2jd.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
* mjd2jd.cpp: CppEphem *
3
* ----------------------------------------------------------------------- *
4
* Copyright © 2016 JCardenzana *
5
* ----------------------------------------------------------------------- *
6
* *
7
* This program is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
19
* *
20
***************************************************************************/
21
22
#include <iostream>
23
#include "
CppEphem.h
"
24
25
/**********************************************************************/
27
int
main
(
int
argc,
const
char
* argv[]) {
28
// Check that we've been passed an actual argument
29
if
(argc < 2) {
30
// Print some usage information
31
std::cout <<
"mjd2jd v"
<< CPPEPHEM_VERSION <<
"\n"
;
32
std::cout <<
"\nUSAGE: mjd2jd <modified julian date>\n"
;
33
std::cout <<
"RETURNED: Julian Date\n\n"
;
34
return
0 ;
35
}
36
37
// Convert the input variable to a double
38
double
mjd = std::stod(std::string(argv[1])) ;
39
40
std::printf(
"%f\n"
,
CEDate::MJD2JD
(mjd)) ;
41
42
return
0 ;
43
}
main
int main(int argc, const char *argv[])
Definition:
mjd2jd.cpp:26
CppEphem.h
CEDate::MJD2JD
static double MJD2JD(double mjd)
Modified Julian date -> Julian date conversion method.
Definition:
CEDate.cpp:241
Generated on Wed Aug 21 2019 12:14:12 for CppEphem by
1.8.16