|
From: Melchior F. <mf...@fl...> - 2007-06-29 22:46:47
|
Update of /var/cvs/FlightGear-0.9/FlightGear/src/Instrumentation
In directory baron:/tmp/cvs-serv29913
Modified Files:
wxradar.cxx wxradar.hxx
Log Message:
sync with recent changes to fg/plib
Index: wxradar.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Instrumentation/wxradar.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -r1.14 -r1.15
*** wxradar.cxx 24 Jun 2007 22:13:25 -0000 1.14
--- wxradar.cxx 29 Jun 2007 22:44:41 -0000 1.15
***************
*** 56,61 ****
// texture name to use in 2D and 3D instruments
! static const char *odgauge_name = "Aircraft/Instruments/Textures/od_wxradar.rgb";
wxRadarBg::wxRadarBg ( SGPropertyNode *node) :
--- 56,68 ----
+ typedef list <SGSharedPtr<FGAIBase> > radar_list_type;
[...1252 lines suppressed...]
*** 775,783 ****
float angle = bearing - heading;
! if (angle > SG_PI)
! angle -= 2.0*SG_PI;
if (angle < -SG_PI)
! angle += 2.0*SG_PI;
return angle;
--- 784,792 ----
float angle = bearing - heading;
! if (angle >= SG_PI)
! angle -= 2.0 * SG_PI;
if (angle < -SG_PI)
! angle += 2.0 * SG_PI;
return angle;
Index: wxradar.hxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Instrumentation/wxradar.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -r1.11 -r1.12
*** wxradar.hxx 24 Jun 2007 22:13:25 -0000 1.11
--- wxradar.hxx 29 Jun 2007 22:44:41 -0000 1.12
***************
*** 56,60 ****
private:
-
string _name;
int _num;
--- 56,59 ----
***************
*** 62,75 ****
double _time;
string _last_switchKnob;
bool _sim_init_done;
! double _user_speed_east_fps;
! double _user_speed_north_fps;
!
! float _x_displacement;
! float _y_displacement;
! float _x_sym_displacement;
! float _y_sym_displacement;
SGPropertyNode_ptr _serviceable_node;
--- 61,77 ----
double _time;
+ typedef enum { ARC, MAP, PLAN, ROSE } DisplayMode;
+ DisplayMode _display_mode;
+
string _last_switchKnob;
bool _sim_init_done;
! float _range_nm;
! float _scale; // factor to convert nm to display units
! double _radar_ref_rng;
! float _angle_offset;
! float _view_heading;
! double _lat, _lon;
! float _x_offset, _y_offset;
SGPropertyNode_ptr _serviceable_node;
***************
*** 101,107 ****
SGPropertyNode_ptr _ai_enabled_node;
! osg::ref_ptr<osg::Texture2D> resultTexture;
! osg::ref_ptr<osg::Texture2D> wxEcho;
! osg::ref_ptr<osg::Geode> radarGeode;
list_of_SGWxRadarEcho _radarEchoBuffer;
--- 103,113 ----
SGPropertyNode_ptr _ai_enabled_node;
! osg::ref_ptr<osg::Texture2D> _resultTexture;
! osg::ref_ptr<osg::Texture2D> _wxEcho;
! osg::ref_ptr<osg::Geode> _radarGeode;
! osg::Geometry *_geom;
! osg::Vec2Array *_vertices;
! osg::Vec2Array *_texCoords;
! osg::Matrixf _centerTrans;
list_of_SGWxRadarEcho _radarEchoBuffer;
***************
*** 110,129 ****
FGAIManager* _ai;
! bool calcRadarHorizon(double user_alt, double alt, double range);
! bool calcMaxRange(int type, double range);
!
! void calcRngBrg(double lat, double lon, double lat2, double lon2,
! double &range, double &bearing) const;
!
! void updateRadar();
!
float calcRelBearing(float bearing, float heading);
!
! // A list of pointers to AI objects
! typedef list <SGSharedPtr<FGAIBase> > radar_list_type;
! typedef radar_list_type::iterator radar_list_iterator;
! typedef radar_list_type::const_iterator radar_list_const_iterator;
!
! radar_list_type _radar_list;
};
--- 116,131 ----
FGAIManager* _ai;
! void update_weather();
! void update_aircraft();
! void update_tacan();
! void update_heading_marker();
!
! void center_map();
! void apply_map_offset();
! bool withinRadarHorizon(double user_alt, double alt, double range);
! bool inRadarRange(int type, double range);
float calcRelBearing(float bearing, float heading);
! void calcRangeBearing(double lat, double lon, double lat2, double lon2,
! double &range, double &bearing) const;
};
|