2000-04-24 23:50:59 +00:00
|
|
|
// radiostack.hxx -- class to manage an instance of the radio stack
|
|
|
|
//
|
|
|
|
// Written by Curtis Olson, started April 2000.
|
|
|
|
//
|
|
|
|
// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
|
|
|
|
//
|
|
|
|
// 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_RADIOSTACK_HXX
|
|
|
|
#define _FG_RADIOSTACK_HXX
|
|
|
|
|
|
|
|
|
2001-01-11 22:44:18 +00:00
|
|
|
#include <Main/fgfs.hxx>
|
|
|
|
#include <Main/fg_props.hxx>
|
|
|
|
|
2000-04-24 23:50:59 +00:00
|
|
|
#include <simgear/compiler.h>
|
|
|
|
|
2001-03-14 07:25:14 +00:00
|
|
|
#include <simgear/math/interpolater.hxx>
|
2001-03-29 06:05:01 +00:00
|
|
|
#include <simgear/timing/timestamp.hxx>
|
2001-03-14 07:25:14 +00:00
|
|
|
|
2000-05-04 01:18:45 +00:00
|
|
|
#include <Navaids/ilslist.hxx>
|
|
|
|
#include <Navaids/navlist.hxx>
|
2001-03-28 07:12:11 +00:00
|
|
|
#include <Sound/beacon.hxx>
|
2001-03-09 02:41:04 +00:00
|
|
|
#include <Sound/morse.hxx>
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2001-01-11 22:44:18 +00:00
|
|
|
|
|
|
|
class FGRadioStack : public FGSubsystem
|
|
|
|
{
|
2001-03-28 07:12:11 +00:00
|
|
|
FGBeacon beacon;
|
2001-03-09 02:41:04 +00:00
|
|
|
FGMorse morse;
|
2001-01-11 22:44:18 +00:00
|
|
|
|
2001-03-14 07:25:14 +00:00
|
|
|
SGInterpTable *term_tbl;
|
|
|
|
SGInterpTable *low_tbl;
|
|
|
|
SGInterpTable *high_tbl;
|
|
|
|
|
2001-06-06 19:12:24 +00:00
|
|
|
SGPropertyNode *lat_node;
|
|
|
|
SGPropertyNode *lon_node;
|
|
|
|
SGPropertyNode *alt_node;
|
2000-04-24 23:50:59 +00:00
|
|
|
|
|
|
|
bool need_update;
|
|
|
|
|
2001-03-09 02:41:04 +00:00
|
|
|
string nav1_ident;
|
2001-03-12 12:40:18 +00:00
|
|
|
string nav1_trans_ident;
|
2000-05-04 01:18:45 +00:00
|
|
|
bool nav1_valid;
|
2000-04-24 23:50:59 +00:00
|
|
|
bool nav1_inrange;
|
2000-05-12 22:17:09 +00:00
|
|
|
bool nav1_has_dme;
|
|
|
|
bool nav1_has_gs;
|
2000-04-24 23:50:59 +00:00
|
|
|
bool nav1_loc;
|
|
|
|
double nav1_freq;
|
2000-04-27 22:45:48 +00:00
|
|
|
double nav1_alt_freq;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav1_radial;
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
double nav1_sel_radial;
|
2000-05-12 20:07:51 +00:00
|
|
|
double nav1_loclon;
|
|
|
|
double nav1_loclat;
|
2000-05-12 22:17:09 +00:00
|
|
|
double nav1_x;
|
|
|
|
double nav1_y;
|
|
|
|
double nav1_z;
|
|
|
|
double nav1_loc_dist;
|
2000-05-12 20:07:51 +00:00
|
|
|
double nav1_gslon;
|
|
|
|
double nav1_gslat;
|
|
|
|
double nav1_gs_x;
|
|
|
|
double nav1_gs_y;
|
|
|
|
double nav1_gs_z;
|
|
|
|
double nav1_gs_dist;
|
|
|
|
double nav1_dmelon;
|
|
|
|
double nav1_dmelat;
|
|
|
|
double nav1_dme_x;
|
|
|
|
double nav1_dme_y;
|
|
|
|
double nav1_dme_z;
|
|
|
|
double nav1_dme_dist;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav1_elev;
|
2001-03-12 15:07:49 +00:00
|
|
|
double nav1_range;
|
2000-05-04 01:18:45 +00:00
|
|
|
double nav1_effective_range;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav1_heading;
|
2000-04-25 04:58:25 +00:00
|
|
|
double nav1_target_gs;
|
2001-02-02 02:55:07 +00:00
|
|
|
double nav1_magvar;
|
2001-03-16 05:33:04 +00:00
|
|
|
double nav1_vol_btn;
|
2001-03-09 02:41:04 +00:00
|
|
|
bool nav1_ident_btn;
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2001-03-09 02:41:04 +00:00
|
|
|
string nav2_ident;
|
2001-03-12 12:40:18 +00:00
|
|
|
string nav2_trans_ident;
|
2000-05-04 01:18:45 +00:00
|
|
|
bool nav2_valid;
|
2000-04-24 23:50:59 +00:00
|
|
|
bool nav2_inrange;
|
2000-05-12 22:17:09 +00:00
|
|
|
bool nav2_has_dme;
|
|
|
|
bool nav2_has_gs;
|
2000-04-27 03:26:36 +00:00
|
|
|
bool nav2_loc;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav2_freq;
|
2000-04-27 22:45:48 +00:00
|
|
|
double nav2_alt_freq;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav2_radial;
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
double nav2_sel_radial;
|
2000-05-12 20:07:51 +00:00
|
|
|
double nav2_loclon;
|
|
|
|
double nav2_loclat;
|
2000-05-12 22:17:09 +00:00
|
|
|
double nav2_x;
|
|
|
|
double nav2_y;
|
|
|
|
double nav2_z;
|
|
|
|
double nav2_loc_dist;
|
2000-05-12 20:07:51 +00:00
|
|
|
double nav2_gslon;
|
|
|
|
double nav2_gslat;
|
|
|
|
double nav2_gs_x;
|
|
|
|
double nav2_gs_y;
|
|
|
|
double nav2_gs_z;
|
|
|
|
double nav2_gs_dist;
|
|
|
|
double nav2_dmelon;
|
|
|
|
double nav2_dmelat;
|
|
|
|
double nav2_dme_x;
|
|
|
|
double nav2_dme_y;
|
|
|
|
double nav2_dme_z;
|
|
|
|
double nav2_dme_dist;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav2_elev;
|
2001-03-12 15:07:49 +00:00
|
|
|
double nav2_range;
|
2000-05-04 01:18:45 +00:00
|
|
|
double nav2_effective_range;
|
2000-04-24 23:50:59 +00:00
|
|
|
double nav2_heading;
|
2000-04-25 04:58:25 +00:00
|
|
|
double nav2_target_gs;
|
2001-02-02 02:55:07 +00:00
|
|
|
double nav2_magvar;
|
2001-03-16 05:33:04 +00:00
|
|
|
double nav2_vol_btn;
|
2001-03-09 02:41:04 +00:00
|
|
|
bool nav2_ident_btn;
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2001-03-16 23:59:02 +00:00
|
|
|
bool outer_marker;
|
|
|
|
bool middle_marker;
|
|
|
|
bool inner_marker;
|
|
|
|
|
2001-03-29 06:05:01 +00:00
|
|
|
SGTimeStamp blink;
|
|
|
|
bool outer_blink;
|
|
|
|
bool middle_blink;
|
|
|
|
bool inner_blink;
|
|
|
|
|
2001-03-14 23:37:50 +00:00
|
|
|
string adf_ident;
|
|
|
|
string adf_trans_ident;
|
2000-05-04 01:18:45 +00:00
|
|
|
bool adf_valid;
|
2000-04-24 23:50:59 +00:00
|
|
|
bool adf_inrange;
|
|
|
|
double adf_freq;
|
2000-04-27 22:45:48 +00:00
|
|
|
double adf_alt_freq;
|
|
|
|
double adf_rotation;
|
2000-04-24 23:50:59 +00:00
|
|
|
double adf_lon;
|
|
|
|
double adf_lat;
|
|
|
|
double adf_elev;
|
2001-03-12 15:07:49 +00:00
|
|
|
double adf_range;
|
2000-05-04 01:18:45 +00:00
|
|
|
double adf_effective_range;
|
|
|
|
double adf_dist;
|
2000-04-24 23:50:59 +00:00
|
|
|
double adf_heading;
|
2000-05-04 01:18:45 +00:00
|
|
|
double adf_x;
|
|
|
|
double adf_y;
|
|
|
|
double adf_z;
|
2001-03-16 05:33:04 +00:00
|
|
|
double adf_vol_btn;
|
2001-03-14 23:37:50 +00:00
|
|
|
bool adf_ident_btn;
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2001-03-14 07:25:14 +00:00
|
|
|
// model standard VOR/DME/TACAN service volumes as per AIM 1-1-8
|
|
|
|
double adjustNavRange( double stationElev, double aircraftElev,
|
|
|
|
double nominalRange );
|
|
|
|
|
|
|
|
// model standard ILS service volumes as per AIM 1-1-9
|
|
|
|
double adjustILSRange( double stationElev, double aircraftElev,
|
|
|
|
double offsetDegrees, double distance );
|
|
|
|
|
2000-04-24 23:50:59 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
FGRadioStack();
|
|
|
|
~FGRadioStack();
|
|
|
|
|
2001-01-11 22:44:18 +00:00
|
|
|
void init ();
|
|
|
|
void bind ();
|
|
|
|
void unbind ();
|
|
|
|
void update ();
|
2000-05-04 01:18:45 +00:00
|
|
|
|
2000-04-24 23:50:59 +00:00
|
|
|
// Update nav/adf radios based on current postition
|
2001-01-11 22:44:18 +00:00
|
|
|
void search ();
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2000-04-27 22:45:48 +00:00
|
|
|
// NAV1 Setters
|
2000-04-24 23:50:59 +00:00
|
|
|
inline void set_nav1_freq( double freq ) {
|
|
|
|
nav1_freq = freq; need_update = true;
|
|
|
|
}
|
2000-04-27 22:45:48 +00:00
|
|
|
inline void set_nav1_alt_freq( double freq ) { nav1_alt_freq = freq; }
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline void set_nav1_sel_radial( double radial ) {
|
|
|
|
nav1_sel_radial = radial; need_update = true;
|
2000-04-24 23:50:59 +00:00
|
|
|
}
|
2001-03-16 05:33:04 +00:00
|
|
|
inline void set_nav1_vol_btn( double val ) {
|
|
|
|
if ( val < 0.0 ) val = 0.0;
|
|
|
|
if ( val > 1.0 ) val = 1.0;
|
|
|
|
nav1_vol_btn = val;
|
|
|
|
}
|
2001-03-09 02:41:04 +00:00
|
|
|
inline void set_nav1_ident_btn( bool val ) { nav1_ident_btn = val; }
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2000-04-27 22:45:48 +00:00
|
|
|
// NAV2 Setters
|
2000-04-24 23:50:59 +00:00
|
|
|
inline void set_nav2_freq( double freq ) {
|
|
|
|
nav2_freq = freq; need_update = true;
|
|
|
|
}
|
2000-04-27 22:45:48 +00:00
|
|
|
inline void set_nav2_alt_freq( double freq ) { nav2_alt_freq = freq; }
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline void set_nav2_sel_radial( double radial ) {
|
|
|
|
nav2_sel_radial = radial; need_update = true;
|
2000-04-24 23:50:59 +00:00
|
|
|
}
|
2001-03-16 05:33:04 +00:00
|
|
|
inline void set_nav2_vol_btn( double val ) {
|
|
|
|
if ( val < 0.0 ) val = 0.0;
|
|
|
|
if ( val > 1.0 ) val = 1.0;
|
|
|
|
nav2_vol_btn = val;
|
|
|
|
}
|
2001-03-09 02:41:04 +00:00
|
|
|
inline void set_nav2_ident_btn( bool val ) { nav2_ident_btn = val; }
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2000-04-27 22:45:48 +00:00
|
|
|
// ADF Setters
|
2000-04-24 23:50:59 +00:00
|
|
|
inline void set_adf_freq( double freq ) {
|
|
|
|
adf_freq = freq; need_update = true;
|
|
|
|
}
|
2000-04-27 22:45:48 +00:00
|
|
|
inline void set_adf_alt_freq( double freq ) { adf_alt_freq = freq; }
|
|
|
|
inline void set_adf_rotation( double rot ) { adf_rotation = rot; }
|
2001-03-16 05:33:04 +00:00
|
|
|
inline void set_adf_vol_btn( double val ) {
|
|
|
|
if ( val < 0.0 ) val = 0.0;
|
|
|
|
if ( val > 1.0 ) val = 1.0;
|
|
|
|
adf_vol_btn = val;
|
|
|
|
}
|
2001-03-14 23:37:50 +00:00
|
|
|
inline void set_adf_ident_btn( bool val ) { adf_ident_btn = val; }
|
2000-04-27 22:45:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
// NAV1 Accessors
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline double get_nav1_freq () const { return nav1_freq; }
|
|
|
|
inline double get_nav1_alt_freq () const { return nav1_alt_freq; }
|
|
|
|
inline double get_nav1_sel_radial() const { return nav1_sel_radial; }
|
2000-04-27 22:45:48 +00:00
|
|
|
|
|
|
|
// NAV2 Accessors
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline double get_nav2_freq () const { return nav2_freq; }
|
|
|
|
inline double get_nav2_alt_freq () const { return nav2_alt_freq; }
|
|
|
|
inline double get_nav2_sel_radial() const { return nav2_sel_radial; }
|
2000-04-27 22:45:48 +00:00
|
|
|
|
|
|
|
// ADF Accessors
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline double get_adf_freq () const { return adf_freq; }
|
|
|
|
inline double get_adf_alt_freq () const { return adf_alt_freq; }
|
|
|
|
inline double get_adf_rotation () const { return adf_rotation; }
|
2000-04-24 23:50:59 +00:00
|
|
|
|
2001-03-29 06:05:01 +00:00
|
|
|
// Marker Beacon Accessors
|
|
|
|
inline bool get_inner_blink () const { return inner_blink; }
|
|
|
|
inline bool get_middle_blink () const { return middle_blink; }
|
|
|
|
inline bool get_outer_blink () const { return outer_blink; }
|
|
|
|
|
2000-04-27 22:45:48 +00:00
|
|
|
// Calculated values.
|
2000-04-24 23:50:59 +00:00
|
|
|
inline bool get_nav1_inrange() const { return nav1_inrange; }
|
2001-01-11 22:44:18 +00:00
|
|
|
bool get_nav1_to_flag () const;
|
|
|
|
bool get_nav1_from_flag () const;
|
2000-05-12 22:17:09 +00:00
|
|
|
inline bool get_nav1_has_dme() const { return nav1_has_dme; }
|
2001-01-11 22:44:18 +00:00
|
|
|
inline bool get_nav1_dme_inrange () const {
|
|
|
|
return nav1_inrange && nav1_has_dme;
|
|
|
|
}
|
2000-05-12 22:17:09 +00:00
|
|
|
inline bool get_nav1_has_gs() const { return nav1_has_gs; }
|
2000-04-24 23:50:59 +00:00
|
|
|
inline bool get_nav1_loc() const { return nav1_loc; }
|
2000-05-12 20:07:51 +00:00
|
|
|
inline double get_nav1_loclon() const { return nav1_loclon; }
|
|
|
|
inline double get_nav1_loclat() const { return nav1_loclat; }
|
2000-05-12 22:17:09 +00:00
|
|
|
inline double get_nav1_loc_dist() const { return nav1_loc_dist; }
|
2000-05-12 20:07:51 +00:00
|
|
|
inline double get_nav1_gslon() const { return nav1_gslon; }
|
|
|
|
inline double get_nav1_gslat() const { return nav1_gslat; }
|
|
|
|
inline double get_nav1_gs_dist() const { return nav1_gs_dist; }
|
|
|
|
inline double get_nav1_dmelon() const { return nav1_dmelon; }
|
|
|
|
inline double get_nav1_dmelat() const { return nav1_dmelat; }
|
|
|
|
inline double get_nav1_dme_dist() const { return nav1_dme_dist; }
|
2000-04-24 23:50:59 +00:00
|
|
|
inline double get_nav1_elev() const { return nav1_elev; }
|
|
|
|
inline double get_nav1_heading() const { return nav1_heading; }
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline double get_nav1_radial() const { return nav1_radial; }
|
2000-04-25 04:58:25 +00:00
|
|
|
inline double get_nav1_target_gs() const { return nav1_target_gs; }
|
2001-02-02 05:25:45 +00:00
|
|
|
inline double get_nav1_magvar() const { return nav1_magvar; }
|
2001-02-25 04:45:26 +00:00
|
|
|
double get_nav1_heading_needle_deflection() const;
|
|
|
|
double get_nav1_gs_needle_deflection() const;
|
2001-03-16 05:33:04 +00:00
|
|
|
inline double get_nav1_vol_btn() const { return nav1_vol_btn; }
|
2001-03-09 02:41:04 +00:00
|
|
|
inline bool get_nav1_ident_btn() const { return nav1_ident_btn; }
|
2000-04-24 23:50:59 +00:00
|
|
|
|
|
|
|
inline bool get_nav2_inrange() const { return nav2_inrange; }
|
2001-01-11 22:44:18 +00:00
|
|
|
bool get_nav2_to_flag () const;
|
|
|
|
bool get_nav2_from_flag () const;
|
2000-05-12 22:17:09 +00:00
|
|
|
inline bool get_nav2_has_dme() const { return nav2_has_dme; }
|
2001-01-11 22:44:18 +00:00
|
|
|
inline bool get_nav2_dme_inrange () const {
|
|
|
|
return nav2_inrange && nav2_has_dme;
|
|
|
|
}
|
2000-05-12 22:17:09 +00:00
|
|
|
inline bool get_nav2_has_gs() const { return nav2_has_gs; }
|
2000-04-27 03:26:36 +00:00
|
|
|
inline bool get_nav2_loc() const { return nav2_loc; }
|
2000-05-12 20:07:51 +00:00
|
|
|
inline double get_nav2_loclon() const { return nav2_loclon; }
|
|
|
|
inline double get_nav2_loclat() const { return nav2_loclat; }
|
2000-05-12 22:17:09 +00:00
|
|
|
inline double get_nav2_loc_dist() const { return nav2_loc_dist; }
|
2000-05-12 20:07:51 +00:00
|
|
|
inline double get_nav2_gslon() const { return nav2_gslon; }
|
|
|
|
inline double get_nav2_gslat() const { return nav2_gslat; }
|
|
|
|
inline double get_nav2_gs_dist() const { return nav2_gs_dist; }
|
|
|
|
inline double get_nav2_dmelon() const { return nav2_dmelon; }
|
|
|
|
inline double get_nav2_dmelat() const { return nav2_dmelat; }
|
|
|
|
inline double get_nav2_dme_dist() const { return nav2_dme_dist; }
|
2000-04-24 23:50:59 +00:00
|
|
|
inline double get_nav2_elev() const { return nav2_elev; }
|
|
|
|
inline double get_nav2_heading() const { return nav2_heading; }
|
User-visible
- knobs now continue to rotate when you hold down the mouse
- the middle mouse button makes knobs rotate much faster
- there are NAV1, NAV2, and ADF radios that can be tuned using the mouse
- there are standby frequencies for NAV1 and NAV2, and buttons to swap
- there is a crude, rather silly-looking DME, hard-wired to NAV1
- there is a crude, rather silly-looking autopilot that can lock
the heading (to the bug on the gyro), can lock to NAV1, and can lock
the current altitude
- the knobs for changing the radials on NAV1 and NAV2 look much better
and are in the right place
- tuning into an ILS frequency doesn't change the displayed radial for
NAV1
Code
- I've created a new module, sp_panel.[ch]xx, that constructs the
default single-prop panel; this works entirely outside of FGPanel,
so it is possible to construct similar modules for other sorts of
panels; all code specific to the default panel has been removed from
panel.cxx
- current_panel is now a pointer
- radiostack.[ch]xx keeps track both of the actual radial and of the
selected radial (they will differ with ILS); the NAV gauges should
not spin around automatically to show the actual radial (we need to
do something similar with the autopilot)
- the panel is initialized fairly early
- make sure that standby frequencies also get initialized
- I've started combining and clipping small textures to save texture
memory; there's a lot more to do, but at least I've made a start
2000-05-02 18:26:00 +00:00
|
|
|
inline double get_nav2_radial() const { return nav2_radial; }
|
2000-04-25 04:58:25 +00:00
|
|
|
inline double get_nav2_target_gs() const { return nav2_target_gs; }
|
2001-02-02 05:25:45 +00:00
|
|
|
inline double get_nav2_magvar() const { return nav2_magvar; }
|
2001-02-25 04:45:26 +00:00
|
|
|
double get_nav2_heading_needle_deflection() const;
|
|
|
|
double get_nav2_gs_needle_deflection() const;
|
2001-03-16 05:33:04 +00:00
|
|
|
inline double get_nav2_vol_btn() const { return nav2_vol_btn; }
|
2001-03-09 02:41:04 +00:00
|
|
|
inline bool get_nav2_ident_btn() const { return nav2_ident_btn; }
|
2000-04-24 23:50:59 +00:00
|
|
|
|
|
|
|
inline bool get_adf_inrange() const { return adf_inrange; }
|
|
|
|
inline double get_adf_lon() const { return adf_lon; }
|
|
|
|
inline double get_adf_lat() const { return adf_lat; }
|
|
|
|
inline double get_adf_heading() const { return adf_heading; }
|
2001-03-16 05:33:04 +00:00
|
|
|
inline double get_adf_vol_btn() const { return adf_vol_btn; }
|
2001-03-14 23:37:50 +00:00
|
|
|
inline bool get_adf_ident_btn() const { return adf_ident_btn; }
|
2000-04-24 23:50:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-04-25 03:09:26 +00:00
|
|
|
extern FGRadioStack *current_radiostack;
|
|
|
|
|
2000-04-24 23:50:59 +00:00
|
|
|
#endif // _FG_RADIOSTACK_HXX
|