Database - MSXIV
Project Summary
We intend to store all of the data that passes through each of our models for future reference, as well as checking that our models are working as expected. This data should be stored in all implementations of the optimization suite to provide records for post-race analysis and validate our model results.
Goals
Log all data that passes through our models
Have an accessible database that can be queried during the race to validate data
Store all data over the course of the race for post-race analysis
Inputs
Every model with an input and output should feed into a database table. This includes:
Model | Data |
---|---|
Optimization | Velocity profile |
Dynamics | Power draw required for motors |
State of Charge | Auxloss, current state of charge, battery power level (calculated from voltage/current) |
Solar | Expected solar irradiance, expected energy gained |
Weather | Temperature, wind, precipitation, expected weather |
Routemodel | Latitude/Longitude coordinates |
Average speed | Average speed to reach minimum required speed |
Telemetry |
|
Investigation
In summary, this document proposes the use of MySQL.
Since SQLite is an embedded system, it does not provide direct network access to its data so only the machine with which it is running on has easy read/write access. SQLite may be good for testing purposes, however.
Compared to using plain CSVs, a database provides greater structure, easy-viewing, and concurrency.
MySQL is a client/server database, so a server is provided and the database can handle multiple users.
Implementation
All of our primarily models in the optimization suite will have to be connected toe the database.
Given the current implementation of 2 copies of the optimization algorithms running, there will be 2 instances of the database. This will be subject to change depending on the implementation the strategy team decides on.
Database outline from Umar (As of Feb 2021, need to download to see table fields):