AWS IOT Core Device Location is a service from AWS that may permit you to estimate the location of your device using third-party solvers and don’t need the use of a GPS device, more about it in the documentation.
- Ensure you have the latest version of Node.js installed on your system.
- Simply upload the
analysis.tago.js
file to your TagoIO account.
- Open a terminal and navigate to the project folder.
- Install dependencies:
npm install
- Run the analysis:
node analysis.js
To build the analysis for deployment:
- Install the TagoIO builder tool globally:
npm install -g @tago-io/builder
- Pack the analysis using the command:
tago-builder src/analysis.ts ./
sequenceDiagram
participant Action as TagoIO Action
participant Analysis as TagoIO Analysis
participant Device as TagoIO Device
participant AWS as AWS
Action ->> Analysis: Trigger Action execute the Analysis
Analysis ->> Device: Get Device to Estimate Position
Device ->> Analysis: Return Device
Analysis ->> Device: Get Last Data Input from Device Bucket
Device ->> Analysis: Return Last Data Input
Analysis ->> AWS: Get Estimated Position from AWS
AWS ->> Analysis: Return Estimated Position with Accuracy
Analysis ->> Analysis: Validate Accuracy
alt Accuracy Valid
Analysis ->> Device: Register Data on Device Bucket
else Accuracy Invalid
Analysis ->> Device: Register Data on Device Bucket Error
end