UPDATED: Fixed a bug in the ESI calculation and rebuild the application with a simpler UI. PS… It was hot out this morning too.
It’s a hot summer day in Halifax Nova Scotia. It’s the eve of Canada Day and my son and his girlfriend tried to go out for a run a couple of hours ago. They thought it would be ok as it was 28 °C or so outside. What they failed to take into consideration was that it was mid-day with bright sunshine and fairly humid. No surprise… they came back pretty quick and went for a swim instead.
A bit of a coincidence really… I have been working today on building a small demo/prototype of an IoT application that would display the Environmental Stress Index or ESI on my iPhone. I finished it a bit after they came back.
The ESI is calculated using the ambient temperature (Ta in °C), relative humidity (RH in %), and solar radiation (SR in W/m2). The RSI has been shown to be a valid approximation of the Wet Bulb Temperature used to measure how hot it feels.
I used my Texas Instrument SensorTag which is equipped with temperature, humidity, and light sensors. Now, the light sensor does not measure the solar radiation but light in Lux. However, for sunshine, there is an approximate conversion of 0.0079 W/m2 per Lux.
Using the two following SCN Blogs for inspiration, I built a very simple application on my HCP Trial Account:
- Try out HCP IoT Services with iOS Devices and Sensor Tags to push my sensor data to HCP IoT services
- Visualizing iPhone Sensor Data with SAPUI5 to create the SAPUI5 app.
The US Army has published in the Commanders’, Senior NCOs’, and Instructors’ Guide to Risk Management of Heat Casualties tables to categorize heat.
I used the same categorization to provide a color code flag to HIS.
The image on the left shows the ESI in the sun while the other one in the shade.
If I would have had this application ready before they went out… I could have advised them to skip the run and go straight into the pool as the ESI was in category 2 – green! While seemingly ok… we have had a cool summer and spring so far. They were not acclimatized to this heat yet.
The moral of the story is that in a couple of hours I built a simple application that combines sensor data published on the HANA Cloud Platform that can provide vital advice.
It’s clearly hot out here!
Have a great Canada Day! And to my American friends… a great 4th of July.