Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
ear_heatmap.h File Reference

Render geotagged acoustic measurements into north-up JPEG heatmaps. More...

#include <stdbool.h>
#include <stddef.h>
#include "earcam_core.h"
Include dependency graph for ear_heatmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ear_heatmap_georef
 Validated geographic placement metadata shared by heatmap consumers. More...

Macros

#define EAR_HEATMAP_NO_DATA_RED   18U
#define EAR_HEATMAP_NO_DATA_GREEN   18U
#define EAR_HEATMAP_NO_DATA_BLUE   24U

Functions

int ear_heatmap_read_georef (const char *filename, struct ear_heatmap_georef *georef)
 Read the georeference sidecar emitted by the heatmap renderer.
int ear_heatmap_write (const char *filename, const struct ear_sample *samples, size_t count, const struct ear_loudest_spot *spot)
 Write a decorated north-up JPEG of relative measured acoustic intensity.
int ear_heatmap_write_field (const char *filename, const struct ear_sample *samples, size_t count, const struct ear_loudest_spot *spot)
 Write the same field without track dots, source marker or scale bar.

Detailed Description

Render geotagged acoustic measurements into north-up JPEG heatmaps.

Definition in file ear_heatmap.h.

Macro Definition Documentation

◆ EAR_HEATMAP_NO_DATA_BLUE

#define EAR_HEATMAP_NO_DATA_BLUE   24U

Blue channel identifying uncovered field pixels.

Definition at line 31 of file ear_heatmap.h.

◆ EAR_HEATMAP_NO_DATA_GREEN

#define EAR_HEATMAP_NO_DATA_GREEN   18U

Green channel identifying uncovered field pixels.

Definition at line 30 of file ear_heatmap.h.

◆ EAR_HEATMAP_NO_DATA_RED

#define EAR_HEATMAP_NO_DATA_RED   18U

Red channel identifying uncovered field pixels.

Definition at line 29 of file ear_heatmap.h.

Function Documentation

◆ ear_heatmap_read_georef()

int ear_heatmap_read_georef ( const char * filename,
struct ear_heatmap_georef * georef )

Read the georeference sidecar emitted by the heatmap renderer.

Parameters
filenamePath to the .geo sidecar.
georefReceives validated dimensions, projection and optional spot.
Returns
0 on success; -1 for invalid arguments, malformed data or I/O error.

Required dimensions, scale and edge/origin coordinates are validated before publication to the caller; partial parses never replace its struct. Duplicate fields, oversized lines and incomplete optional spot pairs fail.

Definition at line 642 of file ear_heatmap.c.

◆ ear_heatmap_write()

int ear_heatmap_write ( const char * filename,
const struct ear_sample * samples,
size_t count,
const struct ear_loudest_spot * spot )

Write a decorated north-up JPEG of relative measured acoustic intensity.

Parameters
filenameOutput path; an adjacent .geo sidecar is attempted after JPEG success.
samplesBorrowed, immutable geotagged windows; not retained after the call.
countWindow count; at least three usable finite, unclipped windows are required.
spotOptional borrowed estimate; only valid estimates receive a marker.
Returns
0 for a successfully written JPEG, -1 for insufficient data or file/codec failure.

Track dots, an estimated-source marker and a scale bar aid interpretation. Calls serialize on bounded shared scratch storage. Grid cells are roughly AGL/4; bilinear upsampling adds visual smoothness, not measurement resolution.

Warning
Sidecar write failure does not change the return status. Neither the smoothed field nor the marker demonstrates localization accuracy or alarm presence.

Definition at line 574 of file ear_heatmap.c.

◆ ear_heatmap_write_field()

int ear_heatmap_write_field ( const char * filename,
const struct ear_sample * samples,
size_t count,
const struct ear_loudest_spot * spot )

Write the same field without track dots, source marker or scale bar.

Parameters
filenameJPEG path; a best-effort .geo sidecar supplies overlay placement.
samplesBorrowed immutable acoustic windows.
countNumber of supplied windows, with the same usable-data gate as ear_heatmap_write().
spotOptional estimate retained in sidecar metadata, not drawn into pixels.
Returns
0 for JPEG success, -1 for insufficient usable data or file/codec failure.

Use the same interpolation and shared workspace as the decorated renderer, keeping annotation pixels out of the field used for overlays.

See also
ear_heatmap_write for locking, resolution and sidecar-status caveats.

Definition at line 580 of file ear_heatmap.c.