addressed code review by Tom http://codereview.appspot.com/5726045/#msg1
authorNicola Baldo <nbaldo@cttc.es>
Tue, 10 Apr 2012 19:00:28 +0200
changeset 7843 1cc2ff632220
parent 7842 4444a4932332
child 7844 24575485b234
child 8701 865f750a6b63
addressed code review by Tom http://codereview.appspot.com/5726045/#msg1
src/antenna/model/angles.cc
src/antenna/model/angles.h
src/antenna/model/antenna-model.cc
src/antenna/model/antenna-model.h
src/antenna/model/cosine-antenna-model.cc
src/antenna/model/parabolic-antenna-model.cc
src/antenna/test/test-angles.cc
src/antenna/test/test-cosine-antenna.cc
src/antenna/test/test-degrees-radians.cc
src/antenna/test/test-isotropic-antenna.cc
src/antenna/test/test-parabolic-antenna.cc
--- a/src/antenna/model/angles.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/model/angles.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -20,7 +20,7 @@
 
 
 #include <ns3/log.h>
-#include <math.h>
+#include <cmath>
 #include "angles.h"
 
 
--- a/src/antenna/model/angles.h	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/model/angles.h	Tue Apr 10 19:00:28 2012 +0200
@@ -49,7 +49,11 @@
  * 
  * struct holding the azimuth and inclination angles of spherical
  * coordinates. The notation is the one used in  "Antenna Theory - Analysis
- * and Design", C.A. Balanis, Wiley, 2nd Ed., section 2.2 "Radiation pattern".
+ * and Design", C.A. Balanis, Wiley, 2nd Ed., section 2.2 "Radiation
+ * pattern".
+ * This notation corresponds to the standard spherical coordinates, with phi
+ * measured counterclockwise in the x-y plane off the x-axis, and
+ * theta measured off the z-axis. 
  * 
  *          ^
  *        z | 
@@ -67,7 +71,7 @@
 struct Angles
 {
   /** 
-   * default constructor, will inizialize phi and theta to zero
+   * default constructor, will initialize phi and theta to zero
    * 
    */
   Angles ();
--- a/src/antenna/model/antenna-model.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/model/antenna-model.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -20,7 +20,7 @@
 
 
 #include <ns3/log.h>
-#include <math.h>
+#include <cmath>
 #include "antenna-model.h"
 
 
--- a/src/antenna/model/antenna-model.h	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/model/antenna-model.h	Tue Apr 10 19:00:28 2012 +0200
@@ -34,10 +34,10 @@
  * 
  * This class provides an interface for the definition of antenna
  * radiation pattern models. This interface is based on the use of
- * spherical coordinates, in particolar of the azimuth and inclination
+ * spherical coordinates, in particular of the azimuth and inclination
  * angles. This choice is the one proposed "Antenna Theory - Analysis
  * and Design", C.A. Balanis, Wiley, 2nd Ed., see in particular
- *  section 2.2 "Radiation pattern".
+ * section 2.2 "Radiation pattern".
  * 
  *
  */
@@ -59,7 +59,10 @@
    * \param the spherical angles at which the radiation pattern should
    * be evaluated
    * 
-   * \return the gain in dB of the antenna radiation pattern at the specified angles
+   * \return the power gain in dBi of the antenna radiation pattern at
+   * the specified angles; dBi means dB with respect to the gain of an
+   * isotropic radiator. Since a power gain is used, the efficiency of
+   * the antenna is expected to be included in the gain value. 
    */
   virtual double GetGainDb (Angles a) = 0;
 
--- a/src/antenna/model/cosine-antenna-model.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/model/cosine-antenna-model.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -21,7 +21,7 @@
 
 #include <ns3/log.h>
 #include <ns3/double.h>
-#include <math.h>
+#include <cmath>
 
 #include "antenna-model.h"
 #include "cosine-antenna-model.h"
@@ -112,7 +112,7 @@
   double ef = pow (cos (phi / 2.0), m_exponent);
   
   // the array factor is not considered. Note that if we did consider
-  // the array factor, the actual beawidth would change, and in
+  // the array factor, the actual beamwidth would change, and in
   // particular it would be different from the one specified by the
   // user. Hence it is not desirable to use the array factor, for the
   // ease of use of this model.  
--- a/src/antenna/model/parabolic-antenna-model.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/model/parabolic-antenna-model.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -21,7 +21,7 @@
 
 #include <ns3/log.h>
 #include <ns3/double.h>
-#include <math.h>
+#include <cmath>
 
 #include "antenna-model.h"
 #include "parabolic-antenna-model.h"
--- a/src/antenna/test/test-angles.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/test/test-angles.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -21,7 +21,7 @@
 #include <ns3/log.h>
 #include <ns3/test.h>
 #include <ns3/antenna-model.h>
-#include <math.h>
+#include <cmath>
 #include <string>
 #include <iostream>
 #include <sstream>
--- a/src/antenna/test/test-cosine-antenna.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/test/test-cosine-antenna.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -23,7 +23,7 @@
 #include <ns3/double.h>
 #include <ns3/cosine-antenna-model.h>
 #include <ns3/simulator.h>
-#include <math.h>
+#include <cmath>
 #include <string>
 #include <iostream>
 #include <sstream>
--- a/src/antenna/test/test-degrees-radians.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/test/test-degrees-radians.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -21,7 +21,7 @@
 #include <ns3/log.h>
 #include <ns3/test.h>
 #include <ns3/antenna-model.h>
-#include <math.h>
+#include <cmath>
 #include <string>
 #include <iostream>
 #include <sstream>
--- a/src/antenna/test/test-isotropic-antenna.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/test/test-isotropic-antenna.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -21,7 +21,7 @@
 #include <ns3/log.h>
 #include <ns3/test.h>
 #include <ns3/isotropic-antenna-model.h>
-#include <math.h>
+#include <cmath>
 #include <string>
 #include <iostream>
 #include <sstream>
--- a/src/antenna/test/test-parabolic-antenna.cc	Tue Apr 10 18:32:50 2012 +0200
+++ b/src/antenna/test/test-parabolic-antenna.cc	Tue Apr 10 19:00:28 2012 +0200
@@ -23,7 +23,7 @@
 #include <ns3/double.h>
 #include <ns3/parabolic-antenna-model.h>
 #include <ns3/simulator.h>
-#include <math.h>
+#include <cmath>
 #include <string>
 #include <iostream>
 #include <sstream>