2003-03-09 03:20:34 +00:00
|
|
|
// dme.hxx - distance-measuring equipment.
|
|
|
|
// Written by David Megginson, started 2003.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __INSTRUMENTS_DME_HXX
|
|
|
|
#define __INSTRUMENTS_DME_HXX 1
|
|
|
|
|
2003-05-06 23:46:24 +00:00
|
|
|
#include <simgear/props/props.hxx>
|
2003-09-24 17:20:55 +00:00
|
|
|
#include <simgear/structure/subsystem_mgr.hxx>
|
2003-03-09 03:20:34 +00:00
|
|
|
|
2012-09-26 17:02:11 +01:00
|
|
|
// forward decls
|
|
|
|
class FGNavRecord;
|
|
|
|
|
2003-03-09 03:20:34 +00:00
|
|
|
/**
|
|
|
|
* Model a DME radio.
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
|
|
|
* /position/longitude-deg
|
|
|
|
* /position/latitude-deg
|
|
|
|
* /position/altitude-ft
|
|
|
|
* /systems/electrical/outputs/dme
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/serviceable
|
|
|
|
* /instrumentation/"name"/frequencies/source
|
|
|
|
* /instrumentation/"name"/frequencies/selected-mhz
|
2003-03-09 03:20:34 +00:00
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/in-range
|
|
|
|
* /instrumentation/"name"/indicated-distance-nm
|
|
|
|
* /instrumentation/"name"/indicated-ground-speed-kt
|
|
|
|
* /instrumentation/"name"/indicated-time-kt
|
2003-03-09 03:20:34 +00:00
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class DME : public SGSubsystem
|
2003-03-09 03:20:34 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
DME ( SGPropertyNode *node );
|
2003-03-09 03:20:34 +00:00
|
|
|
virtual ~DME ();
|
|
|
|
|
|
|
|
virtual void init ();
|
2012-09-17 00:12:29 +02:00
|
|
|
virtual void reinit ();
|
2003-03-09 03:20:34 +00:00
|
|
|
virtual void update (double delta_time_sec);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
|
|
SGPropertyNode_ptr _electrical_node;
|
|
|
|
SGPropertyNode_ptr _source_node;
|
|
|
|
SGPropertyNode_ptr _frequency_node;
|
|
|
|
|
|
|
|
SGPropertyNode_ptr _in_range_node;
|
|
|
|
SGPropertyNode_ptr _distance_node;
|
|
|
|
SGPropertyNode_ptr _speed_node;
|
|
|
|
SGPropertyNode_ptr _time_node;
|
2011-09-15 21:28:30 +02:00
|
|
|
SGPropertyNode_ptr _ident_btn_node;
|
|
|
|
SGPropertyNode_ptr _volume_node;
|
2003-03-09 03:20:34 +00:00
|
|
|
|
2015-02-11 08:33:45 +01:00
|
|
|
SGPropertyNode_ptr _distance_string;
|
|
|
|
SGPropertyNode_ptr _speed_string;
|
|
|
|
SGPropertyNode_ptr _time_string;
|
|
|
|
|
2003-03-09 03:20:34 +00:00
|
|
|
double _last_distance_nm;
|
|
|
|
double _last_frequency_mhz;
|
|
|
|
double _time_before_search_sec;
|
|
|
|
|
2011-09-15 21:28:30 +02:00
|
|
|
FGNavRecord * _navrecord;
|
2003-03-09 03:20:34 +00:00
|
|
|
|
2011-10-17 17:41:59 +01:00
|
|
|
std::string _name;
|
2015-02-11 08:33:45 +01:00
|
|
|
|
2006-12-06 22:11:43 +00:00
|
|
|
int _num;
|
2004-10-16 12:37:39 +00:00
|
|
|
|
2011-09-15 21:28:30 +02:00
|
|
|
class AudioIdent * _audioIdent;
|
2003-03-09 03:20:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __INSTRUMENTS_DME_HXX
|