2005-05-15 09:26:17 +00:00
|
|
|
// Build a cloud layer based on metar
|
|
|
|
//
|
|
|
|
// Written by Harald JOHNSEN, started April 2005.
|
|
|
|
//
|
|
|
|
// Copyright (C) 2005 Harald JOHNSEN - hjohnsen@evc.net
|
|
|
|
//
|
|
|
|
// 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, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
//
|
|
|
|
//
|
|
|
|
#ifndef _FGCLOUDS_HXX
|
|
|
|
#define _FGCLOUDS_HXX
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <simgear/compiler.h>
|
|
|
|
#include <simgear/sound/soundmgr_openal.hxx>
|
|
|
|
#include <Main/fg_props.hxx>
|
|
|
|
|
|
|
|
#include STL_STRING
|
|
|
|
|
|
|
|
SG_USING_STD(string);
|
|
|
|
|
|
|
|
class SGNewCloud;
|
|
|
|
class SGCloudField;
|
|
|
|
class FGMetar;
|
2005-05-22 08:08:22 +00:00
|
|
|
class FGEnvironmentCtrl;
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
class FGClouds {
|
|
|
|
|
|
|
|
private:
|
2005-10-25 13:49:55 +00:00
|
|
|
SGNewCloud *buildCloud(SGPropertyNode *cloud_def_root, const string& name);
|
|
|
|
void buildLayer(SGCloudField *layer, const string& name, double alt, double coverage);
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
void buildMETAR(void);
|
|
|
|
|
2005-10-25 13:49:55 +00:00
|
|
|
void buildScenario( const string& scenario );
|
2005-05-15 09:26:17 +00:00
|
|
|
|
2005-10-25 13:49:55 +00:00
|
|
|
void setLayer( int iLayer, float alt_m, const string& coverage, const string& layer_type );
|
2005-05-15 09:26:17 +00:00
|
|
|
|
2005-12-19 13:03:19 +00:00
|
|
|
void update_metar_properties( const FGMetar *m );
|
2005-05-15 09:26:17 +00:00
|
|
|
|
2005-12-29 16:22:38 +00:00
|
|
|
void update_env_config ();
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
int update_event;
|
|
|
|
SGSoundSample *snd_lightning;
|
2005-05-22 08:08:22 +00:00
|
|
|
FGEnvironmentCtrl * _controller;
|
2005-05-15 09:26:17 +00:00
|
|
|
float station_elevation_ft;
|
2005-08-22 17:49:50 +00:00
|
|
|
string last_scenario;
|
|
|
|
SGPropertyNode *last_env_config, *last_env_clouds;
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
public:
|
2005-05-22 08:08:22 +00:00
|
|
|
FGClouds(FGEnvironmentCtrl * controller);
|
2005-05-15 09:26:17 +00:00
|
|
|
~FGClouds();
|
|
|
|
|
|
|
|
void build(void);
|
|
|
|
|
|
|
|
void init(void);
|
|
|
|
|
|
|
|
int get_update_event(void) const;
|
|
|
|
void set_update_event(int count);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2005-05-22 08:08:22 +00:00
|
|
|
#endif // _FGCLOUDS_HXX
|