From: daveluff Date: Sun, 27 Nov 2005 23:48:04 +0000 (+0000) Subject: Remove nav.hxx, which has been superceded by navrecord.hxx and is no longer used... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=21c48ba67c7adcd274d2860125674f2bf61fc21d;p=flightgear.git Remove nav.hxx, which has been superceded by navrecord.hxx and is no longer used except by some old non-working test code --- diff --git a/src/Navaids/Makefile.am b/src/Navaids/Makefile.am index c92a6ddb6..b54fc97de 100644 --- a/src/Navaids/Makefile.am +++ b/src/Navaids/Makefile.am @@ -5,8 +5,7 @@ noinst_LIBRARIES = libNavaids.a libNavaids_a_SOURCES = \ navdb.hxx navdb.cxx \ fix.hxx fixlist.hxx fixlist.cxx \ - nav.hxx navlist.hxx navlist.cxx \ - navrecord.hxx + navrecord.hxx navlist.hxx navlist.cxx # ils.hxx ilslist.hxx ilslist.cxx \ # mkrbeacons.hxx mkrbeacons.cxx diff --git a/src/Navaids/nav.hxx b/src/Navaids/nav.hxx deleted file mode 100644 index c9ad715c9..000000000 --- a/src/Navaids/nav.hxx +++ /dev/null @@ -1,146 +0,0 @@ -// nav.hxx -- vor/dme/ndb class -// -// Written by Curtis Olson, started April 2000. -// -// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt -// -// 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$ - - -#ifndef _FG_NAV_HXX -#define _FG_NAV_HXX - -#include - -#include -#include -#include -#include -#include - -#ifdef SG_HAVE_STD_INCLUDES -# include -#elif defined( __BORLANDC__ ) || (__APPLE__) -# include -#else -# include -#endif - -SG_USING_STD(istream); - - -class FGNav { - int type; - double lon, lat; - double elev_ft; - double x, y, z; - int freq; - double range; - string ident; - double magvar; // magvar from true north (negative = W) - string name; - - // for failure modeling - bool serviceable; - string trans_ident; // transmitted ident - -public: - - inline FGNav(); - inline FGNav( int _type, double _lat, double _lon, double _elev_ft, - int _freq, double _range, double _magvar, - const string& _ident, const string& _name, - bool _serviceable ); - inline ~FGNav() {} - - inline int get_type() const { return type; } - inline double get_lon() const { return lon; } - inline double get_lat() const { return lat; } - inline double get_elev_ft() const { return elev_ft; } - inline double get_x() const { return x; } - inline double get_y() const { return y; } - inline double get_z() const { return z; } - inline int get_freq() const { return freq; } - inline double get_range() const { return range; } - // inline bool get_has_dme() const { return has_dme; } - inline const char *get_ident() { return ident.c_str(); } - inline const string& get_trans_ident() { return trans_ident; } - inline double get_magvar() const { return magvar; } - inline const string& get_name() { return name; } -}; - - -inline -FGNav::FGNav() : - type(0), - lon(0.0), lat(0.0), - elev_ft(0.0), - x(0.0), y(0.0), z(0.0), - freq(0), - range(0.0), - // has_dme(false), - ident(""), - magvar(0.0), - name(""), - serviceable(true), - trans_ident("") -{ -} - - -inline -FGNav::FGNav( int _type, double _lat, double _lon, double _elev_ft, - int _freq, double _range, double _magvar, - const string& _ident, const string& _name, - bool _serviceable ) : - type(0), - lon(0.0), lat(0.0), - elev_ft(0.0), - x(0.0), y(0.0), z(0.0), - freq(0), - range(0.0), - // has_dme(false), - ident(""), - magvar(0.0), - name(""), - serviceable(true), - trans_ident("") -{ - type = _type; - lat = _lat; - lon = _lon; - elev_ft = _elev_ft; - freq = _freq; - range = _range; - magvar = _magvar; - ident = _ident; - name = _name; - trans_ident = _ident; - serviceable = _serviceable; - - // generate cartesian coordinates - Point3D geod( lon * SGD_DEGREES_TO_RADIANS, - lat * SGD_DEGREES_TO_RADIANS, - elev_ft * SG_FEET_TO_METER ); - Point3D cart = sgGeodToCart( geod ); - x = cart.x(); - y = cart.y(); - z = cart.z(); -} - - -#endif // _FG_NAV_HXX diff --git a/src/Navaids/testnavs.cxx b/src/Navaids/testnavs.cxx index 0f1f33619..b7215e8c7 100644 --- a/src/Navaids/testnavs.cxx +++ b/src/Navaids/testnavs.cxx @@ -16,7 +16,7 @@ int main() { current_navlist->init( p_nav ); - FGNav *n; + FGNavRecord *n; if ( (n = current_navlist->findByFreq( -93.2 * SG_DEGREES_TO_RADIANS, 45.14 * SG_DEGREES_TO_RADIANS, 3000, 117.30)) != NULL ) @@ -27,7 +27,7 @@ int main() { cout << "not picking up vor. :-(" << endl; } - FGNav *dcs; + FGNavRecord *dcs; if ( (dcs = current_navlist->findByIdent( "DCS", -3.3 * SG_DEGREES_TO_RADIANS, 55.9 * SG_DEGREES_TO_RADIANS))