Loading...
Searching...
No Matches
ear_fusion.c
Go to the documentation of this file.
233 double weight = pow(EAR_DB_LOG_BASE, (points[index].level - max_level) / EAR_POWER_DB_PER_DECADE);
235 weight *= 1.0 + fmin(points[index].source->trend_db, EAR_TREND_BONUS_LIMIT_DB) / EAR_TREND_BONUS_SCALE_DB;
271 double level0 = max_level + EAR_DISTANCE_DB_PER_DECADE * log10(fmax(peak_height, EAR_REFERENCE_DISTANCE_M));
285 double w = fabs(residual) > EAR_FIT_RESIDUAL_LIMIT_DB ? EAR_FIT_RESIDUAL_LIMIT_DB / fabs(residual) : 1.0;
320 double step = sqrt(delta[EAR_FIT_EAST] * delta[EAR_FIT_EAST] + delta[EAR_FIT_NORTH] * delta[EAR_FIT_NORTH]);
327 level0 += fmax(-EAR_FIT_LEVEL_STEP_LIMIT_DB, fmin(EAR_FIT_LEVEL_STEP_LIMIT_DB, delta[EAR_FIT_SOURCE_LEVEL]));
340 double prominence = fmin(1.0, fmax(0.0, (max_level - median_level) / EAR_CONFIDENCE_PROMINENCE_SCALE_DB));
static void sift_down(double *values, size_t root, size_t count)
Restore a zero-based binary max heap without allocating scratch memory.
Definition ear_fusion.c:77
static void sort_double(double *values, size_t count)
In-place heapsort keeps worst-case workspace bounded for a full survey.
Definition ear_fusion.c:92
#define EAR_CONFIDENCE_PROMINENCE_SCALE_DB
Definition ear_fusion.c:72
int calculated_loudestspot(const struct ear_sample *samples, size_t count, struct ear_loudest_spot *result)
Estimate a ground source from relative loudness along a survey track.
Definition ear_fusion.c:129
#define EAR_CONFIDENCE_CONCENTRATION_WEIGHT
Definition ear_fusion.c:70
static double median_of(double *values, size_t count)
Median of nonempty scratch values; sorting intentionally destroys their order.
Definition ear_fusion.c:104
Sensor-independent acoustic samples and ground-source estimates.
Estimated ground source, not a surveyed target or guaranteed alarm detection.
Definition earcam_core.h:37
One audio window associated with microphone position and provenance.
Definition earcam_core.h:55
Solver-local horizontal coordinates plus each window's own squared height.
Definition ear_fusion.c:114