1
0
Fork 0

Remove nav.hxx, which has been superceded by navrecord.hxx and is no longer used except by some old non-working test code

This commit is contained in:
daveluff 2005-11-27 23:48:04 +00:00
parent 808ac4784e
commit 21c48ba67c
3 changed files with 3 additions and 150 deletions

View file

@ -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

View file

@ -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 <stdio.h>
#include <simgear/compiler.h>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/misc/sgstream.hxx>
#include <simgear/magvar/magvar.hxx>
#include <simgear/timing/sg_time.hxx>
#ifdef SG_HAVE_STD_INCLUDES
# include <istream>
#elif defined( __BORLANDC__ ) || (__APPLE__)
# include <iostream>
#else
# include <istream.h>
#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

View file

@ -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))