WaiveCar / WaiveScreen

WaiveScreen related stuff.
0 stars 0 forks source link

New sensor storage model #243

Closed kristopolous closed 4 years ago

kristopolous commented 4 years ago

Lat/Lng matters for

Voltage/current/temp matters for

6 DOF matters for

kristopolous commented 4 years ago

perhaps splitting up the sensors table to separate tables is appropriate

kristopolous commented 4 years ago

the tables could have distinctly different meta information. For example,

The 6dof could get the user-id of the current person driving the vehicle and so then we could easily break down responsibility of vehicle operation

The voltage/current/temp could store the software version for instance so we could see if one version is performing differently than another, etc.

The lat/lng could store campaign ids so we could easily figure out historicals from another source if the server had a glitch in storing them

nthobe commented 4 years ago

Proposed new sensor storage model

Store Location data in it's own table.

Sample and store every 5 seconds when using GPS. Every 5 minutes when using Wifi. Trigger on location table could update values in kv table for backwards compatibility.

Store motion sensor data in its own table along with a detected events table.

Sample data at 25Hz and save into db. Analyze data for events (accident, aggressive driving, etc) and save event information into the events table and set 'event_id' for samples before/during/after event. Regularly purge data older than our analysis buffer with null event_id.

Store state of screen in its own table.

Store state on SensorDaemon.py start and any time a value changes.

Store power/temp sensors in their own table.

Sample data every second and store into db.

nthobe commented 4 years ago

New sensor storage model

Store Location data in it's own table.

Sample and store every 5 seconds when using GPS. Every 5 minutes when using Wifi. The latest location is also stored in kv table as before.

Store motion sensor data in CSV file

Sample data at 25Hz and save into CSV file.

Store power/temp sensor data in CSV file

Sample data every 2 seconds and save into CSV file.

nthobe commented 4 years ago

Implemented and merged into master