utility.hpp

Go to the documentation of this file.
00001 
00002 #ifndef UTILITY_H
00003 #define UTILITY_H
00004 
00005 #include <iostream>
00006 using namespace std;
00007 #include <math.h>
00008 #include <boost/shared_ptr.hpp>
00009 
00016 
00017 typedef unsigned int t_uint; 
00018 
00020 typedef unsigned long t_ulong; 
00021 
00023 typedef unsigned char t_uchar;
00024 
00026 typedef boost::shared_ptr<ostream> ostreamPtr;
00027 
00034 inline double powerToDecibels(double powerValue)
00035 {
00036    assert(powerValue != 0.0);
00037    return (10.0 * log10(powerValue / 1.0));
00038 }
00039 
00046 inline double decibelsToPower(double decibelValue)
00047 {
00048    return (1.0 * pow(10, (decibelValue / 10.0)));
00049 }
00050 
00052 const double SPEED_OF_LIGHT = 299792458.0;
00053 
00055 const double PI = 3.14159265;
00056 
00057 #endif // UTILITY_H
00058 

Generated on Tue Dec 12 17:04:39 2006 for rfidsim by  doxygen 1.4.7