Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef THEORETICALFK_H
00029 #define THEORETICALFK_H
00030
00031 #include <math.h>
00032
00033 #include <QGpCoreTools.h>
00034 #include "QGpCoreWaveDLLExport.h"
00035
00036 namespace QGpCoreWave {
00037
00038 class QGPCOREWAVE_EXPORT TheoreticalFK : public AbstractFunction2
00039 {
00040 public:
00041 TheoreticalFK(const QVector<Point2D>& stations);
00042
00043 inline virtual double value(double kx, double ky) const;
00044 const QVector<Point2D>& stations() const {return _stations;}
00045 private:
00046 QVector<Point2D> _stations;
00047 double _fac;
00048 };
00049
00050 inline double TheoreticalFK::value(double kx, double ky) const
00051 {
00052 TRACE;
00053 double csum=0.0, ssum=0.0, val;
00054 for(int i=_stations.count()-1; i>=0; i--) {
00055 const Point2D& s=_stations[i];
00056 val=kx*s.x()+ky*s.y();
00057 csum+=cos(val);
00058 ssum+=sin(val);
00059 }
00060 return (csum*csum+ssum*ssum)*_fac;
00061 }
00062
00063 }
00064
00065 #endif // THEORETICALFK_H