]> git.mxchange.org Git - flightgear.git/commitdiff
C++ ifying ...
authorcurt <curt>
Sat, 17 Oct 1998 01:33:52 +0000 (01:33 +0000)
committercurt <curt>
Sat, 17 Oct 1998 01:33:52 +0000 (01:33 +0000)
37 files changed:
Aircraft/aircraft.cxx
Aircraft/aircraft.hxx
Autopilot/autopilot.hxx
Cockpit/cockpit.cxx
Cockpit/hud.cxx
Cockpit/hud.hxx
Cockpit/hud_card.cxx
Cockpit/hud_dnst.cxx
Cockpit/hud_guag.cxx
Cockpit/hud_inst.cxx
Cockpit/hud_labl.cxx
Cockpit/hud_ladr.cxx
Cockpit/hud_scal.cxx
Cockpit/hud_tbi.cxx
Controls/Makefile.am
FDM/LaRCsim.cxx
FDM/LaRCsim.hxx
LaRCsim/ls_cockpit.h
LaRCsim/ls_interface.h
LaRCsim/navion_gear.c
Main/GLUTkey.cxx
Main/GLUTmain.cxx
Main/fg_init.cxx
Main/options.cxx
Main/splash.cxx
Main/views.cxx
Scenery/tilemgr.cxx
Slew/slew.cxx
Slew/slew.hxx
Time/fg_time.cxx
Time/light.cxx
Time/sunpos.cxx
Weather/Makefile.am
Weather/weather.c [deleted file]
Weather/weather.cxx [new file with mode: 0644]
Weather/weather.h [deleted file]
Weather/weather.hxx [new file with mode: 0644]

index bb2f2628f2aee34e0f723c11e0f3317b9a10df5d..d2ff48cae782ea546976631acd328100cc42b65c 100644 (file)
@@ -1,27 +1,25 @@
-/**************************************************************************
- * aircraft.c -- various aircraft routines
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// aircraft.cxx -- various aircraft routines
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
 
 
 #include <stdio.h>
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
 
-/* This is a record containing all the info for the aircraft currently
-   being operated */
+// This is a record containing all the info for the aircraft currently
+// being operated
 fgAIRCRAFT current_aircraft;
 
 
