Adventure Labs Logo
Scout Docs

Connectivity

Table for recording network connectivity metrics and location data from devices

Column NameData TypeConstraints
idbigintNOT NULL
session_idbigint
inserted_attimestamp with time zoneDEFAULT now() NOT NULL
timestamp_starttimestamp with time zoneNOT NULL
signaldouble precisionNOT NULL
noisedouble precisionNOT NULL
altitudedouble precisionNOT NULL
headingdouble precisionNOT NULL
locationextensions.geographyNOT NULL
h14_indextextNOT NULL
h13_indextextNOT NULL
h12_indextextNOT NULL
h11_indextextNOT NULL
battery_percentagereal
battery_voltsreal
secondary_battery_percentagereal
secondary_battery_voltsreal
device_idbigint
frequency_hzreal
bandwidth_hzreal
associated_stationtext
modetext
frame_center_locationextensions.geography(Point, 4326)
frame_center_altitudedouble precision
frame_center_h14_indextext
frame_center_h13_indextext
frame_center_h12_indextext
frame_center_h11_indextext
base_device_onlineboolean

frame_center_location and frame_center_altitude describe the center of the camera frame, while location and altitude continue to describe the primary device. frame_center_h14_index..frame_center_h11_index are the producer-set H3 cells of the frame center, mirroring h14_index..h11_index for location. base_device_online is nullable so older or unavailable telemetry is distinguishable from an explicit offline state.

Security Policies (RLS)

RLS enabled. Herd scope: Herd from device_id or session's device (CASE in policy).

Operationhas_herd_ability ability keyOther paths
SELECTsessions.readDevice/session API key paths; approved gateway
INSERTsessions.writeDevice/session API key paths; approved gateway
UPDATEsessions.writeDevice/session API key paths; approved gateway
DELETEsessions.writeDevice/session API key paths

Platform superadmin: FOR ALL bypass where defined.

get_herd_connectivity_heatmap(herd_id, params) requires sessions.read in the herd or platform superadmin. get_connectivity_with_coordinates_by_device_and_timestamp(device_id, timestamp) requires sessions.read in the device's herd, the device's own API key (or its approved gateway), or platform superadmin.

On this page