[Positioning] Fix #include and class declarations
Where possible, put the #include in the .cc file instead of the header file. Include <ostream> when <iostream> is not needed. Fix a bug in operator<<() for Measurement: NULL value of ap and mobile was not checked.
This commit is contained in:
parent
d156e91379
commit
4e5db1af92
|
@ -4,8 +4,6 @@
|
|||
#include "wifidevice.hh"
|
||||
#include "point3d.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#define AP_DEFAULT_CHANNEL 6
|
||||
#define AP_DEFAULT_ANTENNA_GAIN 5
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ class Building ;
|
|||
|
||||
#include "point3d.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
|
||||
class Area
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "building.hh"
|
||||
#include "waypoint.hh"
|
||||
#include "area.hh"
|
||||
#include "waypoint.hh"
|
||||
|
||||
|
||||
using namespace std ;
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
class Area ;
|
||||
class Waypoint ;
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
|
||||
class Building
|
||||
{
|
||||
|
|
|
@ -5,8 +5,6 @@ class ReferencePoint ;
|
|||
|
||||
#include "measurement.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class CalibrationMeasurement: public Measurement
|
||||
{
|
||||
protected:
|
||||
|
|
|
@ -96,7 +96,10 @@ bool Measurement::operator==(const Measurement &m)
|
|||
ostream &operator<<(ostream &os, const Measurement &m)
|
||||
{
|
||||
// MAC addresses
|
||||
os << m.mobile->get_mac_addr() << "->" << m.ap->get_mac_addr() << ": " ;
|
||||
os
|
||||
<< (m.mobile != NULL ? m.mobile->get_mac_addr() : "Unknown_mobile")
|
||||
<< "->" << (m.ap != NULL ? m.ap->get_mac_addr() : "Unknown_AP")
|
||||
<< ": " ;
|
||||
|
||||
// List of SS
|
||||
if (m.ss_list.size() == 0)
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
#include "mobile.hh"
|
||||
#include "accesspoint.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <math.h>
|
||||
#include <ostream>
|
||||
#include <cmath>
|
||||
|
||||
class Measurement
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "wifidevice.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
#define MOBILE_DEFAULT_ANTENNA_GAIN 2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _OWLPS_POSITIONING_POINT3D_HH_
|
||||
#define _OWLPS_POSITIONING_POINT3D_HH_
|
||||
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <cmath>
|
||||
|
||||
class Point3D
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#ifndef _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|
||||
#define _OWLPS_POSITIONING_REFERENCEPOINT_HH_
|
||||
|
||||
#include "point3d.hh"
|
||||
#include "calibrationmeasurement.hh"
|
||||
class CalibrationMeasurement ;
|
||||
|
||||
#include "point3d.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
|
||||
class ReferencePoint: public Point3D
|
||||
{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef _OWLPS_POSITIONING_WAYPOINT_HH_
|
||||
#define _OWLPS_POSITIONING_WAYPOINT_HH_
|
||||
|
||||
#include "point3d.hh"
|
||||
#include "building.hh"
|
||||
class Building ;
|
||||
|
||||
#include <iostream>
|
||||
#include "point3d.hh"
|
||||
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "wifidevice.hh"
|
||||
|
||||
|
||||
using namespace std ;
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include "posutil.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
|
||||
#define WIFIDEVICE_DEFAULT_ANTENNA_GAIN 2
|
||||
#define WIFIDEVICE_DEFAULT_TRX_POWER 20 // 20 dBm = 100 mW
|
||||
|
|
Loading…
Reference in New Issue