2 * sunsolver.hxx - given a location on earth and a time of day/date,
3 * find the number of seconds to various sun positions.
5 * Written by Curtis Olson, started September 2003.
7 * Copyright (C) 2003 Curtis L. Olson - curt@flightgear.org
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #ifndef _SUNSOLVER_HXX
28 #define _SUNSOLVER_HXX
32 # error This library requires C++
35 #include <simgear/compiler.h>
37 #ifdef SG_HAVE_STD_INCLUDES
44 * Given the current unix time in seconds, calculate seconds to the
45 * specified sun angle (relative to straight up.) Also specify if we
46 * want the angle while the sun is ascending or descending. For
47 * instance noon is when the sun angle is 0 (or the closest it can
48 * get.) Dusk is when the sun angle is 90 and descending. Dawn is
49 * when the sun angle is 90 and ascending.
51 time_t fgTimeSecondsUntilSunAngle( time_t cur_time,
54 double target_angle_deg,
57 #endif /* _SUNSOLVER_HXX */