Interface with the local tempory cache and long term recording
Members
(inner, constant) CACHE
(inner, constant) DATA_RECORDING
(inner, constant) RECORDING_EVENT
(inner, constant) STORED_DATA
Methods
(static) archiveData(name)
Creates archive file with name or id
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the file to export |
(static) createCache()
Creates a cache based off of database.JSON
(static) findRenderable() → {Object}
Finds subsystems in database that are renderable returns that list
Returns:
- List of renderable sensors
- Type
- Object
(static) normalizePacket(input)
Read and remove anything from the packet that is not data
Any calculations that need to be done before prior to RECORDING the data should be done here
[NormalizePacket] -> Calcuations -> UpdateData
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | The packet to process |
(inner) ambientToGauge(input) → {Object}
Converts ambient pressure reading to gauge pressure readings
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | The input packet |
Returns:
- The modified packet
- Type
- Object
(inner) calculate(input)
Any Calcuations that need to be done prior to RECORDING should be done here
NormalizePacket -> [Calculations] -> UpdateData
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Packet to process |
(inner) createID()
Creates the ID for the file
(inner) createJSON(name)
Writes export to file
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the export file |
(inner) getAbsoluteSpeed(input) → {Object}
Modifies packet to invert speed of motor
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Input packet |
Returns:
- THe modified packet
- Type
- Object
(inner) getLVSOC(input) → {Object}
Modifies packet to fill LVSOC flag
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | The input packet |
Returns:
- The modified packet
- Type
- Object
(inner) getMaxMotorControllerTemp(input) → {Object}
Modifies packet to fill maxControllerTemp flag
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Input Packet |
Returns:
The modified packet
- Type
- Object
(inner) getPackPowerRemaining(input) → {Object}
Modifies packet to fill packPowerRemaining flag
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Input packet |
Returns:
- The modified packet
- Type
- Object
(inner) getPowerConsumed(input) → {Object}
Modifies packet to fill packPowerConsumed flag
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | Input Packet |
Returns:
- The Modified packet
- Type
- Object
(inner) interpolateLVSOC(x) → {Number}
Calculates the LV batteries State of Charge
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | Voltage of LV Battery |
Returns:
- The pack's state of charge
- Type
- Number
(inner) updateData(dataIn, location)
Sort through the data and append the new values to their respective
arrays in cache.js
NormalizePacket -> Calculations -> [UpdateData]
Parameters:
Name | Type | Description |
---|---|---|
dataIn |
Object | The packet to process |
location |
String | The location you're writing to |