Skip to content

A system for tracking and analyzing electric vehicle driving with multiple servers on a network socket and RESTful web services.

Notifications You must be signed in to change notification settings

CroAnna/telemetry-tickets-radar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telemetry Ticketing System Simulator

Electric Vehicle Telemetry: A system for tracking and analyzing electric vehicle driving with multiple servers on a network socket and RESTful web services.

Firefly an electric car that drives fast and passes police camera radar at night and policeman 38885(1)

Documentation - table of contents

Demo video

Watch the video: 👇

Technologies

  • Java: General-purpose programming language known for its portability and performance.
  • Maven: Build automation that simplifies the build process and manages project dependencies.
  • Payara: Open-source Java application server platform based on GlassFish.
  • Docker: Platform for developing, shipping, and running applications in containers.
  • H2 database: Lightweight and fast relational database management system written in Java.
  • HSQL database: Feature-rich relational database management system suitable for embedded deployments.

Project description

The system is designed to simulate driving electric vehicles in a city using real data stored in CSV files. It starts by specifying a file name and then reads and processes all the data. This information is sent to radar systems located throughout the city, which are positioned based on GPS coordinates. When a vehicle enters the range of an active radar, the system checks if it is speeding. If the vehicle exceeds the speed limit defined by the radar (e.g., driving faster than 40 km/h for more than 7 seconds without any abnormal behavior), the radar issues a speeding ticket and stores the details in a database.

The data file for electric vehicle driving contains rows of data, with the following column names in the first row: Milliseconds since Epoch, Speed, Watt, Ampere, Altitude, GPS Speed, Vehicle Body Temperature, Battery Percentage, Battery Voltage, Battery Capacity, Battery Temperature, Remaining Mileage, Total Mileage, Latitude, and Longitude.

image

Features:

  • Reading driving data (multithreaded):
    • Data is recorded at very short intervals (less than 1 second).
    • Each row contains GPS coordinates, speed, time, and other vehicle parameters.
  • Simulating data transmission:
    • Data from the CSV file is treated as "live" data.
    • Each row is sent one by one to the telemetry and speed control system.
    • The time difference between rows is multiplied by a time correction factor.
  • Speed measurement radars:
    • Placed at different locations with specified GPS coordinates.
    • Radars process data if the vehicle is within their range.
    • They check if the speed exceeds the allowed limit and for how long.
  • Recording violations:
    • If the vehicle exceeds the speed limit, the radar records the data.
    • If the overspeeding lasts longer than the allowed time, new data is recorded with a "false" status.
    • If the overspeeding persists, a speeding ticket is generated.
  • Communication between servers:
    • RadarServer:
      • Registers with the RegistrationServer.
      • Opens a network socket and operates in a multithreaded mode.
      • Creates virtual threads for each client and processes commands.
    • PenaltyServer:
      • Opens a network socket and operates in a single-threaded mode.
      • Stores penalty data and retrieves penalties/statistics as needed.
    • VehicleServer:
      • Opens a network socket and operates in a multithreaded mode.
      • Creates virtual threads for each client and checks if the vehicle is within a radar's range.
      • Sends commands to the RadarServer.
  • VehicleSimulator:
    • Connects to the VehicleServer.
    • Reads the data file row by row.
    • Prepares data for commands and sends them asynchronously without waiting for a response.
  • Docker Containerization:
    • Everything is containerized using Docker.
    • Deployment is streamlined with Docker Compose (`docker-compose up` command).
  • Database Usage:
    • Utilizes two databases for storing various data.
  • Multithreading:
    • Uses multithreading extensively for efficient data processing and communication.
  • User Interface:
    • Powered by Payara.
    • Allows visualization of simulation data stored in database, active radars, vehicle statuses, data filtering and much more.

Architecture

System scheme:

image image

System installation architecture and methods of RESTful web services:

image

More details

Find out more about this project in project requirements file.

About

A system for tracking and analyzing electric vehicle driving with multiple servers on a network socket and RESTful web services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages