X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fkr_87.hxx;h=626b502838405f55fb9b0663258507e82c8c62f5;hb=f8b689c040100aa21b27081b60a8da1fa99edd37;hp=bc2f3d569323d84bb503cf12c9c584a1a45edb7b;hpb=1254fdea2a2eaa6c8b07a42fe49ee0a23988a52c;p=flightgear.git diff --git a/src/Instrumentation/kr_87.hxx b/src/Instrumentation/kr_87.hxx index bc2f3d569..626b50283 100644 --- a/src/Instrumentation/kr_87.hxx +++ b/src/Instrumentation/kr_87.hxx @@ -2,7 +2,7 @@ // // Written by Curtis Olson, started June 2002. // -// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org +// Copyright (C) 2002 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 @@ -16,7 +16,7 @@ // // 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. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -29,27 +29,24 @@ #include #include +#include #include #include -#include +class SGSampleGroup; class FGKR_87 : public SGSubsystem { - FGMorse morse; - - SGPropertyNode *lon_node; - SGPropertyNode *lat_node; - SGPropertyNode *alt_node; - SGPropertyNode *bus_power; - SGPropertyNode *serviceable; +private: + SGPropertyNode_ptr bus_power; + SGPropertyNode_ptr serviceable; bool need_update; // internal values - string ident; - string trans_ident; + std::string ident; + std::string trans_ident; bool valid; bool inrange; double stn_lon; @@ -59,9 +56,7 @@ class FGKR_87 : public SGSubsystem double effective_range; double dist; double heading; - double x; - double y; - double z; + SGVec3d xyz; double goal_needle_deg; double et_flash_time; @@ -103,21 +98,27 @@ class FGKR_87 : public SGSubsystem bool flt_ann; bool et_ann; -public: + // internal periodic station search timer + double _time_before_search_sec; + SGSharedPtr _sgr; + simgear::TiedPropertyList _tiedProperties; + +public: FGKR_87( SGPropertyNode *node ); ~FGKR_87(); void init (); + void reinit (); void bind (); void unbind (); - void update (double dt); + void update (double dt_sec); // Update nav/adf radios based on current postition void search (); // internal values - inline string get_ident() const { return ident; } + inline const std::string& get_ident() const { return ident; } inline bool get_valid() const { return valid; } inline bool get_inrange() const { return inrange; } inline double get_stn_lon() const { return stn_lon; }