The Encoder/Decoder Software is a crucial component of our innovative project aimed at enhancing vehicle safety through real-time collision prediction and effective payload communication. This repository contains the source code and documentation for the Encoder/Decoder software, which plays a pivotal role in enabling vehicles to share essential information with their surroundings efficiently.
While the Encoder/Decoder Software is not directly involved in the collision prediction process, it serves as a dynamic means of creating compact payloads and facilitating their exchange over various communication methods, including DSRC (Dedicated Short Range Communications) and other alternatives. This software is an essential link in the vehicle's communication network, ensuring seamless sharing of standardized payload structures.
- Payload creation and formatting: The Encoder/Decoder software efficiently structures the data to be shared into compact payloads, ensuring optimal use of available bandwidth.
- Payload sharing: The software facilitates the sharing of payloads over DSRC (ESP) and other communication methods, allowing vehicles to transmit and receive standardized messages.
- Versatile communication: The Encoder/Decoder software supports various communication methods, making it adaptable for integration into diverse transportation ecosystems.
- Simplified integration: The software can be seamlessly integrated into vehicle systems, providing a standardized interface for payload exchange.
- Integrate the Encoder/Decoder software into your vehicle's system (or any other system) to establish a communication link.
- Configure (includes/payloads.h) to define the payload structures you wish to share.
- in "main" function inside "encoder.cpp" configure your code to send this payload on event
- in "on_payload_received" function inside "encoder.cpp" configure your code to receive this paylaod and decode it. you can see examples in "encoder.cpp"
- Monitor the software's performance and ensure smooth payload exchange.
The Encoder/Decoder Software excels in creating and sharing compact messages among vehicles. By using standardized payload structures, vehicles equipped with the Encoder/Decoder software can effortlessly exchange information that is vital for collaborative safety measures. This dynamic payload sharing enhances the overall effectiveness of the collision prediction system.
This project is licensed under the MIT License.
order | name | desciption | data | data types | size | comment |
---|---|---|---|---|---|---|
1 | time_stamp | time stamp | hh:mm:ss.sss | uint, uint, uint, uint16 | 5, 6, 6, 10 bits | get high clock precision |
2 | Location | GPS location | lat, lon | double, double | 8, 8 bytes |
|
3 | heading | degrees relative to 0N | short int | 2 bytes | ||
4 | speed | reading of speedometer/GPS | speed m/s | int | 2 byte | data type may change later for higher presicion if needed |
5 | brakes | reading of brakes sensor | brakes | uint8 | 1 bit | data size depends on existance of other bitfield data |
x | many frame error detection algorithms; already implemented in ESP-NOW data frame; no need to implement in the payload |
By Ahmed Samir | Created 2023-MAY