1 // simulates ridge lift
3 // Written by Patrice Poly
4 // Copyright (C) 2009 Patrice Poly - p.polypa@gmail.com
7 // Entirely based on the paper :
8 // http://carrier.csi.cam.ac.uk/forsterlewis/soaring/sim/fsx/dev/sim_probe/sim_probe_paper.html
9 // by Ian Forster-Lewis, University of Cambridge, 26th December 2007
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License as
14 // published by the Free Software Foundation; either version 2 of the
15 // License, or (at your option) any later version.
17 // This program is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 // General Public License for more details.
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #ifndef _FG_RidgeLift_HXX
29 #define _FG_RidgeLift_HXX
40 class FGRidgeLift : public SGSubsystem {
47 virtual void unbind();
48 virtual void update(double dt);
51 inline double getStrength() const { return strength; };
53 inline double get_probe_elev_m( int index ) const { return probe_elev_m[index]; };
54 inline double get_probe_lat_deg( int index ) const { return probe_lat_deg[index]; };
55 inline double get_probe_lon_deg( int index ) const { return probe_lon_deg[index]; };
56 inline double get_slope( int index ) const { return slope[index]; };
59 static const double dist_probe_m[5];
64 double probe_lat_deg[5];
65 double probe_lon_deg[5];
66 double probe_elev_m[5];
72 SGPropertyNode_ptr _enabled_node;
73 SGPropertyNode_ptr _ridge_lift_fps_node;
75 SGPropertyNode_ptr _surface_wind_from_deg_node;
76 SGPropertyNode_ptr _surface_wind_speed_node;
78 SGPropertyNode_ptr _user_altitude_agl_ft_node;
79 SGPropertyNode_ptr _user_longitude_node;
80 SGPropertyNode_ptr _user_latitude_node;
81 SGPropertyNode_ptr _ground_elev_node;
85 #endif // _FG_RidgeLift_HXX