The two measurement variables acceleration and GPS can be used in a variety of use cases. In terms of logistics, when transporting goods, it can not only be relevant where the goods are right now, but also whether vibrations have occurred on the transport route. For commercial vehicles, the acceleration force can provide information about the use and load of the machines.
Microtronics software engineer Stefan Schweighofer has developed an application that tracks acceleration and GPS for a customer project. The hardware used is the compact tracker rapidM2M T32x. It impresses with its compact dimensions (pocket size) and its versatile fields of application. Optionally, the device can be attached with the fork mount for wall mounting or GoPro accessories. After the requirements were defined, Stefan Schweighofer created the entire application in just 10 hours, from setting up the project to the entire programming.
In addition to ready-made IoT apps such as the acceleration-GPS-tracker, which can be used plug’n’play, it is also possible to program your own apps. You have access to the IoT app “T32x Acceleration GPS Tracker” in the rapidM2M Studio. You can clone the app and adapt it to your needs or create your own IoT app from scratch.
What does the IoT app “T32x Acceleration GPS Tracker” do?
The application tracks acceleration events (+/- 8g) and records them. In addition, the current position is determined for the acceleration events and displayed on a map.
“In this project I used the map display of the IoT platform for the first time. I was surprised how easy it is to use. To use the map display with historical data, the GPS data (latitude and longitude) only must be saved in a corresponding histdata set. With the possibility to colour the points, you can quickly make a nice display using GPS and give the user a good overview”, Stefan Schweighofer reports about his experiences during the project.
With the “T32x Acceleration GPS Tracker” the colours visualise the acceleration force based on the maximum acceleration force within one minute. The maximum acceleration force is calculated based on the acceleration data of the three axes of the accelerometer.
“Calculating the maximum acceleration based on the 3-axes was not a standard everyday task. However, I was able to find out the relevant calculation quickly with an internet search”, Stefan Schweighofer recalls the challenging parts during programming.
In addition to the map display, the IoT platform offers other display options that can be configured with just a few clicks.
Pay attention to power consumption!
Power consumption is always a relevant component of wearable devices. After all, the small devices must get by with small batteries or rechargeable batteries simply because of their size.
Careful programming can save quite a lot of power consumption. To do this, it is necessary to define the requirements precisely in advance and to think through the use case. This is what happened with the IOT app “T32x Acceleration GPS Tracker”.
If an acceleration event occurs, the GPS functionality is switched on. The maximum acceleration force per minute is recorded with the available GPS data. The GPS function is now activated for 15 minutes. With each new acceleration event, this time window is reset.
If no new acceleration data is available within one minute, no data is recorded. However, the GPS function remains active for the time being. Only if no further acceleration event occurs within the 15-minute time window the GPS function will be switched off until a new acceleration event occurs.
Deactivating the GPS function when the device is not being moved has a positive effect on power consumption. You may know this from your smartphone. If location determination is activated, the battery life is significantly reduced. The fact that the data is only recorded and subsequently transmitted to the server when the acceleration or position change is also a resource-saving method of operation.
Try it out!
Log in to the Microtronics Partner Portal and try out the application yourself in the rapidM2M Studio!
The examples are constantly being expanded. Do you have any requests for special examples and sample codes? Please let us know! Until then, look around the rapidM2M Studio and get to know the diverse functionalities for the fast creation of IoT apps.