Skip to content

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.

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(...)).

// init
const estimate = yield* AWS.IoTWireless.GetPositionEstimate();
// runtime
const { 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))