/** \brief Checks to see if the model can remove the station with the shot direction \return true if it can and false if it can't */ bool cwSurveyChunk::canRemoveStation(int stationIndex, Direction shot) { if(stationCount() <= 2) { return false; } if(stationIndex < 0 || stationIndex >= stationCount()) { return false; } int shotIndex = index(stationIndex, shot); if(shotIndex < 0 || shotIndex >= shotCount()) { return false; } return true; }
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> int goodness(const Magnitude *netmag, int mbcount, double mbval, const Client::Config &config) { if ( !netmag ) return -1; size_t mcount = stationCount(netmag); double mval = netmag->magnitude().value(); if ( mcount < config.minStationMagnitudes ) return 0; // Special Mw(mB) criterion if (isMw(netmag)) { if (mcount < config.minMwCount) return 0; if (mcount < config.mbOverMwCount) { if ( (mval+mbval)/2 < config.mbOverMwValue) return 0; if ( (int)mcount<mbcount/2 ) return 0; } } return magnitudePriority(netmag->type(), config); }