This commit is contained in:
kradchen
2023-05-31 14:02:24 +08:00
4 changed files with 78 additions and 25 deletions

View File

@@ -66,21 +66,24 @@ namespace Recon {
return transData;
}
Aurora::Matrix checkTofDetections(Aurora::Matrix &aVTofValues, const Aurora::Matrix &aVDists,
checkTofDetectionsResult checkTofDetections(const Aurora::Matrix &aVTofValues, const Aurora::Matrix &aVDists,
const Aurora::Matrix &aVSosRef,
double minSpeedOfSound,
double maxSpeedOfSound)
{
checkTofDetectionsResult result;
auto sosValues = aVDists / (aVTofValues + (aVDists / aVSosRef));
auto valid = (sosValues < maxSpeedOfSound) * (sosValues > minSpeedOfSound);
result.valid = valid;
auto minSpeedOfSoundM = minSpeedOfSound+ zeros(sosValues.getDimSize(0),sosValues.getDimSize(1),sosValues.getDimSize(2));
auto maxSpeedOfSoundM = maxSpeedOfSound+zeros(sosValues.getDimSize(0),sosValues.getDimSize(1),sosValues.getDimSize(2));
sosValues = max(minSpeedOfSoundM, sosValues);
sosValues = min(maxSpeedOfSoundM, sosValues);
aVTofValues = (aVDists / sosValues) - (aVDists / aVSosRef);
return sosValues;
Matrix tofValues = (aVDists / sosValues) - (aVDists / aVSosRef);
result.tofValues = tofValues;
return result;
}
Aurora::Matrix filterTransmissionData(const Aurora::Matrix &aVslBlock,

View File

@@ -17,7 +17,13 @@ filterTransmissionAngle(double aAngleLowerLimit, double aAngleUpperLimit,
const Aurora::Matrix &aMSenderNormalBlock,
const Aurora::Matrix &aMReceiverNormalBlock);
Aurora::Matrix checkTofDetections(Aurora::Matrix &aVTofValues,
struct checkTofDetectionsResult
{
Aurora::Matrix tofValues;
Aurora::Matrix valid;
};
checkTofDetectionsResult checkTofDetections(const Aurora::Matrix &aVTofValues,
const Aurora::Matrix &aVDists,
const Aurora::Matrix &aVSosRef,
double minSpeedOfSound,