Skip to content

magic890/vehicle-routing-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Routing Challenge

A school is trying to deploy bus routing software to centralize student transportation records in a central database. To help school with our technical skills we paired the routing program with in-bus GPS system for managing bus fleet. We will be using data collection to allow us to lower daily costs, boost safety and potentially even increase state funding returns.

Your mission is to collect incoming bus dongle messages in JSON format from the Kafka queue and fulfill Functional Requirements by posting rest based message to a service called Trips in a given Output JSON format.

Kafka Input Message (JSON)

{
  "dongleId"               : [string] UUID: Unique device identifier,
  "driverId"               : [string] UUID: Unique agent identifier,
  "busId"                  : [string] UUID Unique vehicle identifier,
  "driverPhoneId"          : [string] UUID: Phone identifier, // optional
  "eventTime"              : [string] Event time and date in ISO 8601,
  "lat"                    : [float] latitude,
  "long"                   : [float] longitude,
  "eventId"                : [string] UUID: Unique identifier of this event,
  "eventType"              : [string] Event type. One of: 'location',
  "speed"                  : [float] km/h, // optional
  "heading"                : [float] bearing in radians, // optional
  "fuel"                   : [float] fuel percentage, // optional
  "mileage"                : [double] Current mileage reading in km, // optional
  "battery"                : [float] Resting battery voltage, // optional
  "gForce"                 : [float] g, // optional
  "speedChange"            : [float] km/h // optional 
}

Functional Requirements

  1. Count total hard brakes in a trip
  2. Count total speeding instances and speed at that time
  3. Keep track of all bus stops locations
  4. Fuel consumption in a trip
  5. Distance covered in a trip

Output (JSON)

{
  "dongleId"               : [string] UUID: Unique device identifier,
  "driverId"               : [string] UUID: Unique agent identifier,
  "busId"                  : [string] UUID Unique vehicle identifier,
  "driverPhoneId"          : [string] UUID: Phone identifier, // optional
  "tripStartTime"          : [string] Trip start time and date in ISO 8601,
  "tripEndTime"            : [string] Trip end time and date in ISO 8601,
  "hardBrakes"             : [long] Total hard brakes,
  "speeding"               : [{
                                "time"    : [string] Speeding time and date in ISO 8601,
                                "speed"   : [float] km/h
                             }],
  "busStops"               : [{
                                "lat"     : [float] latitude,
                                "long"    : [float] longitude
                             }],
  "fuelConsumed"           : [float] fuel percentage // optional
}

About

Analyse real-time vehicle trip data providing useful metrics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages