FlightGear next
bodysolver.hxx
Go to the documentation of this file.
1/*
2 * bodysolver.hxx - given a location on earth and a time of day/date,
3 * find the number of seconds to various solar system body
4 * positions.
5 *
6 * Written by Curtis Olson, started September 2003.
7 *
8 * Copyright (C) 2003 Curtis L. Olson - http://www.flightgear.org/~curt
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 *
24 * $Id$
25 */
26
27
28#ifndef _BODYSOLVER_HXX
29#define _BODYSOLVER_HXX
30
31
32#ifndef __cplusplus
33# error This library requires C++
34#endif
35
36#include <simgear/compiler.h>
37
38#include <ctime>
39
40class SGGeod;
41
50time_t fgTimeSecondsUntilBodyAngle( time_t cur_time,
51 const SGGeod& loc,
52 double target_angle_deg,
53 bool ascending,
54 bool sun_not_moon );
55
62void fgBodyPositionGST(double gst, double& lon, double& lat, bool sun_not_moon);
63
64
65#endif /* _BODYSOLVER_HXX */
void fgBodyPositionGST(double gst, double &lon, double &lat, bool sun_not_moon)
given a particular time expressed in side real time at prime meridian (GST), compute position on the ...
time_t fgTimeSecondsUntilBodyAngle(time_t cur_time, const SGGeod &loc, double target_angle_deg, bool ascending, bool sun_not_moon)
Given the current unix time in seconds, calculate seconds to the specified solar system body angle (r...