GetPositionEstimate
Source:
src/AWS/IoTWireless/GetPositionEstimate.ts
Runtime binding for iotwireless:GetPositionEstimate — resolve an
estimated position (as a GeoJSON payload stream) from raw measurement
data — WiFi access points, cell towers, GNSS scans, or an IP address —
using third-party solvers, from a deployed Lambda or Task. Account-level:
it is not tied to any registered device.
Estimating a Position
Section titled “Estimating a Position”Provide the GetPositionEstimateHttp implementation layer on the
Function effect, bind the capability in the init phase, then call the
returned client at runtime. The GeoJsonPayload is a byte Stream —
decode it with Stream.mkString(Stream.decodeText(...)).
// initconst estimate = yield* AWS.IoTWireless.GetPositionEstimate();
// runtimeconst { GeoJsonPayload } = yield* estimate({ WiFiAccessPoints: [ { MacAddress: "A0:EC:F9:1E:32:C1", Rss: -66 }, { MacAddress: "A0:EC:F9:15:72:5E", Rss: -72 }, ],});// on the Function effect:// .pipe(Effect.provide(AWS.IoTWireless.GetPositionEstimateHttp))