Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

clSpectDir Class Reference

Direction calculation from spectrum. More...

#include <SpectDir.hh>

Inheritance diagram for clSpectDir:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 clSpectDir ()
 ~clSpectDir ()
void SetSensorSpacing (GDT)
 Set sensor spacing.

void SetSoundSpeed (GDT)
 Set speed of sound.

GDT GetArrayFrequency ()
 Get array frequency.

GDT GetDirection (GDT, GDT)
 Get direction from frequency and phase difference.

void SetDirectionCount (long)
 Set number of directions.

void SetDirection (GDT, GDT, GDT)
 Set direction from frequency, power/magnitude and phase diff.

GDT * GetDirections (GDT *)
 Get vector containing results of subsequent SetDirection()'s.

void ResetDirections ()
 Reset directions.


Public Attributes

clDSPOp DSP

Private Attributes

long lDirCount
GDT fPI
GDT fHalfPI
GDT fSensorSpacing
GDT fArrayFreq
GDT * fpDirections
clAlloc DirBuf

Detailed Description

Direction calculation from spectrum.

This is 100% my (Jussi Laako) own algorithm. At least I haven't seen this anywhere before and I'm not aware if such exists anywhere else.

Definition at line 53 of file SpectDir.hh.


Constructor & Destructor Documentation

clSpectDir::clSpectDir  ) 
 

Definition at line 30 of file SpectDir.cc.

References fHalfPI, fpDirections, fPI, and lDirCount.

clSpectDir::~clSpectDir  ) 
 

Definition at line 39 of file SpectDir.cc.


Member Function Documentation

void clSpectDir::SetSensorSpacing GDT   ) 
 

Set sensor spacing.

Note:
Call this before setting speed of sound.
Parameters:
fSpacing Sensor spacing (m)

Definition at line 44 of file SpectDir.cc.

References fSensorSpacing.

Referenced by clSpectDirDipole::clSpectDirDipole(), and clSpectDirLine::clSpectDirLine().

void clSpectDir::SetSoundSpeed GDT   ) 
 

Set speed of sound.

Parameters:
fSoundSpeed Speed of sound (m/s)

Definition at line 50 of file SpectDir.cc.

References fArrayFreq, and fSensorSpacing.

Referenced by clSpectDirDipole::clSpectDirDipole(), and clSpectDirLine::clSpectDirLine().

GDT clSpectDir::GetArrayFrequency  )  [inline]
 

Get array frequency.

Get maximum frequency that can be handled by the array without false directions. It is $\frac{\lambda}{2}$.

Returns:
Array frequency

Definition at line 88 of file SpectDir.hh.

References fArrayFreq, and GDT.

Referenced by clSpectDirDipole::clSpectDirDipole(), and clSpectDirLine::clSpectDirLine().

GDT clSpectDir::GetDirection GDT  ,
GDT 
 

Get direction from frequency and phase difference.

\[\Delta{f}=\frac{f_{a}}{f}\]

\[\theta=\Delta{f}\frac{\Delta\varphi}{2}\]

Parameters:
fFrequency Frequency (Hz)
fDPhase Phase difference (rad)
Returns:
Direction (rad)

Definition at line 56 of file SpectDir.cc.

References fArrayFreq, and GDT.

Referenced by SetDirection().

void clSpectDir::SetDirectionCount long   ) 
 

Set number of directions.

180 / n = resolution.

Parameters:
lCount Number of directions (sectors)

Definition at line 67 of file SpectDir.cc.

References DirBuf, DSP, fpDirections, GDT, and lDirCount.

Referenced by clSpectDirDipole::clSpectDirDipole(), and clSpectDirLine::clSpectDirLine().

void clSpectDir::SetDirection GDT  ,
GDT  ,
GDT 
 

Set direction from frequency, power/magnitude and phase diff.

Note:
Results are integrated over subsequent calls.
Parameters:
fFrequency Frequency (Hz)
fLevel Level
fDPhase Phase difference

Definition at line 75 of file SpectDir.cc.

References DSP, fpDirections, fPI, GDT, GetDirection(), and lDirCount.

Referenced by clSpectDirLine::Calculate(), and clSpectDirDipole::Calculate().

GDT * clSpectDir::GetDirections GDT *   ) 
 

Get vector containing results of subsequent SetDirection()'s.

Note:
Destination pointer can be NULL, destination copy is normalized to [0:1], returned pointer is pointer to raw results.
Parameters:
fpDest Directions
Returns:
Pointer to directions

Definition at line 89 of file SpectDir.cc.

References DSP, fpDirections, GDT, and lDirCount.

Referenced by clSpectDirLine::GetResults(), and clSpectDirDipole::GetResults().

void clSpectDir::ResetDirections  ) 
 

Reset directions.

Definition at line 96 of file SpectDir.cc.

References DSP, fpDirections, and lDirCount.

Referenced by clSpectDirLine::ResetResults(), and clSpectDirDipole::ResetResults().


Member Data Documentation

long clSpectDir::lDirCount [private]
 

Definition at line 55 of file SpectDir.hh.

Referenced by clSpectDir(), GetDirections(), ResetDirections(), SetDirection(), and SetDirectionCount().

GDT clSpectDir::fPI [private]
 

Definition at line 56 of file SpectDir.hh.

Referenced by clSpectDir(), and SetDirection().

GDT clSpectDir::fHalfPI [private]
 

Definition at line 57 of file SpectDir.hh.

Referenced by clSpectDir().

GDT clSpectDir::fSensorSpacing [private]
 

Definition at line 58 of file SpectDir.hh.

Referenced by SetSensorSpacing(), and SetSoundSpeed().

GDT clSpectDir::fArrayFreq [private]
 

Definition at line 59 of file SpectDir.hh.

Referenced by GetArrayFrequency(), GetDirection(), and SetSoundSpeed().

GDT* clSpectDir::fpDirections [private]
 

Definition at line 60 of file SpectDir.hh.

Referenced by clSpectDir(), GetDirections(), ResetDirections(), SetDirection(), and SetDirectionCount().

clAlloc clSpectDir::DirBuf [private]
 

Definition at line 61 of file SpectDir.hh.

Referenced by SetDirectionCount().

clDSPOp clSpectDir::DSP
 

Definition at line 63 of file SpectDir.hh.

Referenced by clSpectDirLine::Calculate(), clSpectDirDipole::Calculate(), clSpectDirDipole::clSpectDirDipole(), clSpectDirLine::clSpectDirLine(), GetDirections(), clSpectDirLine::GetResults(), clSpectDirDipole::GetResults(), clSpectDirLine::PutData(), clSpectDirDipole::PutData(), ResetDirections(), SetDirection(), and SetDirectionCount().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:24 2003 for HASAS by doxygen 1.3.3