2 // fg_time.hxx -- data structures and routines for managing time related stuff.
4 // Written by Curtis Olson, started August 1997.
6 // Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 // (Log is kept at end of this file)
31 # error This library requires C++
46 #include <Flight/flight.hxx>
49 // Define a structure containing global time parameters
51 // the date/time in various forms
52 // Unix "calendar" time in seconds
55 // Break down of GMT time
61 // modified Julian date
64 // side real time at prime meridian
67 // local side real time
70 // the difference between the precise sidereal time algorithm
71 // result and the course result.
72 // course + diff has good accuracy for the short term
75 // An offset in seconds from the true time. Allows us to adjust
76 // the effective time of day.
79 // How much to change the value of warp each iteration. Allows us
80 // to make time progress faster than normal.
83 // Paused (0 = no, 1 = yes)
87 extern fgTIME cur_time_params;
90 // Update time variables such as gmt, julian date, and sidereal time
91 void fgTimeInit(fgTIME *t);
94 // Update the time dependent variables
95 void fgTimeUpdate(FGState *f, fgTIME *t);
98 #endif // _FG_TIME_HXX
102 // Revision 1.11 1998/12/05 15:54:29 curt
103 // Renamed class fgFLIGHT to class FGState as per request by JSB.
105 // Revision 1.10 1998/12/05 14:21:31 curt
106 // Moved struct fg_timestamp to class fgTIMESTAMP and moved it's definition
107 // to it's own file, timestamp.hxx.
109 // Revision 1.9 1998/12/04 01:32:50 curt
110 // Converted "struct fg_timestamp" to "class fgTIMESTAMP" and added some
111 // convenience inline operators.
113 // Revision 1.8 1998/10/16 23:28:00 curt
116 // Revision 1.7 1998/10/16 00:56:09 curt
117 // Converted to Point3D class.
119 // Revision 1.6 1998/07/27 18:42:22 curt
120 // Added a pause option.
122 // Revision 1.5 1998/05/22 21:14:54 curt
123 // Rewrote event.cxx in C++ as a class using STL for the internal event list
124 // and run queue this removes the arbitrary list sizes and makes things much
125 // more dynamic. Because this is C++-classified we can now have multiple
126 // event_tables if we'd ever want them.
128 // Revision 1.4 1998/04/28 01:22:17 curt
129 // Type-ified fgTIME and fgVIEW.
131 // Revision 1.3 1998/04/25 22:06:34 curt
132 // Edited cvs log messages in source files ... bad bad bad!
134 // Revision 1.2 1998/04/25 20:24:03 curt
135 // Cleaned up initialization sequence to eliminate interdependencies
136 // between sun position, lighting, and view position. This creates a
137 // valid single pass initialization path.
139 // Revision 1.1 1998/04/24 00:52:28 curt
140 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
142 // Separated out lighting calcs into their own file.
144 // Revision 1.20 1998/04/22 13:24:05 curt
145 // C++ - ifiing the code a bit.
146 // Starting to reorginize some of the lighting calcs to use a table lookup.
148 // Revision 1.19 1998/04/21 17:01:44 curt
149 // Fixed a problems where a pointer to a function was being passed around. In
150 // one place this functions arguments were defined as ( void ) while in another
151 // place they were defined as ( int ). The correct answer was ( int ).
153 // Prepairing for C++ integration.
155 // Revision 1.18 1998/04/08 23:35:40 curt
156 // Tweaks to Gnu automake/autoconf system.
158 // Revision 1.17 1998/04/03 22:12:56 curt
159 // Converting to Gnu autoconf system.
160 // Centralized time handling differences.
162 // Revision 1.16 1998/02/07 15:29:47 curt
163 // Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
164 // <chotchkiss@namg.us.anritsu.com>
166 // Revision 1.15 1998/01/27 00:48:06 curt
167 // Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
168 // system and commandline/config file processing code.
170 // Revision 1.14 1998/01/22 02:59:43 curt
171 // Changed #ifdef FILE_H to #ifdef _FILE_H
173 // Revision 1.13 1998/01/19 19:27:20 curt
174 // Merged in make system changes from Bob Kuehne <rpk@sgi.com>
175 // This should simplify things tremendously.
177 // Revision 1.12 1998/01/05 18:44:37 curt
178 // Add an option to advance/decrease time from keyboard.
180 // Revision 1.11 1997/12/19 23:35:07 curt
181 // Lot's of tweaking with sky rendering and lighting.
183 // Revision 1.10 1997/12/15 23:55:07 curt
184 // Add xgl wrappers for debugging.
185 // Generate terrain normals on the fly.
187 // Revision 1.9 1997/12/10 22:37:55 curt
188 // Prepended "fg" on the name of all global structures that didn't have it yet.
189 // i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
191 // Revision 1.8 1997/12/09 04:25:38 curt
192 // Working on adding a global lighting params structure.
194 // Revision 1.7 1997/11/25 19:25:41 curt
195 // Changes to integrate Durk's moon/sun code updates + clean up.
197 // Revision 1.6 1997/09/20 03:34:35 curt
198 // Still trying to get those durned stars aligned properly.
200 // Revision 1.5 1997/09/16 15:50:31 curt
201 // Working on star alignment and time issues.
203 // Revision 1.4 1997/09/13 02:00:08 curt
204 // Mostly working on stars and generating sidereal time for accurate star
207 // Revision 1.3 1997/09/04 02:17:39 curt
210 // Revision 1.2 1997/08/27 03:30:36 curt
211 // Changed naming scheme of basic shared structures.
213 // Revision 1.1 1997/08/13 21:56:00 curt