void Sbs2SourceReconstrucionLoreta::reconstruct()
{

    if (sumType == MEAN)
	calculateMean();
    if (sumType == POWER)
	calculatePower();
}
Exemple #2
0
float dwGetReceivePower(dwDevice_t* dev) {
  float C = (float)dwSpiRead16(dev, RX_FQUAL, CIR_PWR_SUB);
  float N = spiReadRxInfo(dev);

  float twoPower17 = 131072.0;

  return calculatePower(C * twoPower17, N, dev->pulseFrequency);
}
Exemple #3
0
float dwGetFirstPathPower(dwDevice_t* dev) {
  float f1 = (float)dwSpiRead16(dev, RX_TIME, FP_AMPL1_SUB);
  float f2 = (float)dwSpiRead16(dev, RX_FQUAL, FP_AMPL2_SUB);
  float f3 = (float)dwSpiRead16(dev, RX_FQUAL, FP_AMPL3_SUB);
  float N = spiReadRxInfo(dev);

  return calculatePower(f1 * f1 + f2 * f2 + f3 * f3, N, dev->pulseFrequency);
}
Exemple #4
0
  std::ostream& Ship::display(std::ostream& os) const{
    if (!empty()){
      os << _type << "-" ;

      os.setf(ios::fixed);
      os.width(6);
      os.precision(2);

      os << calculatePower() << endl;

      for (int i = 0; i < _length; i++){
        _engines[i]->display(os) << endl;
      }
      os.unsetf(ios::fixed);
    }
    return os;
  }
void Sbs2SourceReconstructionSparse::doRecPow(DTU::DtuArray2D<double> *Y_input, DTU::DtuArray2D<double> *S_output, int *isSourceReconstructionReady)
{
    (*isSourceReconstructionReady) = 0;
    S = S_output;

    for (int row=0; row<Y_input->dim1(); ++row)
    {
	for (int column=0; column<Y_input->dim2(); ++column)
	{
	    (*Y)[row][column] = (*Y_input)[row][column];
	}
    }

    preprocessData();
    cross_validation_k_channel(Y,S_temp);
    calculatePower(S_temp, S_output);
    (*isSourceReconstructionReady) = 1;
}
Exemple #6
0
 bool Ship::operator<(double min){
   if (calculatePower() < min)
     return true;
   else
     return false;
 }