Simulating position tracking for any IoT thing

0 votes
I'm using the IoT platform 'Thingworx', and I wanted to simulate the position tracking for my 'IoT thing'. Let's say that my car is that IoT thing with two modes: moving & stopped. For my car's moving state, I must simulate its changing latitude and longitude to store the generated coordinates and have them displayed on the Google Map's customized widget. Similarly, the car's stopped state should display its last stopped location.

Now, the following are the questions are what I wanted to ask:

What are the best ways to do this? Like, is there a service or a subscription that I can create and use(the speed values can be the trigger)?

What kind of a code snippet can achieve such a functionality (Samples)?

Could there be disadvantages in using the Google api? Is there a better approach?

How to store changing latitude & longitude values in the variable with a 'Location' datatype?

Thanks In Advance!
Jan 23, 2019 in IoT (Internet of Things) by Bharani
• 4,660 points
860 views

1 answer to this question.

0 votes

A part of the logic to simulate movement is as simple as randomly adding movements to the Latitude/Longitude. So, use a Timer that triggers every second or so and subscribe to that "Timer" event, where you write the code that moves the car.

If you have a property on the Car that you can call "location" of baseType LOCATION with, then it must be set as "logged" on your simulator code for you to update the location property with the new location (in case of any movement since its last location). Also, do set the car Thing's ValueStream property to store the changes in location.

Trying using ThingWorx Marketplace Google Maps extension for showing Location and Paths on Google Maps from the recorded simulation by Setting a location property in Thingworx like this:

me.location = { latittude: latitude_value, longitude: longitude_value, elevation: elevation_value, units: "WGS84" }
answered Jan 23, 2019 by nirvana
• 3,130 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

RPMs for IoT Agents of Backend Device Management GE in FIWARE IoT ecosystem

The RPMs for IDAS component are availaible. ...READ MORE

answered Jul 30, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
819 views
0 votes
1 answer

Azure - What service to use for Arduino data (iot)

That's because the two services do completely ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,056 views
0 votes
1 answer

Send data from cloud to aws iot thing

Your solution is not recommend because there ...READ MORE

answered Aug 2, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,400 views
0 votes
1 answer

What protocols are used for Long Distance Communication in IoT ?

Azure IoT Hub supports three protocols: AMQP, ...READ MORE

answered Sep 11, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,804 views
0 votes
1 answer

Decryption Technique of LORA IOT AES-128

It's not clear what you are using ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,444 views
0 votes
1 answer

How to Uniquely identify Thingworx things?

No, Thing identifier does not account for ...READ MORE

answered Sep 19, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
849 views
0 votes
1 answer

serial communication

You can try downloading the npm and node.js through ...READ MORE

answered Nov 22, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
731 views
0 votes
1 answer

Sample Program for using IoT Hub DM API

That's because the DM additions are placed ...READ MORE

answered Aug 28, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
749 views
0 votes
1 answer

Disk Management Commands in PowerShell for Windows IoT device

All libraries of the full .Net framework ...READ MORE

answered Nov 26, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,094 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP