Data-Interfacing

Interface with the local tempory cache and long term recording
Source:
Author:
  • Eric Udlis, Zander Huang

Members

(inner, constant) CACHE

Source:

(inner, constant) DATA_RECORDING

Source:

(inner, constant) RECORDING_EVENT

Source:

(inner, constant) STORED_DATA

Source:

Methods

(static) archiveData(name)

Source:
Creates archive file with name or id
Parameters:
Name Type Description
name String The name of the file to export

(static) createCache()

Source:
Creates a cache based off of database.JSON

(static) findRenderable() → {Object}

Source:
Finds subsystems in database that are renderable returns that list
Returns:
- List of renderable sensors
Type
Object

(static) normalizePacket(input)

Source:
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}

Source:
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)

Source:
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()

Source:
Creates the ID for the file

(inner) createJSON(name)

Source:
Writes export to file
Parameters:
Name Type Description
name String The name of the export file

(inner) getAbsoluteSpeed(input) → {Object}

Source:
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}

Source:
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}

Source:
Modifies packet to fill maxControllerTemp flag
Parameters:
Name Type Description
input Object Input Packet
Returns:
The modified packet
Type
Object

(inner) getPackPowerRemaining(input) → {Object}

Source:
Modifies packet to fill packPowerRemaining flag
Parameters:
Name Type Description
input Object Input packet
Returns:
- The modified packet
Type
Object

(inner) getPowerConsumed(input) → {Object}

Source:
Modifies packet to fill packPowerConsumed flag
Parameters:
Name Type Description
input Object Input Packet
Returns:
- The Modified packet
Type
Object

(inner) interpolateLVSOC(x) → {Number}

Source:
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)

Source:
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