check-style src/antenna
authorNicola Baldo <nbaldo@cttc.es>
Wed, 11 Apr 2012 11:46:20 +0200
changeset 7846 2d4d07a6fa0e
parent 7845 ee22002d14b6
child 7847 411299d94e07
check-style src/antenna
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/isotropic-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-parabolic-antenna.cc
--- a/src/antenna/model/angles.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/angles.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -57,7 +57,7 @@
   return is;
 }
 
-  
+
 Angles::Angles ()
   : phi (0),
     theta (0)
--- a/src/antenna/model/angles.h	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/angles.h	Wed Apr 11 11:46:20 2012 +0200
@@ -58,8 +58,8 @@
  *          ^
  *        z | 
  *          |_ theta
- *          | \   
- *          | /|  
+ *          | \
+ *          | /|
  *          |/ |   y
  *          +-------->
  *         /  \|
@@ -128,7 +128,7 @@
  * \return a reference to the output stream
  */
 std::ostream& operator<< ( std::ostream& os, const Angles& a);
-  
+
 /** 
  * initialize a struct Angles from input
  * 
--- a/src/antenna/model/antenna-model.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/antenna-model.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -34,7 +34,7 @@
 AntennaModel::AntennaModel ()
 {
 }
-  
+
 AntennaModel::~AntennaModel ()
 {
 }
@@ -44,11 +44,11 @@
 {
   static TypeId tid = TypeId ("ns3::AntennaModel")
     .SetParent<Object> ()
-    ;
+  ;
   return tid;
 }
 
-  
-  
+
+
 }
 
--- a/src/antenna/model/antenna-model.h	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/antenna-model.h	Wed Apr 11 11:46:20 2012 +0200
@@ -53,7 +53,7 @@
   static TypeId GetTypeId ();
 
 
-  /**       
+  /**
    * this method is expected to be re-implemented by each antenna model 
    * 
    * \param the spherical angles at which the radiation pattern should
--- a/src/antenna/model/cosine-antenna-model.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/cosine-antenna-model.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -57,7 +57,7 @@
                    DoubleValue (0.0),
                    MakeDoubleAccessor (&CosineAntennaModel::m_maxGain),
                    MakeDoubleChecker<double> ())
-    ;
+  ;
   return tid;
 }
 
@@ -66,7 +66,7 @@
 { 
   NS_LOG_FUNCTION (this << beamwidthDegrees);
   m_beamwidthRadians = DegreesToRadians (beamwidthDegrees);
-  m_exponent = - 3.0 / (20*log10 (cos (m_beamwidthRadians / 4.0)));
+  m_exponent = -3.0 / (20*log10 (cos (m_beamwidthRadians / 4.0)));
   NS_LOG_LOGIC (this << " m_exponent = " << m_exponent);
 }
 
@@ -107,15 +107,15 @@
     }
 
   NS_LOG_LOGIC ("phi = " << phi );
-  
+
   // element factor: amplitude gain of a single antenna element in linear units
   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 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.  
+  // ease of use of this model.
 
   double gainDb = 20*log10 (ef);
   NS_LOG_LOGIC ("gain = " << gainDb << " + " << m_maxGain << " dB");
--- a/src/antenna/model/isotropic-antenna-model.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/isotropic-antenna-model.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -38,7 +38,7 @@
   static TypeId tid = TypeId ("ns3::IsotropicAntennaModel")
     .SetParent<AntennaModel> ()
     .AddConstructor<IsotropicAntennaModel> ()
-    ;
+  ;
   return tid;
 }
 
--- a/src/antenna/model/parabolic-antenna-model.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/model/parabolic-antenna-model.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -57,7 +57,7 @@
                    DoubleValue (20.0),
                    MakeDoubleAccessor (&ParabolicAntennaModel::m_maxAttenuation),
                    MakeDoubleChecker<double> ())
-    ;
+  ;
   return tid;
 }
 
@@ -107,7 +107,7 @@
   NS_LOG_LOGIC ("phi = " << phi );
 
   double gainDb = -std::min (12 * pow (phi / m_beamwidthRadians, 2), m_maxAttenuation);
-  
+
   NS_LOG_LOGIC ("gain = " << gainDb);
   return gainDb;
 }
--- a/src/antenna/test/test-angles.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/test/test-angles.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -44,7 +44,7 @@
 std::string OneVectorConstructorTestCase::BuildNameString (Vector v)
 {
   std::ostringstream oss;
-  oss <<  " v = " << v ;
+  oss <<  " v = " << v;
   return oss.str ();
 }
 
@@ -133,7 +133,7 @@
   AddTestCase (new OneVectorConstructorTestCase (Vector (0, -2, 0),    Angles (-M_PI_2, M_PI_2)));
   AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, 2),     Angles (0, 0)));
   AddTestCase (new OneVectorConstructorTestCase (Vector (0, 0, -2),    Angles (0, M_PI)));
-  
+
   AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, 1),     Angles (0, M_PI_4)));
   AddTestCase (new OneVectorConstructorTestCase (Vector (1, 0, -1),    Angles (0, 3*M_PI_4)));
   AddTestCase (new OneVectorConstructorTestCase (Vector (1, 1, 0),     Angles (M_PI_4, M_PI_2)));
@@ -168,7 +168,7 @@
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, 0),    Vector (0, 0, 0), Angles (-M_PI_2, M_PI_2)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, 2),     Vector (0, 0, 0), Angles (0, 0)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, 0, -2),    Vector (0, 0, 0), Angles (0, M_PI)));
-  
+
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, 1),     Vector (0, 0, 0), Angles (0, M_PI_4)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 0, -1),    Vector (0, 0, 0), Angles (0, 3*M_PI_4)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (1, 1, 0),     Vector (0, 0, 0), Angles (M_PI_4, M_PI_2)));
@@ -197,7 +197,7 @@
 
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (-2, 2, -1),     Vector (-4, 2, -1), Angles (0, M_PI_2)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (2, 2, 0),    Vector (4, 2, 0), Angles (M_PI, M_PI_2)));
-  
+
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (-1, 4, 4),     Vector (-2, 4, 3), Angles (0, M_PI_4)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (0, -2, -6),    Vector (-1, -2, -5), Angles (0, 3*M_PI_4)));
   AddTestCase (new TwoVectorsConstructorTestCase (Vector (77, 3, 43),    Vector (78, 2, 43), Angles (3*M_PI_4, M_PI_2)));
--- a/src/antenna/test/test-cosine-antenna.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/test/test-cosine-antenna.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -165,7 +165,7 @@
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (54.677),  0),       150,        -150,        0,           -20,     EQUAL));
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians   (30),    0),       150,        -150,        0,           -20,  LESSTHAN));
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians   (20),    0),       150,        -150,        0,           -20,  LESSTHAN));
-  
+
   // test maxGain
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians    (0),    0),        60,           0,       10,            10,     EQUAL));
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians   (30),    0),        60,           0,       22,            19,     EQUAL));
@@ -200,7 +200,7 @@
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-150),  9.5),       100,        -150,        2,             2,     EQUAL));
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-100),  9.5),       100,        -150,        4,             1,     EQUAL));
   AddTestCase (new CosineAntennaModelTestCase (Angles (DegreesToRadians (-200),  9.5),       100,        -150,       -1,            -4,     EQUAL));
-                   
+
 };
 
 static CosineAntennaModelTestSuite staticCosineAntennaModelTestSuiteInstance;
--- a/src/antenna/test/test-degrees-radians.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/test/test-degrees-radians.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -128,7 +128,7 @@
   AddTestCase (new RadiansToDegreesTestCase (M_PI + M_PI, 360));
   AddTestCase (new RadiansToDegreesTestCase (-M_PI_2, -90));
   AddTestCase (new RadiansToDegreesTestCase (4.5*M_PI, 810));
-  
+
 };
 
 static DegreesRadiansTestSuite staticDegreesRadiansTestSuiteInstance;
--- a/src/antenna/test/test-parabolic-antenna.cc	Wed Apr 11 11:38:40 2012 +0200
+++ b/src/antenna/test/test-parabolic-antenna.cc	Wed Apr 11 11:46:20 2012 +0200
@@ -154,7 +154,7 @@
   AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians   (60),    0),       80,        -150,       10,           -10,     EQUAL));
   AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians   (90),    0),       80,        -150,       10,           -10,     EQUAL));
   AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians   (30),    0),       80,        -150,       10,           -10,     EQUAL));
-  
+
 
 
   // test elevation angle
@@ -179,7 +179,7 @@
   AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-150),  9.5),       100,        -150,       30,             0,     EQUAL));
   AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-100),  9.5),       100,        -150,       30,            -3,     EQUAL));
   AddTestCase (new ParabolicAntennaModelTestCase (Angles (DegreesToRadians (-200),  9.5),       100,        -150,       30,            -3,     EQUAL));
-                   
+
 };
 
 static ParabolicAntennaModelTestSuite staticParabolicAntennaModelTestSuiteInstance;