IOT on Wheels Design Challenge - Smart Drive - Project Index
Need For Speed
After some testing, I've realized that I need to know speed and heading as well. Speed is required in context of fall detection. Free Fall detection algorithm, which leverages LSM6DSL sensor data, is optimized for walking and not for driving (bicycle). So to reduce false positives I need to correlate speed and LSM6DSL sensor data to accurately predict falls.
Need For Direction
Road participants moving on the same road in the same direction are experiencing similar obstacles, which may be different from obstacles experienced by drivers moving in the opposite direction. So it is important to capture heading of motion.
Navigation Position Velocity Time Solution
Until now I was using only two messages from UBX protocol NAV-POSLLH and NAV-STATUS in my project.
NAV-POSLLH is Description Geodetic Position Solution message and provides longitude and latitude information in a small 28-bytes payload, where NAV-STATUS is Receiver Navigation Status message, which describes how valid is information just by using 16 bytes of payload.
After some research I've decided to use NAV-PVT message. NAV-PVT is Navigation Position Velocity Time Solution message. It provides in one message the same information as NAV-POSLLH and NAV-STATUS, but in addition it gives ground speed, heading, accuracy of readings among other interesting data. It comes with additional cost so. The message payload size is 92 bytes, which is significantly bigger then the other two messages.
I've changed my GPS receiver configuration code, by only enabling NAV-PVT message.
// Disable UBX 0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0xB9, //NAV-POSLLH off 0xB5,0x62,0x06,0x01,08,0x00,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0xC0, //NAV-STATUS off // Enable UBX 0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x07,0x00,0x01,0x00,0x00,0x00,0x00,0x18,0xE1, //NAV-PVT on
As well I've added code to parse NAV-PVT message.
Next Steps
I believe at this point I have all required sensor readings on Nucleo board:. There are still several tasks left:
Additional modifications on server side:
- Modify server components to store data provided over MQTT about road conditions/dangerous situations.
- Add server component to serve data about danger related to a particular geographical region/road.
Additional modifications on Nucleo board:
- Add code to retrieve information on danger from the server.
- Add code to queue off-line messages and road conditions into STM32L76RG flash memory.
- Add led to notify driver about potential danger in proximity.