Lucas Murray ME 305 Portfolio
|
Runs tasks sent by the taskUser file and collects the desired data. More...
Functions | |
def | taskData.taskDataFcn (taskName, period, dFlag, sFlag, Eang, Vang, Cart) |
Collects the data as determined by the taskUser file. More... | |
Runs tasks sent by the taskUser file and collects the desired data.
Acts as a background function file controlling the IMU for the primary user interface so that the user interface does not have to perform data collection directly. It will write the chosen data to a file for 20 seconds that can be used to plot or just saved for later.
Sample Data Plots The platform can gather various different forms of data through this task, including the ball position, the ball velocity, the platform angular position, and the platform angular velocity. Sample plots from the file created by each of these data collections can be seen below. The data collected has no real meaning, it was just us moving the ball and platform around, but it acts as proof that our data collection works.
The State Transition Diagram for taskData can be seen here.
Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Term%20Project/taskData.py
def taskData.taskDataFcn | ( | taskName, | |
period, | |||
dFlag, | |||
sFlag, | |||
Eang, | |||
Vang, | |||
Cart | |||
) |
Collects the data as determined by the taskUser file.
Interfaces with the taskUser file through the use of the shared flag and tuple parameters, reading the chosen data for 20 seconds and writing it to a file unless told to stop by the userTask.
taskName | The name of the task a string |
period | The period of the task in microseconds as an integer |
dFlag | Tuple variable shared between taskUser and taskData for the collect data command |
sFlag | Boolean variable shared between taskUser and taskData for the stop data collection early command |
Eang | Tuple shared between taskIMU, taskUser, taskData, and taskMotor that stores euler angle values |
Vang | Tuple shared between taskIMU, taskUser, taskData, and taskMotor that stores angular velocity values |
Cart | Tuple shared between taskData and taskPanel that contains the touch panel position and velocity data values |