From af9c990277638832853c102d21fdb17686db6b01 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 7 Oct 2020 01:04:42 -0700 Subject: Print the number of used measurements in sofa-info --- utils/sofa-info.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/sofa-info.cpp b/utils/sofa-info.cpp index 26a2ee3f..6dffef44 100644 --- a/utils/sofa-info.cpp +++ b/utils/sofa-info.cpp @@ -67,7 +67,15 @@ static void PrintCompatibleLayout(const uint m, const float *xyzs) return; } - fprintf(stdout, "Compatible Layout:\n\ndistance = %.3f", fds[0].mDistance); + uint used_elems{0}; + for(size_t fi{0u};fi < fds.size();++fi) + { + for(uint ei{fds[fi].mEvStart};ei < fds[fi].mEvCount;++ei) + used_elems += fds[fi].mAzCounts[ei]; + } + + fprintf(stdout, "Compatible Layout (%u of %u measurements):\n\ndistance = %.3f", used_elems, m, + fds[0].mDistance); for(size_t fi{1u};fi < fds.size();fi++) fprintf(stdout, ", %.3f", fds[fi].mDistance); -- cgit v1.2.3