separate implementation
This commit is contained in:
parent
332f76b11e
commit
b55fd4de91
5 changed files with 21 additions and 9 deletions
|
@ -26,7 +26,6 @@ set(SOURCES
|
||||||
mrg.cxx
|
mrg.cxx
|
||||||
navradio.cxx
|
navradio.cxx
|
||||||
newnavradio.cxx
|
newnavradio.cxx
|
||||||
commradio.cxx
|
|
||||||
od_gauge.cxx
|
od_gauge.cxx
|
||||||
rad_alt.cxx
|
rad_alt.cxx
|
||||||
render_area_2d.cxx
|
render_area_2d.cxx
|
||||||
|
@ -94,7 +93,6 @@ set(HEADERS
|
||||||
mrg.hxx
|
mrg.hxx
|
||||||
navradio.hxx
|
navradio.hxx
|
||||||
newnavradio.hxx
|
newnavradio.hxx
|
||||||
commradio.hxx
|
|
||||||
od_gauge.hxx
|
od_gauge.hxx
|
||||||
rad_alt.hxx
|
rad_alt.hxx
|
||||||
render_area_2d.hxx
|
render_area_2d.hxx
|
||||||
|
|
14
src/Radio/CMakeLists.txt
Normal file
14
src/Radio/CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
include(FlightGearComponent)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
radio.cxx
|
||||||
|
itm.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(HEADERS
|
||||||
|
radio.hxx
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
flightgear_component(Radio "${SOURCES}" "${HEADERS}")
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "itm.cpp"
|
#include "itm.cpp"
|
||||||
|
|
||||||
|
|
||||||
FGCommRadio::FGCommRadio(SGPropertyNode *node) {
|
FGRadio::FGRadio() {
|
||||||
|
|
||||||
/////////// radio parameters ///////////
|
/////////// radio parameters ///////////
|
||||||
_receiver_sensitivity = -110.0; // typical AM receiver sensitivity seems to be 0.8 microVolt at 12dB SINAD
|
_receiver_sensitivity = -110.0; // typical AM receiver sensitivity seems to be 0.8 microVolt at 12dB SINAD
|
||||||
|
@ -49,7 +49,7 @@ FGCommRadio::FGCommRadio(SGPropertyNode *node) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FGCommRadio::~FGCommRadio()
|
FGRadio::~FGRadio()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ double FGCommRadio::getFrequency(int radio) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void FGCommRadio::receiveText(SGGeod tx_pos, double freq, string text,
|
void FGRadio::receiveText(SGGeod tx_pos, double freq, string text,
|
||||||
int ground_to_air) {
|
int ground_to_air) {
|
||||||
|
|
||||||
double comm1 = getFrequency(1);
|
double comm1 = getFrequency(1);
|
||||||
|
@ -108,7 +108,7 @@ void FGCommRadio::receiveText(SGGeod tx_pos, double freq, string text,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double FGCommRadio::ITM_calculate_attenuation(SGGeod pos, double freq,
|
double FGRadio::ITM_calculate_attenuation(SGGeod pos, double freq,
|
||||||
int transmission_type) {
|
int transmission_type) {
|
||||||
|
|
||||||
/// Implement radio attenuation
|
/// Implement radio attenuation
|
|
@ -33,7 +33,7 @@
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
||||||
class FGCommRadio
|
class FGRadio
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool isOperable() const
|
bool isOperable() const
|
||||||
|
@ -49,8 +49,8 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FGCommRadio(SGPropertyNode *node);
|
FGRadio();
|
||||||
~FGCommRadio();
|
~FGRadio();
|
||||||
|
|
||||||
|
|
||||||
void setFrequency(double freq, int radio);
|
void setFrequency(double freq, int radio);
|
Loading…
Add table
Reference in a new issue