Brief description of class still missing. More...
#include <ArrayStations.h>
Public Member Functions | |
| ArrayStations () | |
| bool | hasCompatibleStations (QString *log=0) const |
| Rect | rectangle () const |
| const Point2D & | relativeCoordinates (int station) const |
| void | setRelativeCoordinates () |
| ~ArrayStations () | |
Brief description of class still missing.
Full description of class still missing
| bool ArrayCore::ArrayStations::hasCompatibleStations | ( | QString * | log = 0 | ) | const |
Check compatibility of stations (t0 and deltaT). No longer usefull with sparse time range: returns always true
References TRACE.
Referenced by LinearFKActiveArrayStations::addSignals(), ToolArrayBase::initStations(), and Acquisition::setSignals().
{
TRACE;
/*if(isEmpty()) return true;
const_iterator it=begin();
double refDeltaT=(*it)->deltaT();
double refT0=(*it)->t0();
for(it++;it!=end();++it) {
StationSignals * stat=*it;
if(refDeltaT!=stat->deltaT()) {
if(log)
(*log) += tr("Checking station compatibility: the sampling rate is not compatible for station %1.\n" )
.arg(stat->name());
else
Message::warning(MSG_ID, tr("Checking station compatibility"),
tr( "The sampling rate is not compatible for station %1." )
.arg(stat->name()), Message::cancel());
return false;
}
double nDeltaT0=fabs(refT0 - stat->t0())/refDeltaT;
if(nDeltaT0 - round(nDeltaT0) > 0.01 * refDeltaT) {
if(log)
(*log) += tr("Checking station compatibility: the differences between t0s must be a multiple of "
"the sampling period for station %1.\n" ).arg(stat->name());
else
Message::warning(MSG_ID, tr("Checking station compatibility"),
tr( "The differences between t0s must be a multiple of "
"the sampling period for station %1" ).arg(stat->name()),
Message::cancel());
return false;
}
}*/
return true;
}
| Rect ArrayCore::ArrayStations::rectangle | ( | ) | const |
| const Point2D& ArrayCore::ArrayStations::relativeCoordinates | ( | int | station | ) | const [inline] |
Referenced by ArrayCore::FKArrayProcess::FKArrayProcess(), PhaseShifter::PhaseShifter(), ToolFK::setDefaultGridParameters(), and LinearFKActiveArrayStations::setRelativeCoordinates().
{ASSERT(station<count()); return _relativeCoordinates[station];}
Get array central point The center is usefull to use relative coordinates and hence to avoid big number computations
Reimplemented in LinearFKActiveArrayStations.
References TRACE.
Referenced by ToolFK::initStations().
{
TRACE;
Point2D c;
for(const_iterator it=begin();it!=end();++it) {
c += ( *it) ->coordinates();
}
c /= (double) count();
delete _relativeCoordinates;
_relativeCoordinates=new Point2D[count()];
for(int i=count()-1; i>=0; i-- ) {
_relativeCoordinates[i]=at(i)->coordinates();
_relativeCoordinates[i] -= c;
}
}