[801] | 1 | // Dominique YVON, CEA/DAPNIA/SPP 02/2000
|
---|
| 2 |
|
---|
| 3 | #ifndef AbsLobeNoPolar_H
|
---|
| 4 | #define AbsLobeNoPolar_H
|
---|
| 5 |
|
---|
| 6 | #ifdef __MWERKS__
|
---|
| 7 | #include "mwerksmath.h"
|
---|
| 8 | // #include "unixmac.h"
|
---|
| 9 | #include "macenvvariables.h"
|
---|
| 10 | #endif
|
---|
| 11 |
|
---|
| 12 | #include <stdlib.h>
|
---|
| 13 | #include "unitvector.h"
|
---|
| 14 |
|
---|
| 15 | #include "lobespecresp.h"
|
---|
| 16 | #include "radspec.h"
|
---|
| 17 |
|
---|
| 18 | class AbsLobeNoPolar{
|
---|
| 19 | //friend class SigCalcTool;
|
---|
| 20 | // Base class for Implementing Lobes
|
---|
| 21 |
|
---|
| 22 | public:
|
---|
| 23 | AbsLobeNoPolar(double FMin,double FMax):FreqMin(FMin),FreqMax(FMax)
|
---|
| 24 | { cosanglemax=-1.;
|
---|
| 25 | sprintf(Name,"");
|
---|
| 26 | }
|
---|
| 27 | virtual double weigth(const UnitVector& VInteg, const UnitVector& VP,
|
---|
| 28 | const UnitVector& VY, double freq) const =0;
|
---|
| 29 | // Return relative weigth of incoming power from direction VInteg
|
---|
| 30 | // at frequency freq no dimensions
|
---|
| 31 | virtual double lobeResol() const =0;
|
---|
| 32 | // Return reasonable computing resolution for this lobe
|
---|
| 33 | virtual double ResolutionCurve(double angle) const=0;
|
---|
| 34 | // Compute angular resolution degradation factor as a function of angle
|
---|
| 35 | // Usefull to optimize the speed of computation at large angle
|
---|
| 36 | // Overloaded when optimisation is required.
|
---|
| 37 | virtual void print(ostream& OutStr) const;
|
---|
| 38 | inline LobeSpecResp WeigthVsFreq(const UnitVector& VInteg,
|
---|
| 39 | const UnitVector& VP, const UnitVector& VY)
|
---|
| 40 | {
|
---|
| 41 | LobeSpecResp TheSpecResp(this,VInteg,VP,VY,this->minFreq(),this->maxFreq());
|
---|
| 42 | return TheSpecResp;
|
---|
| 43 | }
|
---|
| 44 | // Return an object including WeigthVsFreq with no dimensions.
|
---|
| 45 |
|
---|
| 46 | /* virtual DPixelMap& getLobeMap(double ResLSrcMap)=0;
|
---|
| 47 | // Return Map of Lobe to allow multiplication of map
|
---|
| 48 | // To be implemented
|
---|
| 49 | */
|
---|
| 50 | inline double AngleMax() const{return angleMax;}
|
---|
| 51 | inline double minFreq() const {return FreqMin;}
|
---|
| 52 | inline double maxFreq() const {return FreqMax;}
|
---|
| 53 | inline bool IsFreqSep() const {return LobeFSep;}
|
---|
| 54 |
|
---|
| 55 | int gorskyNlatFromRes() const;
|
---|
| 56 | // Compute Gorsky Nlat to prepare a map with full resolution of the lobe
|
---|
| 57 |
|
---|
| 58 | virtual UnitVector VecShift(const UnitVector& VPointe,const UnitVector& VY) const{
|
---|
| 59 | // Usefull when peak sensitivity is not in boresight direction
|
---|
| 60 | return VPointe;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | // Optimisations tools for frequency separable Lobe computations.
|
---|
| 64 | virtual double spectre(double freq) const{
|
---|
| 65 | freq=0.; //evite un warning
|
---|
| 66 | if(!LobeFSep) cerr<< "appel a lobe.spectre() in a non separable lobe"<<endl;
|
---|
| 67 | exit(-1);
|
---|
| 68 | return 0;
|
---|
| 69 | }
|
---|
| 70 | virtual double weigthAmpl(const UnitVector& VInteg, const UnitVector& VP,
|
---|
| 71 | const UnitVector& VY) const{
|
---|
| 72 | if(!LobeFSep) cerr<< "appel a lobe.weigthAmpl() in a non separable lobe"<<endl;
|
---|
| 73 | exit(-1);
|
---|
| 74 | return 0;
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | protected:
|
---|
| 78 | char Name[32];
|
---|
| 79 | double FreqMin;
|
---|
| 80 | double FreqMax;
|
---|
| 81 | double angleMax;
|
---|
| 82 | double cosanglemax;
|
---|
| 83 | // Angle beyond which constributions is neglected for this lobe
|
---|
| 84 | // Lobe 4 M_PI angleMax=180.
|
---|
| 85 | bool LobeFSep;
|
---|
| 86 | // Are spatial coordinated and frequency separable variables?
|
---|
| 87 | inline double minToRad(double minute) { return minute/(180.*60.)*M_PI;}
|
---|
| 88 | inline double radToMin(double rad) { return rad/M_PI*180.*60.; }
|
---|
| 89 | //SpectralResponse* pSpecRep;
|
---|
| 90 | };
|
---|
| 91 |
|
---|
| 92 |
|
---|
[798] | 93 | #endif |
---|