source: osgVisual/trunk/include/sky_Silverlining/visual_skySilverLining.h @ 186

Last change on this file since 186 was 182, checked in by Torben Dannhauer, 14 years ago

Adapted Sky_Silverlining to be aware of the XML configuration. The sky can now be disabled by XML configuration.

All calls to sky must be wrapped with if(sky.valid()) { ...} to ensure that it is only called when available.

File size: 23.2 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16 *
17 * This file is based on the OSG example of the Silverlining SDK:
18 * Copyright (c) 2008 Sundog Software, LLC. All rights reserved worldwide.
19*/
20
21#include <osg/NodeCallback>
22#include <osg/Geode>
23
24#include <SilverLining.h>
25#include <MillisecondTimer.h>
26#ifdef WIN32
27        #include <windows.h>
28#endif
29#include <skySilverLining_skyDrawable.h>
30#include <skySilverLining_cloudsDrawable.h>
31#include <skySilverLining_AtmosphereReference.h>
32#include <skySilverLining_ProjectionMatrixCallback.h> 
33#include <skySilverLining_cloudLayerSlot.h>
34
35#include <visual_util.h>
36
37namespace osgVisual
38{
39
40#define MAX_CLOUDLAYER_SLOTS 5
41/**
42 * \brief This class is the container class for the sky, stars and clouds
43 *
44 * This class is the container class for the sky, stars and clouds. It is responsible for initialization and updating of the sky system.
45 * It is realized as Geode that it is possible to install an updateCallback on this class.
46 * This way, the sky position is always updated during update traversal of the scene graph.
47 *
48 * The NodeCallback class is nested into this class that no external user can use this callback.
49 *
50 * @todo Add Cloudlayer->set/getalpha() function
51 * @todo Terrain shadows do not exist
52 * @todo Calibrate visual range with test objects. Populate a Lookuptable to use for true visibility ranges.
53 * @todo Implement an abstract sky interface class to allow other sky implementations than silverlining with identical interfaces
54 *
55 * @author Torben Dannhauer
56 * @date  Jul 2009
57 */ 
58class visual_skySilverLining : public osg::Geode
59{
60        //#include <leakDetection.h>
61public:
62        /**
63         * \brief Constructor.
64         *
65         * @param viewer_ : Pointer to the applications viewer
66         * @param configFileName : Filename of the XML configfile to read the configuration from. Currently not used because skySilverlining currently does not need any configuration parameters.
67         * @param disabled : Flag to the caller which indicates if the sky was enabled or disabled by the XML configuration file.
68         */ 
69        visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName, bool& disabled);
70
71        /**
72         * \brief Destrcutor: The updateCallback is removed and the atmosphere, if instantiated.
73         *
74         */ 
75        virtual ~visual_skySilverLining(void);
76
77        /**
78         * \brief Returns a Pointer to the atmosphere object.
79         *
80         * @return Pointer to the atmosphere object.
81         */ 
82        SilverLining::Atmosphere* getAtmosphere() {return atmosphere;};
83
84        /**
85         * \brief Checks if the sky system is initialized.
86         *
87         * Checks if the sky system is initialized. If not, it makes a deep lookup at the main cameras userdata, if atmosphere is initialized.
88         * If this returns true, the local variable is updated with ne new initialize status. If this deep lookup returns false, this method returns also false
89         * asks the cameras user data if initialzed. If that is
90         *
91         * @return : Returns the status of initialization.
92         */ 
93        bool isInitialized();
94       
95        /**
96         * \brief This function initializes the sky framework if its used with a PRE_RENDER camera like the distortion module.
97         *
98         * @param distortedRoot : osg::Group* which is the rootNode over distortion and scene
99         * @param sceneGraphRoot : osg::Group* which is the rootNode and coordinateSystemNode of the scene.
100         */ 
101        void init(osg::Group *distortedRoot, osg::CoordinateSystemNode *sceneGraphRoot);
102
103        /**
104         * \brief This function can be called by the updateCallback. If the postInitialization for adding clouds etc. has be called already, this function will skip.
105         *
106         * If this function is called before sky is initalized, all actions are skipped.
107         * A standart usage is adding objects like clouds and winds, configuring time, location and visibility.
108         *
109         */ 
110        void postInit();
111
112        /**
113         * \brief This function shuts the sky framework down.
114         *
115         */ 
116        void shutdown();
117
118
119/** @name Time
120 *  The following functions control the simulated time and date.
121 */
122//@{
123        /**
124         * \brief Sets the new Date and Time to the sky system.
125         *
126         * Update is only performed if the sky systme is initialized.
127         *
128         * @param year_ : Year to set. SilverLining can only handle Gregorian calendar years, which means that years before 1582 will not be accurately simulated.
129         * @param month_ : Month to set. Ranging from 1 (Jan) to 12 (Dec)
130         * @param day_ : Day to set Ranging from 1 to 31
131         * @param hour_ : Hour to set. Ranging from 0 to 23
132         * @param minute_ : Minute to set. Ranging from 0 to 59.
133         * @param second_ : Second to set. Ranging from 0 to 59.
134         * @param daylightSaving_ : Configures, if the configured DateTime is in daylight savings or without daylight savings.
135         * @param timezoneOffset_ : Configures the timezone. Hour offset from GMT, ignoring daylight savings time.
136         */ 
137        void setDateTime( int year_, int month_, int day_, int hour_, int minute_, int second_, bool daylightSaving_, double timezoneOffset_ );
138
139        /**
140         * \brief Set time for the sky system.
141         *
142         * @param hour_ : Hour to set. Ranging from 0 to 23
143         * @param minute_ : Minute to set. Ranging from 0 to 59.
144         * @param second_ : Second to set. Ranging from 0 to 59.
145         */ 
146        void setTime( int hour_, int minute_, int second_ );
147
148        /**
149         * \brief Sets the date for the sky system.
150         *
151         * @param year_ : Year to set. SilverLining can only handle Gregorian calendar years, which means that years before 1582 will not be accurately simulated.
152         * @param month_ : Month to set. Ranging from 1 (Jan) to 12 (Dec)
153         * @param day_ : Day to set Ranging from 1 to 31
154         */ 
155        void setDate( int year_, int month_, int day_ );
156
157        /**
158         * \brief Configures the date and time by epoche (Seconds elapsed since midnight, January 1, 1970 UTC)
159         *
160         * This function ignores the daylight savings and timezone.
161         *
162         * @param secondsSince1970_ : Seconds elapsed since midnight, January 1, 1970 UTC
163         */ 
164        void setDateByEpoch(int secondsSince1970_ );
165
166//@}
167
168/** @name Location
169 *  The following functions control the location to simulate.
170 */
171//@{
172        /**
173         * \brief Configures the sky system to simulate a specific location.
174         *
175         * @param lat_ : Latitude in radians
176         * @param lon_ : Longitude in radians
177         * @param alt_ : Altimeter in meters above see level.
178         */ 
179        void setLocation(double lat_, double lon_, double alt_);
180//@}
181
182/** @name Visibility and Haze
183 *  The following functions control the atmosperic effects like visibility range and haze.
184 */
185//@{
186        /**
187         * \brief This functions sets the visibility range in meters to simulate.
188         *
189         * @param visibility_ : Visibility range in meters.
190         */ 
191        void setVisibility(double visibility_);
192
193        /**
194         * \brief This function returns the visibility range in meters which is simulated.
195         *
196         * @return : Visibility range in meters.
197         */ 
198        double getVisibility();
199
200        /**
201         * \brief This function sets the haze factor to simulate.
202         *
203         * 1 = Pure air, range 256 km
204         * 2 = very clear, range 50 km
205         * 3 = clear, range 15 km
206         * 7 = light haze, range 8 km
207         * 20 = haze, range 3 km
208         * 50 = thin fog, range 2 km
209         *
210         * @param turbidity_ : Haze factor to simulate.
211         */ 
212        void setTurbidity(double turbidity_);
213
214        /**
215         * \brief This function returns the simulated haze factor.
216         *
217         * @return : Haze factor.
218         */ 
219        double getTurbidity();
220//@}
221
222/** @name Light pollution
223 *  The following functions control the light pollution to simulate at night.
224 */
225//@{
226        /**
227         * \brief This functions sets the light pollution in Watt/m2
228         *
229         * @param lightPollution_ : Light pollution to set.
230         */ 
231        void setLightPollution(double lightPollution_);
232
233        /**
234         * \brief This function returns the simulated light pollution in Watt/m2.
235         *
236         * @return : Light pollution in Watt/m2
237         */ 
238        double getLightPollution();
239//@}
240
241/** @name Clouds
242 *  The following functions control the available slots for cloudLayer. In each slot a cloud layer can be adde and its perscpitation or
243 * baseAltitude updated. All other values are not updateable, therefore a delete and recreation of the cloud layer would be necessary.
244 */
245//@{
246        /**
247         * \brief This function adds a Cloudlayer to a sepcified SLOT. If the slot is used, this function returns immediately.
248         *
249         * If the slot number is out of range, nothing happens.
250         *
251         * Currently supported CloudTypes are:
252         *
253         * \li CloudTypes::CIRROCUMULUS - High planar cloud puffs.
254         * \li CloudTypes::CIRRUS_FIBRATUS - High, wispy cirrus clouds.
255     * \li CloudTypes::NIMBOSTRATUS - Low stratus decks.
256     * \li CloudTypes::CUMULONIMBUS_CAPPILATUS - A large thunderhead with lightning and rain.
257     * \li CloudTypes::CUMULUS_MEDIOCRIS - Small, puffy clouds.
258     * \li CloudTypes::CUMULUS_CONGESTUS - Larger cumulus clouds with flattened bottoms.
259     * \li CloudTypes::CUMULUS_MEDIOCRIS_INFINITE - A cumulus mediocris layer where the clouds wrap around
260     *  the camera location at all times, to create the illusion of an infinitely large cloud layer.
261     * \li CloudTypes::CUMULUS_CONGESTUS_INFINITE - A cumulus congestus layer where the clouds wrap around
262     *  the camera location at all times, to create the illusion of an infinitely large cloud layer.
263         *
264         * @param slot_ : Slot to use.
265         * @param baseLength_ : Baselength in meter of the cloud layer to generate.
266         * @param baseWidth_ : Basewideth in meter of the cloud layer to generate.
267         * @param thickness_ : Thicknes of the could layer in meter.
268         * @param baseHeight_ : Height of the cloud base in WGS84.
269         * @param density_ : Coverage of the cloud layer in percent (0.0 - 1.0).
270         * @param cloudtype_ : Type of the cloudlayer to generate.
271         */ 
272        void addCloudLayer(int slot_, double baseLength_, double baseWidth_, double thickness_, double baseHeight_, double density_, CloudTypes cloudtype_ );
273
274        /**
275         * \brief This function remove the cloudlayer in the specified slot and marks the slot as free.
276         *
277         * If the slot number is out of range, nothing happens.
278         *
279         * @param slot_ : Slot number to clean
280         */ 
281        void removeCloudLayer( int slot_ );
282       
283        /**
284         * \brief This function removes the cloud layers from all slots
285         *
286         */ 
287        void clearAllSlots();
288
289        /**
290         * \brief This function returns a pointer to the cloudLayer this slot contains.
291         *
292         * If the slot number is out of range, nothing happens.
293         *
294         * @param slot_ : Slot to query for it's cloudLayer pointer.
295         * @return : Pointer to the contained cloud layer.
296         */ 
297        SilverLining::CloudLayer* getCloudLayer( int slot_ );
298       
299        /**
300         * \brief This function configure the cloud layer als enabled (show clouds) or disabled (hide clouds).
301         *
302         * If the slot number is out of range, nothing happens.
303         *
304         * @param slot_ : Cloudlayer to hide/show.
305         * @param enabled_ : Control where hide or show should be configured.
306         */ 
307        void setEnabled(int slot_, bool enabled_ );
308
309        /**
310         * \brief This function returns if the specified cloud layer is en- or disabled (hidden or shown).
311         *
312         * If the slot number is out of range, nothing happens.
313         *
314         * @param slot_ : Slot zu query.
315         * @return : true if clouds are visible, false if clouds are hidden.
316         */ 
317        bool isEnabled( int slot_ );
318
319        /**
320         * \brief This functions fade the clouds in or out, depending on the visibility tsatus before.
321         *
322         * If the slot number is out of range, nothing happens.
323         *
324         * @param slot_ : Slot to fade.
325         * @param fadetimeMS_ : Milliseconds to fade the cloud layer.
326         */ 
327        void fadeVisibility( int slot_, int fadetimeMS_);
328
329        /**
330         * \brief
331         *
332         * If the slot number is out of range, nothing happens.
333         *
334         * @param slot_
335         * @return : String with the literal name of the cloud layer type.
336         */ 
337        std::string getCloudLayerTypeName( int slot_ );
338
339//@}
340
341/** @name Wind
342 *  Description of wind. Attention: Wind volumes are not geocentric: If far enough away from upvector location, the earth will curve away under the wind volume.
343 */
344//@{
345        /**
346         * \brief This function adds a wind volume to the scene, with the specified characteristics.
347         *
348         * @param bottom_ : Height in WGS84 in metern of the wind volumes bottom.
349         * @param top_ : Height in WGS84 in metern of the wind volumes top.
350         * @param speed_ : Windspeed in the wind volume in meter per seconds.
351         * @param direction_ : Wind direction in the wind volume in degree (wind origin, not wind destination).
352         *
353         */ 
354        void addWindVolume(double bottom_, double top_, double speed_, int direction_);
355
356        /**
357         * \brief This function deletes all wind volumes.
358         *
359         */ 
360        void clearAllWindVolumes();
361
362        /**
363         * \brief This functions checks wether the specified altitude in MSL is inside a wind volume.
364         *
365         * If multiple wind volumes are nested, this function returns the first matching wind volume.
366         * Because geocentric wind is not implemented, the altitude information is always base on the location where the wind was added.
367         * To avoid multiple winds, don't use nested wind volumes.
368         *
369         * @param height_ : Height in meters in WGS84 to check for wind.
370         * @param bottom_ : If checking altitude is inside a volume, the bottom altitude of the volume in meters above MSL is written into, otherwise -1.
371         * @param top_ : If checking altitude is inside a volume, the top altitude of the volume in meters above MSL is written into, otherwise -1.
372         * @param speed_ : If checking altitude is inside a volume, the wind speed in the wind volume is written into, otherwise -1.
373         * @param direction_ : If checking altitude is inside a volume, the wind direction (0 deg = from north, 90 deg = from east) in the wind volume is written into, otherwise -1.
374         * @return : True if checking altitude is inside a wind volume, otherwise false.
375         */ 
376        bool insideWind(double height_, double& bottom_, double& top_, double& speed_, double& direction_);
377
378       
379//@}
380
381/** @name Precipitation
382 *  The following functions control the rate and type of precipitation. It is possible to configure it on an global or a per cloud basis.
383 */
384//@{
385        // Per SLOT
386        /**
387         * \brief This functions enables the specified precipitation rate and precipitation type at the specified cloudLayer slot.
388         *
389         * @param slot_ : CloudLayer slot to enable precipitation in.
390         * @param rate_mmPerHour_rain_ : Precipitation rate in mm/hour of rain.
391         * @param rate_mmPerHour_drySnow_ : Precipitation rate in mm/hour of dry snow.
392         * @param rate_mmPerHour_wetSnow_ : Precipitation rate in mm/hour of wet snow.
393         * @param rate_mmPerHour_sleet_ : Precipitation rate in mm/hour of sleet.
394         */ 
395        void setSlotPrecipitation( int slot_, double rate_mmPerHour_rain_, double rate_mmPerHour_drySnow_, double rate_mmPerHour_wetSnow_, double rate_mmPerHour_sleet_ );
396
397        /**
398         * \brief This function retrieves the precipitation of a cloudlayer slot.
399         *
400         * @param slot_ : Slot to check for precipitation.
401         * @param rate_mmPerHour_rain : Precipitation rate in mm/hour of rain.
402         * @param rate_mmPerHour_drySnow : Precipitation rate in mm/hour of dry snow.
403         * @param rate_mmPerHour_wetSnow : Precipitation rate in mm/hour of wet snow.
404         * @param rate_mmPerHour_sleet : Precipitation rate in mm/hour of sleet.
405         * @return : True if cloudLayer has precipitation.
406         */ 
407        bool getSlotPrecipitation( int slot_, double& rate_mmPerHour_rain, double& rate_mmPerHour_drySnow, double& rate_mmPerHour_wetSnow, double& rate_mmPerHour_sleet );
408       
409        /**
410         * \brief This function checks a specified location for precipitation at the specified cloudLayer slot.
411         *
412         * @param slot_ : CloudLayer slot to check for specification.
413         * @param rate_mmPerHour_rain : Precipitation rate in mm/hour of rain.
414         * @param rate_mmPerHour_drySnow : Precipitation rate in mm/hour of dry snow.
415         * @param rate_mmPerHour_wetSnow : Precipitation rate in mm/hour of wet snow.
416         * @param rate_mmPerHour_sleet : Precipitation rate in mm/hour of sleet.
417         * @param lat_ : Latitude to check for precipitation. If it defaults to -1, the internal sky latitude will be used.
418         * @param lon_ : Longitude to check for precipitation. If it defaults to -1, the internal sky longitude will be used.
419         * @param height_ : Height in WGS84 to check for precipitation. If it defaults to -1, the internal sky height will be used.
420         * @return : Returns true if precipitation at the specified location is true. 
421         */ 
422        bool getSlotPrecipitationAtLocation( int slot_, double& rate_mmPerHour_rain, double& rate_mmPerHour_drySnow, double& rate_mmPerHour_wetSnow, double& rate_mmPerHour_sleet, double lat_=-1, double lon_=-1, double height_=-1 );
423
424        /**
425         * \brief This function clears all types of precipitation of the specified slot.
426         *
427         * @param slot_ : Slot toe clear precipitation.
428         */ 
429        void clearAllPrecipitation( int slot_ );
430
431        // Global
432        /**
433         * \brief This function clears the global precipitation.
434         *
435         */ 
436        void clearGlobalPrecipitation();
437
438        /**
439         * \brief This function sets the cloud independent, global precipitation.
440         *
441         * @param rate_mmPerHour_rain_ : Precipitation rate in mm/hour of rain.
442         * @param rate_mmPerHour_drySnow_ : Precipitation rate in mm/hour of dry snow.
443         * @param rate_mmPerHour_wetSnow_ : Precipitation rate in mm/hour of wet snow.
444         * @param rate_mmPerHour_sleet_ : Precipitation rate in mm/hour of sleet.
445         */ 
446        void setGlobalPrecipitation( double rate_mmPerHour_rain_, double rate_mmPerHour_drySnow_, double rate_mmPerHour_wetSnow_, double rate_mmPerHour_sleet_ );
447       
448        // Misc
449        /**
450         * \brief This function returns the overall precipitation rate of all cloud dependent precipitation.
451         *
452         * This function adds the precipitation of all cloudLayer seperated for all types of precipitation.
453         * Global precipitation is ignored, because precipitation without clouds is artificial and only reasonable for visualiszation purposes.
454         *
455         * @param rate_mmPerHour_rain : Precipitation rate in mm/hour of rain.
456         * @param rate_mmPerHour_drySnow : Precipitation rate in mm/hour of dry snow.
457         * @param rate_mmPerHour_wetSnow : Precipitation rate in mm/hour of wet snow.
458         * @param rate_mmPerHour_sleet : Precipitation rate in mm/hour of sleet.
459         * @param lat_ : Latitude to check for precipitation. If it defaults to -1, the internal sky latitude will be used.
460         * @param lon_ : Longitude to check for precipitation. If it defaults to -1, the internal sky longitude will be used.
461         * @param height_ : Height in WGS84 to check for precipitation. If it defaults to -1, the internal sky height will be used.
462         * @return : True if precipitation lookup was successful.
463         */ 
464        bool getOverallPrecipitationAtLocation( double& rate_mmPerHour_rain, double& rate_mmPerHour_drySnow, double& rate_mmPerHour_wetSnow, double& rate_mmPerHour_sleet, double lat_=-1, double lon_=-1, double height_=-1 );
465//@}
466
467
468
469
470
471private:
472        /**
473         * \brief Nested Callback class
474         *
475         * @author Torben Dannhauer
476         * @date  Jul 2009
477         */ 
478        class skyUpdateCallback : public osg::NodeCallback
479        {
480        public:
481                /**
482                 * \brief Constructor
483                 *
484                 * @param csn_ : Pointer to the Coordinate System Node. Necessary to extract lat, lon and height of the camera position.
485                 * @param sceneCamera_ : Pointer to the scene camera (undistorted camera, type PRE_RENDER)
486                 * @param sky_ : Pointer to the sky system.
487                 */ 
488                skyUpdateCallback(osg::CoordinateSystemNode* csn_, osg::Camera* sceneCamera_, visual_skySilverLining* sky_)
489                        : csn(csn_), sceneCamera(sceneCamera_), sky(sky_) {};
490
491                /**
492                 * \brief This function is executed as callback during traversal. It updates the skys displayed location.
493                 *
494                 */ 
495                virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
496        private:
497                /**
498                 * Referenced pointer to the Coordinate System Node. Necessary to extract lat, lon and height of the camera position.
499                 */ 
500                osg::ref_ptr<osg::CoordinateSystemNode> csn;
501               
502                /**
503                 * Referenced pointer to the scene camera (undistorted camera, type PRE_RENDER)
504                 */ 
505                osg::ref_ptr<osg::Camera> sceneCamera;
506
507                /**
508                 * Referenced pointer to the sky system.
509                 */ 
510                osg::ref_ptr<visual_skySilverLining> sky;
511        };      // Nested class END
512
513        /**
514         * \brief This function updates the atmosphere's upVector,
515         * if delta_lat or delta_lon (from the existing location
516         * and the location of the last upVector update) is larger than N degree.
517         * If an update is requiered, the existing location is noted as the last update location.
518         *
519         * Iis called by this->setLocation.
520         *
521         */ 
522        void updateUpVector();
523
524        /**
525         * Pointer to the atmosphere object of Silverlining.
526         */ 
527        SilverLining::Atmosphere *atmosphere;
528
529        /**
530         * Referenced Pointer to the viewer
531         */ 
532        osg::ref_ptr<osgViewer::Viewer> viewer;
533
534        /**
535         * Referenced Pointer to the camera which pre renders the scene
536         */ 
537        osg::ref_ptr<osg::Camera> sceneCamera;
538 
539        /**
540         * Referenced Pointer to the coordinate system node. Required for WGS84 transformations.
541         */ 
542        osg::ref_ptr<osg::CoordinateSystemNode> sceneRoot;
543
544        /**
545         * Referenced Pointer to the updatecallback, which is installed at this node.
546         */ 
547        osg::ref_ptr<skyUpdateCallback> updateCallback;
548
549        /**
550         * Referenced Pointer to the ProjectionMatrix callback.
551         */ 
552        osg::ref_ptr<skySilverLining_projectionMatrixCallback> cb;
553
554        /**
555         * Referenced Pointer to the sky Drawable, which renders the skybox.
556         */ 
557        osg::ref_ptr<skySilverLining_skyDrawable> skyDrawable;
558
559        /**
560         * Referenced Pointer to the cloudsDrawable, which renders the clouds.
561         */ 
562        osg::ref_ptr<skySilverLining_cloudsDrawable> cloudsDrawable;
563
564        /**
565         * Flag which contains if the sky system is initialized. This status is only a local
566         * copy if the cameras userdata which contain the primary information if the sky system is initialized
567         */ 
568        bool atmosphereInitialized;
569
570        /**
571         * This variable indicates whether postinit() was called already.
572         */ 
573        bool postInitialized;
574
575        /**
576         * This vector contains all available slots for cloud layer.
577         */ 
578        std::vector<cloudLayerSlot> cloudLayerSlots;
579
580                /**
581         * Latitude, which mirrors the latitude of the last sky update. This is neccesary if any weather effect is added to calculate the earth radius on that location for appropriate level above MSL
582         */ 
583        double lat;
584
585        /**
586         * Longitude, which mirrors the latitude of the last sky update. This is neccesary if any weather effect is added to calculate the earth radius on that location for appropriate level above MSL
587         */ 
588        double lon;
589
590        /**
591         * Height, which mirrors the height of the last sky update.
592         */ 
593        double height;
594
595};
596
597using namespace SilverLining;
598
599//class MyMillisecondTimer : public SilverLining::MillisecondTimer
600//{
601//public:
602//      virtual unsigned long GetMilliseconds() const
603//        {
604//                      return timeGetTime() * 50;
605//        }
606//};
607
608
609} // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.