From b55fd4de91933bfb83ab2c4a9bc355d9fc161d8b Mon Sep 17 00:00:00 2001 From: adrian Date: Thu, 24 Nov 2011 05:02:42 +0200 Subject: [PATCH] separate implementation --- src/Instrumentation/CMakeLists.txt | 2 -- src/Radio/CMakeLists.txt | 14 ++++++++++++++ src/{Include => Radio}/itm.cpp | 0 .../commradio.cxx => Radio/radio.cxx} | 8 ++++---- .../commradio.hxx => Radio/radio.hxx} | 6 +++--- 5 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 src/Radio/CMakeLists.txt rename src/{Include => Radio}/itm.cpp (100%) rename src/{Instrumentation/commradio.cxx => Radio/radio.cxx} (97%) rename src/{Instrumentation/commradio.hxx => Radio/radio.hxx} (96%) diff --git a/src/Instrumentation/CMakeLists.txt b/src/Instrumentation/CMakeLists.txt index e092ec369..7ae7cf343 100644 --- a/src/Instrumentation/CMakeLists.txt +++ b/src/Instrumentation/CMakeLists.txt @@ -26,7 +26,6 @@ set(SOURCES mrg.cxx navradio.cxx newnavradio.cxx - commradio.cxx od_gauge.cxx rad_alt.cxx render_area_2d.cxx @@ -94,7 +93,6 @@ set(HEADERS mrg.hxx navradio.hxx newnavradio.hxx - commradio.hxx od_gauge.hxx rad_alt.hxx render_area_2d.hxx diff --git a/src/Radio/CMakeLists.txt b/src/Radio/CMakeLists.txt new file mode 100644 index 000000000..aa6d5483b --- /dev/null +++ b/src/Radio/CMakeLists.txt @@ -0,0 +1,14 @@ +include(FlightGearComponent) + +set(SOURCES + radio.cxx + itm.cpp + ) + +set(HEADERS + radio.hxx + ) + + +flightgear_component(Radio "${SOURCES}" "${HEADERS}") + diff --git a/src/Include/itm.cpp b/src/Radio/itm.cpp similarity index 100% rename from src/Include/itm.cpp rename to src/Radio/itm.cpp diff --git a/src/Instrumentation/commradio.cxx b/src/Radio/radio.cxx similarity index 97% rename from src/Instrumentation/commradio.cxx rename to src/Radio/radio.cxx index b6a34a432..c1ca246b1 100644 --- a/src/Instrumentation/commradio.cxx +++ b/src/Radio/radio.cxx @@ -32,7 +32,7 @@ #include "itm.cpp" -FGCommRadio::FGCommRadio(SGPropertyNode *node) { +FGRadio::FGRadio() { /////////// radio parameters /////////// _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) { 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) { /// Implement radio attenuation diff --git a/src/Instrumentation/commradio.hxx b/src/Radio/radio.hxx similarity index 96% rename from src/Instrumentation/commradio.hxx rename to src/Radio/radio.hxx index 70cafd937..7915d2e77 100644 --- a/src/Instrumentation/commradio.hxx +++ b/src/Radio/radio.hxx @@ -33,7 +33,7 @@ using std::string; -class FGCommRadio +class FGRadio { private: bool isOperable() const @@ -49,8 +49,8 @@ private: public: - FGCommRadio(SGPropertyNode *node); - ~FGCommRadio(); + FGRadio(); + ~FGRadio(); void setFrequency(double freq, int radio); -- 2.39.5