-/* Initialize an Aircraft structure */
+// Initialize an Aircraft structure
 void fgAircraftInit( void ) {
     fgPrintf( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure\n" );
 
@@ -44,7 +42,7 @@ void fgAircraftInit( void ) {
 }
 
 
-/* Display various parameters to stdout */
+// Display various parameters to stdout
 void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
     fgFLIGHT *f;
     fgCONTROLS *c;
@@ -63,72 +61,75 @@ void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
 }
 
 
-/* $Log$
-/* Revision 1.1  1998/10/16 23:26:47  curt
-/* C++-ifying.
-/*
- * Revision 1.19  1998/04/25 22:06:24  curt
- * Edited cvs log messages in source files ... bad bad bad!
- *
- * Revision 1.18  1998/04/18 04:13:56  curt
- * Moved fg_debug.c to it's own library.
- *
- * Revision 1.17  1998/02/12 21:59:31  curt
- * Incorporated code changes contributed by Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.16  1998/02/07 15:29:31  curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.15  1998/01/27 00:47:46  curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.14  1998/01/19 19:26:56  curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.13  1997/12/15 23:54:30  curt
- * Add xgl wrappers for debugging.
- * Generate terrain normals on the fly.
- *
- * Revision 1.12  1997/12/10 22:37:37  curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.11  1997/09/13 02:00:05  curt
- * Mostly working on stars and generating sidereal time for accurate star
- * placement.
- *
- * Revision 1.10  1997/08/27 03:29:56  curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.9  1997/07/19 22:39:08  curt
- * Moved PI to ../constants.h
- *
- * Revision 1.8  1997/06/25 15:39:45  curt
- * Minor changes to compile with rsxnt/win32.
- *
- * Revision 1.7  1997/06/02 03:01:39  curt
- * Working on views (side, front, back, transitions, etc.)
- *
- * Revision 1.6  1997/05/31 19:16:26  curt
- * Elevator trim added.
- *
- * Revision 1.5  1997/05/30 19:30:14  curt
- * The LaRCsim flight model is starting to look like it is working.
- *
- * Revision 1.4  1997/05/30 03:54:11  curt
- * Made a bit more progress towards integrating the LaRCsim flight model.
- *
- * Revision 1.3  1997/05/29 22:39:56  curt
- * Working on incorporating the LaRCsim flight model.
- *
- * Revision 1.2  1997/05/23 15:40:29  curt
- * Added GNU copyright headers.
- *
- * Revision 1.1  1997/05/16 15:58:24  curt
- * Initial revision.
- *
- */
+// $Log$
+// Revision 1.2  1998/10/17 01:33:52  curt
+// C++ ifying ...
+//
+// Revision 1.1  1998/10/16 23:26:47  curt
+// C++-ifying.
+//
+// Revision 1.19  1998/04/25 22:06:24  curt
+// Edited cvs log messages in source files ... bad bad bad!
+//
+// Revision 1.18  1998/04/18 04:13:56  curt
+// Moved fg_debug.c to it's own library.
+//
+// Revision 1.17  1998/02/12 21:59:31  curt
+// Incorporated code changes contributed by Charlie Hotchkiss
+// <chotchkiss@namg.us.anritsu.com>
+//
+// Revision 1.16  1998/02/07 15:29:31  curt
+// Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+// <chotchkiss@namg.us.anritsu.com>
+//
+// Revision 1.15  1998/01/27 00:47:46  curt
+// Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+// system and commandline/config file processing code.
+//
+// Revision 1.14  1998/01/19 19:26:56  curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.13  1997/12/15 23:54:30  curt
+// Add xgl wrappers for debugging.
+// Generate terrain normals on the fly.
+//
+// Revision 1.12  1997/12/10 22:37:37  curt
+// Prepended "fg" on the name of all global structures that didn't have it yet.
+// i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+//
+// Revision 1.11  1997/09/13 02:00:05  curt
+// Mostly working on stars and generating sidereal time for accurate star
+// placement.
+//
+// Revision 1.10  1997/08/27 03:29:56  curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.9  1997/07/19 22:39:08  curt
+// Moved PI to ../constants.h
+//
+// Revision 1.8  1997/06/25 15:39:45  curt
+// Minor changes to compile with rsxnt/win32.
+//
+// Revision 1.7  1997/06/02 03:01:39  curt
+// Working on views (side, front, back, transitions, etc.)
+//
+// Revision 1.6  1997/05/31 19:16:26  curt
+// Elevator trim added.
+//
+// Revision 1.5  1997/05/30 19:30:14  curt
+// The LaRCsim flight model is starting to look like it is working.
+//
+// Revision 1.4  1997/05/30 03:54:11  curt
+// Made a bit more progress towards integrating the LaRCsim flight model.
+//
+// Revision 1.3  1997/05/29 22:39:56  curt
+// Working on incorporating the LaRCsim flight model.
+//
+// Revision 1.2  1997/05/23 15:40:29  curt
+// Added GNU copyright headers.
+//
+// Revision 1.1  1997/05/16 15:58:24  curt
+// Initial revision.
+//
+
index 22aa00d16391a4ddae56e4a641cd010e21a7087c..5bf546630c4c02e46f664f095987b62edabf9fb2 100644 (file)
@@ -1,31 +1,31 @@
-/**************************************************************************
- * aircraft.h -- define shared aircraft parameters
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#ifndef _AIRCRAFT_H
-#define _AIRCRAFT_H
+//*************************************************************************
+// aircraft.hxx -- define shared aircraft parameters
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
+//*************************************************************************/
+
+
+#ifndef _AIRCRAFT_HXX
+#define _AIRCRAFT_HXX
 
 
 #ifndef __cplusplus                                                          
 
 
 #include <Flight/flight.hxx>
-#include <Controls/controls.h>
+#include <Controls/controls.hxx>
 
 
-/* Define a structure containing all the parameters for an aircraft */
+// Define a structure containing all the parameters for an aircraft
 typedef struct{
     fgFLIGHT   *flight;
     fgCONTROLS *controls;
 } fgAIRCRAFT ;
 
 
-/* current_aircraft contains all the parameters of the aircraft
-   currently being operated. */
+// current_aircraft contains all the parameters of the aircraft
+// currently being operated.
 extern fgAIRCRAFT current_aircraft;
 
 
-/* Initialize an Aircraft structure */
+// Initialize an Aircraft structure
 void fgAircraftInit( void );
 
 
-/* Display various parameters to stdout */
+// Display various parameters to stdout
 void fgAircraftOutputCurrent(fgAIRCRAFT *a);
 
 
-#endif /* _AIRCRAFT_H */
-
-
-/* $Log$
-/* Revision 1.1  1998/10/16 23:26:49  curt
-/* C++-ifying.
-/*
- * Revision 1.12  1998/04/22 13:26:15  curt
- * C++ - ifing the code a bit.
- *
- * Revision 1.11  1998/04/21 17:02:27  curt
- * Prepairing for C++ integration.
- *
- * Revision 1.10  1998/02/07 15:29:32  curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.9  1998/01/22 02:59:23  curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.8  1998/01/19 19:26:57  curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.7  1997/12/10 22:37:38  curt
- * Prepended "fg"AIRCRAFT_H */
-
-
-/* $Log$
-/* Revision 1.1  1998/10/16 23:26:49  curt
-/* C++-ifying.
-/*
- * Revision 1.12  1998/04/22 13:26:15  curt
- * C++ - ifing the code a bit.
- *
- * Revision 1.11  1998/04/21 17:02:27  curt
- * Prepairing for C++ integration.
- *
- * Revision 1.10  1998/02/07 15:29:32  curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.9  1998/01/22 02:59:23  curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.8  1998/01/19 19:26:57  curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.7  1997/12/10 22:37:38  curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.6  1997/09/13 02:00:06  curt
- * Mostly working on stars and generating sidereal time for accurate star
- * placement.
- *
- * Revision 1.5  1997/08/27 03:29:58  curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.4  1997/07/23 21:52:17  curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.3  1997/06/21 17:12:42  curt
- * Capitalized subdirectory names.
- *
- * Revision 1.2  1997/05/23 15:40:30  curt
- * Added GNU copyright headers.
- *
- * Revision 1.1  1997/05/16 15:58:25  curt
- * Initial revision.
- *
- */
+#endif // _AIRCRAFT_HXX
+
+
+// $Log$
+// Revision 1.2  1998/10/17 01:33:54  curt
+// C++ ifying ...
+//
+// Revision 1.1  1998/10/16 23:26:49  curt
+// C++-ifying.
+//
+// Revision 1.12  1998/04/22 13:26:15  curt
+// C++ - ifing the code a bit.
+//
+// Revision 1.11  1998/04/21 17:02:27  curt
+// Prepairing for C++ integration.
+//
+// Revision 1.10  1998/02/07 15:29:32  curt
+// Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+// <chotchkiss@namg.us.anritsu.com>
+//
+// Revision 1.9  1998/01/22 02:59:23  curt
+// Changed #ifdef FILE_H to #ifdef _FILE_H
+//
+// Revision 1.8  1998/01/19 19:26:57  curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.7  1997/12/10 22:37:38  curt
+// Prepended "fg" on the name of all global structures that didn't have it yet.
+// i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+//
+// Revision 1.6  1997/09/13 02:00:06  curt
+// Mostly working on stars and generating sidereal time for accurate star
+// placement.
+//
+// Revision 1.5  1997/08/27 03:29:58  curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.4  1997/07/23 21:52:17  curt
+// Put comments around the text after an #endif for increased portability.
+//
+// Revision 1.3  1997/06/21 17:12:42  curt
+// Capitalized subdirectory names.
+//
+// Revision 1.2  1997/05/23 15:40:30  curt
+// Added GNU copyright headers.
+//
+// Revision 1.1  1997/05/16 15:58:25  curt
+// Initial revision.
+//
index 5e6e426c715e15f0bd828cd6707f2a7103a913b8..9f729fa443f6877be332d75aeeb2999bd1aef521 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <Aircraft/aircraft.hxx>
 #include <Flight/flight.hxx>
-#include <Controls/controls.h>
+#include <Controls/controls.hxx>
                        
                        
 #ifdef __cplusplus                                                          
index ed3932cfc8ddada5c1c0cab87b5759382b5baf2a..e4c77d2f80c9be8633d095e54cd6fb2f1fc1b2f7 100644 (file)
@@ -50,7 +50,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 #include "cockpit.hxx"
 
@@ -316,6 +315,9 @@ void fgCockpitUpdate( void ) {
 
 
 // $Log$
+// Revision 1.19  1998/10/17 01:33:56  curt
+// C++ ifying ...
+//
 // Revision 1.18  1998/10/16 23:27:23  curt
 // C++-ifying.
 //
index 5a5f8ec809ce4ecbf7cb11b95c284d246798adec..3eff568eb964a000b0899d873af785c0b2ff7e16 100644 (file)
@@ -47,7 +47,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 #if defined ( __sun__ ) || defined ( __sgi )
 extern "C" {
@@ -830,6 +829,9 @@ void fgUpdateHUD( void ) {
 }
 
 // $Log$
+// Revision 1.25  1998/10/17 01:33:57  curt
+// C++ ifying ...
+//
 // Revision 1.24  1998/10/16 23:27:25  curt
 // C++-ifying.
 //
index cf611cb740edf582712d0c4db5458463660ef438..e1b34e1e5bb2886b3a9abb58471a8b099fa30134 100644 (file)
@@ -49,7 +49,7 @@
 #include <fg_constants.h>
 #include <Aircraft/aircraft.hxx>
 #include <Flight/flight.hxx>
-#include <Controls/controls.h>
+#include <Controls/controls.hxx>
 
 #include <deque>        // STL double ended queue
 
@@ -524,6 +524,9 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day );
 #endif // _HUD_H
 
 // $Log$
+// Revision 1.16  1998/10/17 01:33:59  curt
+// C++ ifying ...
+//
 // Revision 1.15  1998/10/16 23:27:27  curt
 // C++-ifying.
 //
index 1abc18cb67d0ee5f60e1c802b021ff0fba6dcaec..1abb0342a194425459d33424fe56b70c358c4818 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index 95f95b4039feb9be45ec7f2f7a7c37a9d15da3d9..6ba24e065105a7f020135b1a326ccc50c0650bf4 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index cbc9fde6e923c6e54332c7bece9650fe5c555349..9665f2ca518b3e1a00d85352400bba24e98f63a9 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index 2962c8d47fcd790331fa8f507a8062bebc854115..58e1e1cc59118963b4493c2267e0cd1d25ccd25c 100644 (file)
@@ -18,7 +18,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index e98e1df1ff24332a532a673b39c32afc451e047c..7050b67acbac1ae4b4d91979057ecf2b8bb9c695 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index 962ab84c2be1ddcb197a79f264a6121cf2acaf0b..40baac604f46f56ee61589088f69aeab7e4f3900 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index 25154b4bdc05536ab7a3ed45efbbb1c900a60414..d8ac7da921906a1113f2c66f4feb56e0f98f3198 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index 20080083e81456ca5ad1818b0cdd13448f18a95f..09513360dd21e487ff12485d2783150c9045abae 100644 (file)
@@ -15,7 +15,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 
 #include "hud.hxx"
index fea2585dfdef8996e4b4a0df7e8b8ccab7acaa4b..8327dc84c230419641819c93cfc5c2b124ad6221 100644 (file)
@@ -1,5 +1,5 @@
 noinst_LIBRARIES = libControls.a
 
-libControls_a_SOURCES = controls.c controls.h
+libControls_a_SOURCES = controls.cxx controls.hxx
 
 INCLUDES += -I$(top_builddir) -I$(top_builddir)/Simulator
index ede3e99f6f55c2bae69f27fa7078db0349a760f8..8adc23b4005497a36756c7ca07a84936b52b2085 100644 (file)
@@ -25,7 +25,7 @@
 #include "LaRCsim.hxx"
 
 #include <Aircraft/aircraft.hxx>
-#include <Controls/controls.h>
+#include <Controls/controls.hxx>
 #include <Flight/flight.hxx>
 #include <Flight/LaRCsim/ls_cockpit.h>
 #include <Flight/LaRCsim/ls_generic.h>
@@ -78,6 +78,17 @@ int fgLaRCsimUpdate(fgFLIGHT *f, int multiloop) {
 
 // Convert from the fgFLIGHT struct to the LaRCsim generic_ struct
 int fgFlight_2_LaRCsim (fgFLIGHT *f) {
+    fgCONTROLS *c;
+
+    c = current_aircraft.controls;
+
+    Lat_control = FG_Aileron;
+    Long_control = FG_Elevator;
+    Long_trim = FG_Elev_Trim;
+    Rudder_pedal = FG_Rudder;
+    Throttle_pct = FG_Throttle[0];
+    Brake_pct = FG_Brake_Amt;
+
     Mass =      FG_Mass;
     I_xx =      FG_I_xx;
     I_yy =      FG_I_yy;
@@ -254,16 +265,6 @@ int fgFlight_2_LaRCsim (fgFLIGHT *f) {
 
 // Convert from the LaRCsim generic_ struct to the fgFLIGHT struct
 int fgLaRCsim_2_Flight (fgFLIGHT *f) {
-    fgCONTROLS *c;
-
-    c = current_aircraft.controls;
-
-    Lat_control = FG_Aileron;
-    Long_control = FG_Elevator;
-    Long_trim = FG_Elev_Trim;
-    Rudder_pedal = FG_Rudder;
-    Throttle_pct = FG_Throttle[0];
-
     FG_Mass =   Mass;
     FG_I_xx =   I_xx;
     FG_I_yy =   I_yy;
@@ -439,6 +440,9 @@ int fgLaRCsim_2_Flight (fgFLIGHT *f) {
 
 
 // $Log$
+// Revision 1.2  1998/10/17 01:34:11  curt
+// C++ ifying ...
+//
 // Revision 1.1  1998/10/17 00:43:58  curt
 // Initial revision.
 //
index 642ebf44b025a77c63fd8e0468d4ed32d69ad1b0..2299410ff47e4fa6d0d835a6e8c69db5d95322e8 100644 (file)
@@ -1,27 +1,27 @@
-/**************************************************************************
- * ls_interface.h -- interface to the "LaRCsim" flight model
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+//*************************************************************************
+// LaRCsim.hxx -- interface to the "LaRCsim" flight model
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
+//*************************************************************************/
 
 
 #ifndef _LARCSIM_HXX
 #include "flight.hxx"
 
 
-/* reset flight params to a specific position */ 
+// reset flight params to a specific position 
 int fgLaRCsimInit(double dt);
 
-/* update position based on inputs, positions, velocities, etc. */
+// update position based on inputs, positions, velocities, etc.
 int fgLaRCsimUpdate(fgFLIGHT *f, int multiloop);
 
-/* Convert from the fgFLIGHT struct to the LaRCsim generic_ struct */
+// Convert from the fgFLIGHT struct to the LaRCsim generic_ struct
 int fgFlight_2_LaRCsim (fgFLIGHT *f);
 
-/* Convert from the LaRCsim generic_ struct to the fgFLIGHT struct */
+// Convert from the LaRCsim generic_ struct to the fgFLIGHT struct
 int fgLaRCsim_2_Flight (fgFLIGHT *f);
 
 
-#endif /* _LARCSIM_HXX */
+#endif // _LARCSIM_HXX
 
 
-/* $Log$
-/* Revision 1.1  1998/10/17 00:43:58  curt
-/* Initial revision.
-/*
- */
+// $Log$
+// Revision 1.2  1998/10/17 01:34:13  curt
+// C++ ifying ...
+//
+// Revision 1.1  1998/10/17 00:43:58  curt
+// Initial revision.
+//
index 96fc0006702e59d7d36f3d85dbf4a4c8608a2f93..3dcddcdc992b616f711be6a282e54f5725508e9f 100644 (file)
@@ -35,6 +35,9 @@
 
 $Header$
 $Log$
+Revision 1.5  1998/10/17 01:34:14  curt
+C++ ifying ...
+
 Revision 1.4  1998/08/06 12:46:39  curt
 Header change.
 
@@ -73,6 +76,7 @@ typedef struct {
     short   left_pb_on_stick, right_pb_on_stick, trig_pos_1, trig_pos_2;
     short   sb_extend, sb_retract, gear_sel_up;
     float   throttle_pct;
+    float   brake_pct;
 } COCKPIT;
 
 extern COCKPIT cockpit_;
@@ -94,6 +98,7 @@ extern COCKPIT cockpit_;
 #define SB_extend      cockpit_.sb_extend
 #define SB_retract     cockpit_.sb_retract
 #define Gear_sel_up    cockpit_.gear_sel_up
+#define Brake_pct       cockpit_.brake_pct
 
 
 #endif /* _LS_COCKPIT_H */
index 1c91a9aa8c1ac5c5411392aead765b2a73e247cb..67745dd284f2c9db7c9affa5608a394382f571da 100644 (file)
 #define _LS_INTERFACE_H
 
 
-// #include <Flight/flight.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 #include "ls_types.h"
 
 
@@ -55,48 +59,55 @@ int ls_ForceAltitude(double alt_feet);
 #endif /* _LS_INTERFACE_H */
 
 
-/* $Log$
-/* Revision 1.10  1998/10/16 23:27:45  curt
-/* C++-ifying.
-/*
- * Revision 1.9  1998/07/12 03:11:04  curt
- * Removed some printf()'s.
- * Fixed the autopilot integration so it should be able to update it's control
- *   positions every time the internal flight model loop is run, and not just
- *   once per rendered frame.
- * Added a routine to do the necessary stuff to force an arbitrary altitude
- *   change.
- * Gave the Navion engine just a tad more power.
- *
- * Revision 1.8  1998/04/21 16:59:39  curt
- * Integrated autopilot.
- * Prepairing for C++ integration.
- *
- * Revision 1.7  1998/02/07 15:29:39  curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.6  1998/02/03 23:20:17  curt
- * Lots of little tweaks to fix various consistency problems discovered by
- * Solaris' CC.  Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
- * passed arguments along to the real printf().  Also incorporated HUD changes
- * by Michele America.
- *
- * Revision 1.5  1998/01/19 19:27:05  curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.4  1998/01/19 18:40:27  curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.3  1997/07/23 21:52:20  curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.2  1997/05/29 22:39:59  curt
- * Working on incorporating the LaRCsim flight model.
- *
- * Revision 1.1  1997/05/29 00:09:58  curt
- * Initial Flight Gear revision.
- *
- */
+#ifdef __cplusplus
+}
+#endif
+
+
+// $Log$
+// Revision 1.11  1998/10/17 01:34:15  curt
+// C++ ifying ...
+//
+// Revision 1.10  1998/10/16 23:27:45  curt
+// C++-ifying.
+//
+// Revision 1.9  1998/07/12 03:11:04  curt
+// Removed some printf()'s.
+// Fixed the autopilot integration so it should be able to update it's control
+//   positions every time the internal flight model loop is run, and not just
+//   once per rendered frame.
+// Added a routine to do the necessary stuff to force an arbitrary altitude
+//   change.
+// Gave the Navion engine just a tad more power.
+//
+// Revision 1.8  1998/04/21 16:59:39  curt
+// Integrated autopilot.
+// Prepairing for C++ integration.
+//
+// Revision 1.7  1998/02/07 15:29:39  curt
+// Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+// <chotchkiss@namg.us.anritsu.com>
+//
+// Revision 1.6  1998/02/03 23:20:17  curt
+// Lots of little tweaks to fix various consistency problems discovered by
+// Solaris' CC.  Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
+// passed arguments along to the real printf().  Also incorporated HUD changes
+// by Michele America.
+//
+// Revision 1.5  1998/01/19 19:27:05  curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.4  1998/01/19 18:40:27  curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.3  1997/07/23 21:52:20  curt
+// Put comments around the text after an #endif for increased portability.
+//
+// Revision 1.2  1997/05/29 22:39:59  curt
+// Working on incorporating the LaRCsim flight model.
+//
+// Revision 1.1  1997/05/29 00:09:58  curt
+// Initial Flight Gear revision.
+//
index 0fd31803d5db838eb2f022a69f2e1769556ace5a..d64fdea1a5c6af5f810535909a1ddaa018e69310 100644 (file)
@@ -36,6 +36,9 @@
 
 $Header$
 $Log$
+Revision 1.6  1998/10/17 01:34:16  curt
+C++ ifying ...
+
 Revision 1.5  1998/09/29 02:03:00  curt
 Added a brake + autopilot mods.
 
@@ -83,7 +86,6 @@ Initial Flight Gear revision.
 #include "ls_generic.h"
 #include "ls_cockpit.h"
 
-#include <Controls/controls.h>
 
 void sub3( DATA v1[],  DATA v2[], DATA result[] )
 {
@@ -211,7 +213,8 @@ char rcsid[] = "$Id$";
    * Put aircraft specific executable code here
    */
    
-    percent_brake[1] = fgBrakeGet(); /* replace with cockpit brake handle connection code */
+    /* replace with cockpit brake handle connection code */
+    percent_brake[1] = Brake_pct;
     percent_brake[2] = percent_brake[1];
     
     caster_angle_rad[0] = 0.03*Rudder_pedal;
index 286a584a753050ecd469425e252d7615ba6c9320..ebc72535e5ec2770e06f511cf70a70faeed8092e 100644 (file)
@@ -35,7 +35,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Astro/solarsystem.hxx>
 #include <Astro/sky.hxx>
 #include <Autopilot/autopilot.hxx>
@@ -46,7 +46,7 @@
 #include <Objects/material.hxx>
 #include <PUI/pu.h>
 #include <Time/light.hxx>
-#include <Weather/weather.h>
+#include <Weather/weather.hxx>
 
 #include "GLUTkey.hxx"
 #include "options.hxx"
@@ -381,6 +381,9 @@ void GLUTspecialkey(int k, int x, int y) {
 
 
 // $Log$
+// Revision 1.28  1998/10/17 01:34:20  curt
+// C++ ifying ...
+//
 // Revision 1.27  1998/10/02 12:46:46  curt
 // Added an "auto throttle"
 //
index ee157faffde093a5fec25e8967becc56350c28d1..4cc65807383ff32f64d526e5c5f1b0dd9a76267a 100644 (file)
@@ -50,7 +50,7 @@
 #include <Include/fg_constants.h>  // for VERSION
 #include <Include/general.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Astro/sky.hxx>
 #include <Astro/stars.hxx>
 #include <Astro/solarsystem.hxx>
@@ -75,7 +75,7 @@
 #include <Time/fg_time.hxx>
 #include <Time/fg_timer.hxx>
 #include <Time/sunpos.hxx>
-#include <Weather/weather.h>
+#include <Weather/weather.hxx>
 
 #include "GLUTkey.hxx"
 #include "fg_init.hxx"
@@ -894,6 +894,9 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.59  1998/10/17 01:34:21  curt
+// C++ ifying ...
+//
 // Revision 1.58  1998/10/16 23:27:52  curt
 // C++-ifying.
 //
index 746966debf48f4de061885eb153964c38d14ec0c..8d3bd73039660d5b89e7f33282c05aaab0944a9c 100644 (file)
 #include <Include/fg_constants.h>
 #include <Include/general.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Airports/simple.hxx>
-// #include <Astro/moon.hxx>
-// #include <Astro/planets.hxx>
 #include <Astro/sky.hxx>
 #include <Astro/stars.hxx>
-// #include <Astro/sun.hxx>
 #include <Astro/solarsystem.hxx>
 #include <Autopilot/autopilot.hxx>
 #include <Cockpit/cockpit.hxx>
@@ -64,7 +61,7 @@
 #include <Time/fg_time.hxx>
 #include <Time/light.hxx>
 #include <Time/sunpos.hxx>
-#include <Weather/weather.h>
+#include <Weather/weather.hxx>
 
 #include "fg_init.hxx"
 #include "options.hxx"
@@ -365,6 +362,9 @@ int fgInitSubsystems( void )
 
 
 // $Log$
+// Revision 1.43  1998/10/17 01:34:22  curt
+// C++ ifying ...
+//
 // Revision 1.42  1998/10/16 23:27:54  curt
 // C++-ifying.
 //
index f13ee95bdcfd776175e46c89bb25c1593493fc1a..1cdd667a684f86e53cf3602e577c08343d92c671 100644 (file)
@@ -34,7 +34,7 @@
 #include <string>
 
 #include <Debug/fg_debug.h>
-#include <Flight/flight.h>
+#include <Flight/flight.hxx>
 #include <Include/fg_constants.h>
 #include <Misc/fgstream.hxx>
 
@@ -566,6 +566,9 @@ fgOPTIONS::~fgOPTIONS( void ) {
 
 
 // $Log$
+// Revision 1.26  1998/10/17 01:34:24  curt
+// C++ ifying ...
+//
 // Revision 1.25  1998/09/15 02:09:27  curt
 // Include/fg_callback.hxx
 //   Moved code inline to stop g++ 2.7 from complaining.
index 127fb9458f3151e99be52d351234354b638e5810..66b4498b584975531b10b2f8307a288fbbde4a41 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <string.h>
 
-#include <Aircraft/aircraft.h>
 #include <Debug/fg_debug.h>
 #include <Main/options.hxx>
 #include <Objects/texload.h>
@@ -149,6 +148,9 @@ void fgSplashUpdate ( double progress ) {
 
 
 // $Log$
+// Revision 1.6  1998/10/17 01:34:25  curt
+// C++ ifying ...
+//
 // Revision 1.5  1998/09/26 13:17:29  curt
 // Clear screen to "black" before drawing splash screen.
 //
index 4ea58af4c3daed7ee0072cb17463f509ca374d8d..b806fdc69e80416f5c1776a290bd222370aa041f 100644 (file)
@@ -27,7 +27,7 @@
 #  include <config.h>
 #endif
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
 #include <Math/mat3.h>
@@ -585,6 +585,9 @@ fgVIEW::~fgVIEW( void ) {
 
 
 // $Log$
+// Revision 1.23  1998/10/17 01:34:26  curt
+// C++ ifying ...
+//
 // Revision 1.22  1998/10/16 00:54:03  curt
 // Converted to Point3D class.
 //
index b9a9ee8099ce4aed5af0b896f89bae95234579b2..09e81d18f1b4886e27c18c94d09073f1ebe245e0 100644 (file)
 #include <GL/glut.h>
 #include <XGL/xgl.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 
 #include <Bucket/bucketutils.h>
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
-// #include <Include/fg_types.h>
 #include <Main/options.hxx>
 #include <Main/views.hxx>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
 #include <Math/mat3.h>
 #include <Math/point3d.hxx>
 #include <Math/polar3d.hxx>
 #include <Math/vector.hxx>
 #include <Objects/material.hxx>
 #include <Objects/obj.hxx>
-#include <Weather/weather.h>
+#include <Weather/weather.hxx>
 
 #include "scenery.hxx"
 #include "tile.hxx"
@@ -634,6 +633,9 @@ void fgTileMgrRender( void ) {
 
 
 // $Log$
+// Revision 1.40  1998/10/17 01:34:28  curt
+// C++ ifying ...
+//
 // Revision 1.39  1998/10/16 00:55:50  curt
 // Converted to Point3D class.
 //
index d1683b1263749aaae04ed8c485ff5ca62620c55e..f84c6c0cabb86ec83cb847021d802567ea99e598 100644 (file)
@@ -1,27 +1,25 @@
-/**************************************************************************
- * slew.cxx -- the "slew" flight model
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// slew.cxx -- the "slew" flight model
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
 
 
 #include <math.h>
 
 #include <Flight/flight.hxx>
 #include <Aircraft/aircraft.hxx>
-#include <Controls/controls.h>
+#include <Controls/controls.hxx>
 #include <Include/fg_constants.h>
 
 
-/* reset flight params to a specific position */
+// reset flight params to a specific position
 void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
     fgFLIGHT *f;
 
@@ -62,7 +60,7 @@ void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
 }
 
 
-/* update position based on inputs, positions, velocities, etc. */
+// update position based on inputs, positions, velocities, etc.
 void fgSlewUpdate( void ) {
     fgFLIGHT *f;
     fgCONTROLS *c;
@@ -84,58 +82,61 @@ void fgSlewUpdate( void ) {
 }
 
 
-/* $Log$
-/* Revision 1.1  1998/10/16 23:27:50  curt
-/* C++-ifying.
-/*
- * Revision 1.13  1998/04/25 22:06:29  curt
- * Edited cvs log messages in source files ... bad bad bad!
- *
- * Revision 1.12  1998/04/08 23:35:30  curt
- * Tweaks to Gnu automake/autoconf system.
- *
- * Revision 1.11  1998/02/07 15:29:39  curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.10  1998/01/27 00:47:53  curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.9  1998/01/19 19:27:06  curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.8  1998/01/19 18:40:30  curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.7  1997/12/15 23:54:42  curt
- * Add xgl wrappers for debugging.
- * Generate terrain normals on the fly.
- *
- * Revision 1.6  1997/08/27 03:30:11  curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.5  1997/07/19 22:35:06  curt
- * Moved fiddled with PI to avoid compiler warnings.
- *
- * Revision 1.4  1997/06/21 17:12:51  curt
- * Capitalized subdirectory names.
- *
- * Revision 1.3  1997/05/29 22:40:00  curt
- * Working on incorporating the LaRCsim flight model.
- *
- * Revision 1.2  1997/05/29 12:30:19  curt
- * Some initial mods to work better in a timer environment.
- *
- * Revision 1.1  1997/05/29 02:29:42  curt
- * Moved to their own directory.
- *
- * Revision 1.2  1997/05/23 15:40:37  curt
- * Added GNU copyright headers.
- *
- * Revision 1.1  1997/05/16 16:04:45  curt
- * Initial revision.
- *
- */
+// $Log$
+// Revision 1.2  1998/10/17 01:34:17  curt
+// C++ ifying ...
+//
+// Revision 1.1  1998/10/16 23:27:50  curt
+// C++-ifying.
+//
+// Revision 1.13  1998/04/25 22:06:29  curt
+// Edited cvs log messages in source files ... bad bad bad!
+//
+// Revision 1.12  1998/04/08 23:35:30  curt
+// Tweaks to Gnu automake/autoconf system.
+//
+// Revision 1.11  1998/02/07 15:29:39  curt
+// Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+// <chotchkiss@namg.us.anritsu.com>
+//
+// Revision 1.10  1998/01/27 00:47:53  curt
+// Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+// system and commandline/config file processing code.
+//
+// Revision 1.9  1998/01/19 19:27:06  curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.8  1998/01/19 18:40:30  curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.7  1997/12/15 23:54:42  curt
+// Add xgl wrappers for debugging.
+// Generate terrain normals on the fly.
+//
+// Revision 1.6  1997/08/27 03:30:11  curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.5  1997/07/19 22:35:06  curt
+// Moved fiddled with PI to avoid compiler warnings.
+//
+// Revision 1.4  1997/06/21 17:12:51  curt
+// Capitalized subdirectory names.
+//
+// Revision 1.3  1997/05/29 22:40:00  curt
+// Working on incorporating the LaRCsim flight model.
+//
+// Revision 1.2  1997/05/29 12:30:19  curt
+// Some initial mods to work better in a timer environment.
+//
+// Revision 1.1  1997/05/29 02:29:42  curt
+// Moved to their own directory.
+//
+// Revision 1.2  1997/05/23 15:40:37  curt
+// Added GNU copyright headers.
+//
+// Revision 1.1  1997/05/16 16:04:45  curt
+// Initial revision.
+//
+
index 2c6ecf47f9340515aabc53806d4e6c923bef0fd8..f6b4e309c1864eeb2b5852373e7c72d798cd0737 100644 (file)
@@ -1,27 +1,25 @@
-/**************************************************************************
- * slew.hxx -- the "slew" flight model
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// slew.hxx -- the "slew" flight model
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
 
 
 #ifndef _SLEW_HXX
 #endif                                   
 
 
-/* reset flight params to a specific position */ 
+// reset flight params to a specific position 
 void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading);
 
-/* update position based on inputs, positions, velocities, etc. */
+// update position based on inputs, positions, velocities, etc.
 void fgSlewUpdate( void );
 
 
-#endif /* _SLEW_HXX */
+#endif // _SLEW_HXX
 
 
-/* $Log$
-/* Revision 1.1  1998/10/16 23:27:52  curt
-/* C++-ifying.
-/*
- * Revision 1.4  1998/01/22 02:59:34  curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.3  1998/01/19 18:40:30  curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.2  1997/07/23 21:52:20  curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.1  1997/05/29 02:29:43  curt
- * Moved to their own directory.
- *
- * Revision 1.2  1997/05/23 15:40:38  curt
- * Added GNU copyright headers.
- *
- * Revision 1.1  1997/05/16 16:04:46  curt
- * Initial revision.
- *
- */
+// $Log$
+// Revision 1.2  1998/10/17 01:34:18  curt
+// C++ ifying ...
+//
+// Revision 1.1  1998/10/16 23:27:52  curt
+// C++-ifying.
+//
+// Revision 1.4  1998/01/22 02:59:34  curt
+// Changed #ifdef FILE_H to #ifdef _FILE_H
+//
+// Revision 1.3  1998/01/19 18:40:30  curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.2  1997/07/23 21:52:20  curt
+// Put comments around the text after an #endif for increased portability.
+//
+// Revision 1.1  1997/05/29 02:29:43  curt
+// Moved to their own directory.
+//
+// Revision 1.2  1997/05/23 15:40:38  curt
+// Added GNU copyright headers.
+//
+// Revision 1.1  1997/05/16 16:04:46  curt
+// Initial revision.
+//
+
index b818eb1aeb99f91fde0fb0e8883c9041cf877988..4cdb20c761d077a648899ace092eba9b71e28ae5 100644 (file)
@@ -54,7 +54,7 @@
 #include <Astro/sky.hxx>
 #include <Astro/solarsystem.hxx>
 #include <Debug/fg_debug.h>
-#include <Flight/flight.h>
+#include <Flight/flight.hxx>
 #include <Include/fg_constants.h>
 #include <Main/options.hxx>
 #include <Time/light.hxx>
@@ -448,6 +448,9 @@ void fgTimeUpdate(fgFLIGHT *f, fgTIME *t) {
 
 
 // $Log$
+// Revision 1.19  1998/10/17 01:34:29  curt
+// C++ ifying ...
+//
 // Revision 1.18  1998/10/02 21:36:09  curt
 // Fixes to try to break through the win95/98 18.3 fps barrier.
 //
index 76f4a5c2be27f60cab749a158cae0e437b689174..226d4d44291f6714ab9fd69e2bc6325df16fc2dc 100644 (file)
 
 #include <string.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
 #include <Main/options.hxx>
 #include <Main/views.hxx>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
 #include <Math/interpolater.hxx>
 #include <Math/mat3.h>
 #include <Math/polar3d.hxx>
@@ -212,6 +212,9 @@ fgLIGHT::~fgLIGHT( void ) {
 
 
 // $Log$
+// Revision 1.18  1998/10/17 01:34:30  curt
+// C++ ifying ...
+//
 // Revision 1.17  1998/08/29 13:11:33  curt
 // Bernie Bright writes:
 //   I've created some new classes to enable pointers-to-functions and
index 0157a9321cfe0cca877439aae9b91139de687428..cf0b54eefe3e679169dfabb26f3eaae43c28150f 100644 (file)
@@ -1,4 +1,4 @@
-// sunpos.c (taken from XEarth)
+// sunpos.cxx (adapted from XEarth)
 // kirk johnson
 // july 1993
 //
@@ -47,7 +47,7 @@
 #include <Astro/solarsystem.hxx>
 #include <Include/fg_constants.h>
 #include <Main/views.hxx>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
 #include <Math/mat3.h>
 #include <Math/point3d.hxx>
 #include <Math/polar3d.hxx>
@@ -423,6 +423,9 @@ void fgUpdateSunPos( void ) {
 
 
 // $Log$
+// Revision 1.14  1998/10/17 01:34:32  curt
+// C++ ifying ...
+//
 // Revision 1.13  1998/10/16 00:56:12  curt
 // Converted to Point3D class.
 //
index 9690877f22bd3506b61fd70572b0740aa967f507..4a5521e1bcf46e9f1c677ddf26b6b136bcb8c0b7 100644 (file)
@@ -4,6 +4,6 @@
 
 noinst_LIBRARIES = libWeather.a
 
-libWeather_a_SOURCES = weather.c weather.h
+libWeather_a_SOURCES = weather.cxx weather.hxx
 
 INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
diff --git a/Weather/weather.c b/Weather/weather.c
deleted file mode 100644 (file)
index 5a47239..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/**************************************************************************
- * weather.c -- routines to model weather
- *
- * Written by Curtis Olson, started July 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#  include <windows.h>                     
-#endif
-
-#include <GL/glut.h>
-#include <XGL/xgl.h>
-
-#include <math.h>
-#include <stdio.h>
-
-#include <Aircraft/aircraft.h>
-#include <Debug/fg_debug.h>
-#include <Math/fg_random.h>
-#include <Weather/weather.h>
-
-
-/* This is a record containing current weather info */
-struct fgWEATHER current_weather;
-
-
-/* Initialize the weather modeling subsystem */
-void fgWeatherInit( void ) {
-    struct fgWEATHER *w;
-
-    w = &current_weather;
-
-    printf("Initializing weather subsystem\n");
-
-    /* Configure some wind */
-    /* FG_V_north_airmass = 15; */ /* ft/s =~ 10mph */
-
-    // fgWeatherSetVisibility(45000.0);    /* in meters */
-    fgWeatherSetVisibility(32000.0);    /* about 20 miles (in meters) */
-}
-
-
-/* Update the weather parameters for the current position */
-void fgWeatherUpdate( void ) {
-
-    /* temporarily remove the code of this do-nothing routine */
-
-// #ifdef FG_WEATHER_UPDATE
-    fgFLIGHT *f;
-    struct fgWEATHER *w;
-
-    f = current_aircraft.flight;
-    w = &current_weather;
-
-    /* Add some random turbulence */
-    // FG_U_gust = fg_random() * 5.0 - 2.5;
-    // FG_V_gust = fg_random() * 5.0 - 2.5;
-    // FG_W_gust = fg_random() * 5.0 - 2.5;
-// #endif FG_WEATHER_UPDATE
-}
-
-
-/* Get the current visibility */
-float fgWeatherGetVisibility( void ) {
-    struct fgWEATHER *w;
-    w = &current_weather;
-
-    return ( w->visibility );
-}
-
-
-/* Set the visibility and update fog parameters */
-void fgWeatherSetVisibility( float visibility ) {
-    struct fgWEATHER *w;
-    w = &current_weather;
-
-    w->visibility = visibility;       /* in meters */
-    // w->fog_density = -log(0.01 / w->visibility;        /* for GL_FOG_EXP */
-    w->fog_density = sqrt( -log(0.01) ) / w->visibility;  /* for GL_FOG_EXP2 */
-    xglFogf (GL_FOG_DENSITY, w->fog_density);
-    fgPrintf( FG_INPUT, FG_DEBUG, 
-             "Fog density = %.4f\n", w->fog_density);
-}
-
-
-/* $Log$
-/* Revision 1.18  1998/10/02 12:46:50  curt
-/* Added an "auto throttle"
-/*
- * Revision 1.17  1998/07/20 12:51:57  curt
- * Default visibility to about 20 miles.
- *
- * Revision 1.16  1998/06/12 01:00:59  curt
- * Build only static libraries.
- * Declare memmove/memset for Sloaris.
- * Added support for exponetial fog, which solves for the proper density to
- * achieve the desired visibility range.
- *
- * Revision 1.15  1998/04/25 22:06:34  curt
- * Edited cvs log messages in source files ... bad bad bad!
- *
- * Revision 1.14  1998/02/09 15:07:54  curt
- * Minor tweaks.
- *
- * Revision 1.13  1998/01/27 00:48:08  curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.12  1998/01/19 19:27:22  curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.11  1998/01/19 18:40:41  curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.10  1997/12/30 22:22:46  curt
- * Further integration of event manager.
- *
- * Revision 1.9  1997/12/30 20:48:03  curt
- * Integrated new event manager with subsystem initializations.
- *
- * Revision 1.8  1997/12/11 04:43:58  curt
- * Fixed sun vector and lighting problems.  I thing the moon is now lit
- * correctly.
- *
- * Revision 1.7  1997/12/10 22:37:56  curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.6  1997/08/27 03:30:38  curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.5  1997/08/22 21:34:42  curt
- * Doing a bit of reorganizing and house cleaning.
- *
- * Revision 1.4  1997/08/02 16:23:55  curt
- * Misc. tweaks.
- *
- * Revision 1.3  1997/07/31 22:52:41  curt
- * Working on redoing internal coordinate systems & scenery transformations.
- *
- * Revision 1.2  1997/07/30 16:12:44  curt
- * Moved fg_random routines from Util/ to Math/
- *
- * Revision 1.1  1997/07/19 23:03:57  curt
- * Initial revision.
- *
- */
diff --git a/Weather/weather.cxx b/Weather/weather.cxx
new file mode 100644 (file)
index 0000000..14593ce
--- /dev/null
@@ -0,0 +1,175 @@
+// weather.cxx -- routines to model weather
+//
+// Written by Curtis Olson, started July 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@me.umn.edu
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+#  include <windows.h>                     
+#endif
+
+#include <GL/glut.h>
+#include <XGL/xgl.h>
+
+#include <math.h>
+#include <stdio.h>
+
+#include "weather.hxx"
+
+#include <Aircraft/aircraft.hxx>
+#include <Debug/fg_debug.h>
+#include <Math/fg_random.h>
+
+
+// This is a record containing current weather info
+struct fgWEATHER current_weather;
+
+
+// Initialize the weather modeling subsystem
+void fgWeatherInit( void ) {
+    struct fgWEATHER *w;
+
+    w = &current_weather;
+
+    printf("Initializing weather subsystem\n");
+
+    // Configure some wind
+    // FG_V_north_airmass = 15; // ft/s =~ 10mph
+
+    // fgWeatherSetVisibility(45000.0);    // in meters
+    fgWeatherSetVisibility(32000.0);    // about 20 miles (in meters)
+}
+
+
+// Update the weather parameters for the current position
+void fgWeatherUpdate( void ) {
+
+    // temporarily remove the code of this do-nothing routine
+
+// #ifdef FG_WEATHER_UPDATE
+    fgFLIGHT *f;
+    struct fgWEATHER *w;
+
+    f = current_aircraft.flight;
+    w = &current_weather;
+
+    // Add some random turbulence
+    // FG_U_gust = fg_random() * 5.0 - 2.5;
+    // FG_V_gust = fg_random() * 5.0 - 2.5;
+    // FG_W_gust = fg_random() * 5.0 - 2.5;
+// #endif FG_WEATHER_UPDATE
+}
+
+
+// Get the current visibility
+float fgWeatherGetVisibility( void ) {
+    struct fgWEATHER *w;
+    w = &current_weather;
+
+    return ( w->visibility );
+}
+
+
+// Set the visibility and update fog parameters
+void fgWeatherSetVisibility( float visibility ) {
+    struct fgWEATHER *w;
+    w = &current_weather;
+
+    w->visibility = visibility;       // in meters
+    // w->fog_density = -log(0.01 / w->visibility;        // for GL_FOG_EXP
+    w->fog_density = sqrt( -log(0.01) ) / w->visibility;  // for GL_FOG_EXP2
+    xglFogf (GL_FOG_DENSITY, w->fog_density);
+    fgPrintf( FG_INPUT, FG_DEBUG, 
+             "Fog density = %.4f\n", w->fog_density);
+}
+
+
+// $Log$
+// Revision 1.1  1998/10/17 01:34:36  curt
+// C++ ifying ...
+//
+// Revision 1.18  1998/10/02 12:46:50  curt
+// Added an "auto throttle"
+//
+// Revision 1.17  1998/07/20 12:51:57  curt
+// Default visibility to about 20 miles.
+//
+// Revision 1.16  1998/06/12 01:00:59  curt
+// Build only static libraries.
+// Declare memmove/memset for Sloaris.
+// Added support for exponetial fog, which solves for the proper density to
+// achieve the desired visibility range.
+//
+// Revision 1.15  1998/04/25 22:06:34  curt
+// Edited cvs log messages in source files ... bad bad bad!
+//
+// Revision 1.14  1998/02/09 15:07:54  curt
+// Minor tweaks.
+//
+// Revision 1.13  1998/01/27 00:48:08  curt
+// Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+// system and commandline/config file processing code.
+//
+// Revision 1.12  1998/01/19 19:27:22  curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.11  1998/01/19 18:40:41  curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.10  1997/12/30 22:22:46  curt
+// Further integration of event manager.
+//
+// Revision 1.9  1997/12/30 20:48:03  curt
+// Integrated new event manager with subsystem initializations.
+//
+// Revision 1.8  1997/12/11 04:43:58  curt
+// Fixed sun vector and lighting problems.  I thing the moon is now lit
+// correctly.
+//
+// Revision 1.7  1997/12/10 22:37:56  curt
+// Prepended "fg" on the name of all global structures that didn't have it yet.
+// i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+//
+// Revision 1.6  1997/08/27 03:30:38  curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.5  1997/08/22 21:34:42  curt
+// Doing a bit of reorganizing and house cleaning.
+//
+// Revision 1.4  1997/08/02 16:23:55  curt
+// Misc. tweaks.
+//
+// Revision 1.3  1997/07/31 22:52:41  curt
+// Working on redoing internal coordinate systems & scenery transformations.
+//
+// Revision 1.2  1997/07/30 16:12:44  curt
+// Moved fg_random routines from Util/ to Math/
+//
+// Revision 1.1  1997/07/19 23:03:57  curt
+// Initial revision.
+//
+
diff --git a/Weather/weather.h b/Weather/weather.h
deleted file mode 100644 (file)
index edc4d14..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/**************************************************************************
- * weather.h -- routines to model weather
- *
- * Written by Curtis Olson, started July 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#ifndef _WEATHER_H
-#define _WEATHER_H
-
-
-#ifdef __cplusplus                                                          
-extern "C" {                            
-#endif                                   
-
-
-/* holds the current weather values */
-struct fgWEATHER {
-    float visibility;
-    float fog_density;
-};
-
-extern struct fgWEATHER current_weather;
-
-
-/* Initialize the weather modeling subsystem */
-void fgWeatherInit( void );
-
-
-/* Update the weather parameters for the current position */
-void fgWeatherUpdate( void );
-
-
-/* Get the current visibility */
-float fgWeatherGetVisibility( void );
-
-
-/* Set the visibility and update fog parameters */
-void fgWeatherSetVisibility( float visibility );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _WEATHER_H */
-
-
-/* $Log$
-/* Revision 1.10  1998/06/12 01:01:00  curt
-/* Build only static libraries.
-/* Declare memmove/memset for Sloaris.
-/* Added support for exponetial fog, which solves for the proper density to
-/* achieve the desired visibility range.
-/*
- * Revision 1.9  1998/04/21 17:02:46  curt
- * Prepairing for C++ integration.
- *
- * Revision 1.8  1998/01/22 02:59:44  curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.7  1998/01/19 18:40:41  curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.6  1997/12/30 22:22:47  curt
- * Further integration of event manager.
- *
- * Revision 1.5  1997/12/10 22:37:56  curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.4  1997/08/27 03:30:39  curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.3  1997/08/22 21:34:43  curt
- * Doing a bit of reorganizing and house cleaning.
- *
- * Revision 1.2  1997/07/23 21:52:30  curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.1  1997/07/19 23:03:58  curt
- * Initial revision.
- *
- */
diff --git a/Weather/weather.hxx b/Weather/weather.hxx
new file mode 100644 (file)
index 0000000..3e49764
--- /dev/null
@@ -0,0 +1,106 @@
+// weather.hxx -- routines to model weather
+//
+// Written by Curtis Olson, started July 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@me.umn.edu
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
+
+
+#ifndef _WEATHER_H
+#define _WEATHER_H
+
+
+#ifdef __cplusplus                                                          
+extern "C" {                            
+#endif                                   
+
+
+// holds the current weather values
+struct fgWEATHER {
+    float visibility;
+    float fog_density;
+};
+
+extern struct fgWEATHER current_weather;
+
+
+// Initialize the weather modeling subsystem
+void fgWeatherInit( void );
+
+
+// Update the weather parameters for the current position
+void fgWeatherUpdate( void );
+
+
+// Get the current visibility
+float fgWeatherGetVisibility( void );
+
+
+// Set the visibility and update fog parameters
+void fgWeatherSetVisibility( float visibility );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // _WEATHER_H
+
+
+// $Log$
+// Revision 1.1  1998/10/17 01:34:37  curt
+// C++ ifying ...
+//
+// Revision 1.10  1998/06/12 01:01:00  curt
+// Build only static libraries.
+// Declare memmove/memset for Sloaris.
+// Added support for exponetial fog, which solves for the proper density to
+// achieve the desired visibility range.
+//
+// Revision 1.9  1998/04/21 17:02:46  curt
+// Prepairing for C++ integration.
+//
+// Revision 1.8  1998/01/22 02:59:44  curt
+// Changed #ifdef FILE_H to #ifdef _FILE_H
+//
+// Revision 1.7  1998/01/19 18:40:41  curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.6  1997/12/30 22:22:47  curt
+// Further integration of event manager.
+//
+// Revision 1.5  1997/12/10 22:37:56  curt
+// Prepended "fg" on the name of all global structures that didn't have it yet.
+// i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+//
+// Revision 1.4  1997/08/27 03:30:39  curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.3  1997/08/22 21:34:43  curt
+// Doing a bit of reorganizing and house cleaning.
+//
+// Revision 1.2  1997/07/23 21:52:30  curt
+// Put comments around the text after an #endif for increased portability.
+//
+// Revision 1.1  1997/07/19 23:03:58  curt
+// Initial revision.
+//
+