Package-level declarations

Types

Link copied to clipboard
data class Geofence(val circle: GeofenceCircle?, val box: GeofenceBox?)

A waypoint's geofence region: a circle and/or a box. A point is inside if it is in EITHER shape (OR semantics) — both may be set, either may be null.

Link copied to clipboard
data class GeofenceBox(val south: Double, val west: Double, val north: Double, val east: Double)

An axis-aligned WSEN bounding box in decimal degrees. Bounds are inclusive (matches the Apple reference).

Link copied to clipboard
data class GeofenceCircle(val centerLat: Double, val centerLon: Double, val radiusMeters: Int)

A circular geofence centered on centerLat/centerLon (decimal degrees) with radiusMeters.

Link copied to clipboard

Radius presets for the waypoint editor. The wire value is ALWAYS metres; the UI renders each value locale-aware via DistanceExtensions. 0 means "Off" (no circle). Imperial values are chosen to render as clean feet/mile figures. Do NOT copy Apple's imperial-only table — the selector list is locale-driven by forUnits.

Properties

Link copied to clipboard

True when this waypoint asks receivers to raise crossing notifications.

Functions

Link copied to clipboard

Collapse a raw waypoint-packet list into the set of currently active waypoints, keyed by waypoint id.

Link copied to clipboard
fun Collection<DataPacket>.geofencesToMonitor(myNodeNum: Int?, optedInIds: Set<Int>): List<Waypoint>

The geofences whose crossings THIS device should raise notifications for: waypoints we created (isFromLocal) plus any the user has explicitly opted into (optedInIds). Foreign geofences are excluded by default because waypoints are mesh-broadcast — every receiver stores them, so without this gate everyone in range would alert on the creator's crossings. Only waypoints that actually request crossing notifications (notifiesOnCrossing) survive.

Link copied to clipboard
fun Waypoint.toGeofence(): Geofence?

Decode this waypoint's geofence region, or null when it defines neither a circle nor a box. This is the single source of the proto ×1e-7 → decimal-degree conversion, shared by the alert engine, the map overlays, and the editor — keep all geofence coordinate decoding here so the three consumers cannot drift.