---
# System prepended metadata

title: Legacy System Specification
tags: [legacy system]

---

###### tags: `legacy system`

# Legacy System Specification

## Implement New Driver Score

- [Risk, Eco Score公式](https://docs.google.com/spreadsheets/d/1gEdRHya76u229_nLJs9unhpNqw8y8gqPCqVWZjdKIks/edit?usp=sharing)

### Schema
- vehicle-status
- driver_records

### Migrate
#### Drivio 
- [x] MQTT Client
- [x] Implement Raw Data Parser
    - [x] Periodic events
        - [x] L1
        - [x] L2
        - [x] L3
    - [x] Simple events 
        - [x] vehicle_idle
        - [x] speeding
        - [x] harsh_rpm
        - [x] harsh_brake
        - [x] harsh_turn
        - [x] frequent_harsh
        - [x] eco_start
        - [x] eco_stop
        - [x] non_eco_start
        - [x] non_eco_stop
- [x] Add new field 'driver' in vehicle_status
    - [x] Maintain/Handle the raw data from the above events 
- [x] Implement RESTful API interface
    - [x] /tripEnd (for DMS to call)
- [x] Package driver when trip end (receive from DMS and set default timze zone as GMT+8)
    - [x] driver_daily_records
    - [x] driver_weekly_records
    - [x] driver_monthly_records
    
#### API GW
- [ ] Calculate Risk, Eco Score
    - query documents by dateTime in "driver_records" collection.
    - calculated daily, weekly, monthly score

---

### Hybird 
#### DMS
- [ ] Implement Raw Data parser
    - [ ] L3
- [ ] Add new field 'driver' in vehicle_status
    - [ ] Maintain/Handle the raw data from the above events 
- [ ] Package driver when trip end (receive from DMS and set default timze zone as GMT+8)
    - [ ] driver_daily_records
    - [ ] driver_weekly_records
    - [ ] driver_monthly_records

#### API GW
- [ ] Calculate Risk, Eco Score
    - query documents by dateTime in "driver_records" collection.
    - calculated daily, weekly, monthly score

---