Team 2 Code Update

22 views
Skip to first unread message

Michelle Ngoc Luu

unread,
Apr 25, 2012, 10:40:10 PM4/25/12
to uh-elet-...@googlegroups.com
Team 2 Progress: :D
Team 2 Update 1C++_Project.zip

Michelle Ngoc Luu

unread,
Apr 25, 2012, 10:44:56 PM4/25/12
to uh-elet-...@googlegroups.com

henry.veltmanjr

unread,
Apr 25, 2012, 10:56:20 PM4/25/12
to uh-elet-...@googlegroups.com
Looks Great!... Nice work!

Michelle Ngoc Luu

unread,
Apr 26, 2012, 2:01:17 PM4/26/12
to uh-elet-...@googlegroups.com
Team 2 Code with comments:

int CVICALLBACK plotFrequency (int panel, int control, int event,   //plot frequency and power function
void *callbackData, int eventData1, int eventData2)
{
double tempMinFrequency;
ssize_t maxFrequencyIndex,temp;
double maxPowerValue;

int FFTplotHandle;
ssize_t inputSize  =    mSize ;
double *Measurement_fft_output= (double *)malloc (inputSize * sizeof(double));    //the declaration for the size of the holding array for the data collected.
if (inputSize > 0  )   //if function for input size larger than 0.
{
}

switch (event) //switch case for the data obtained to display on the graph.
{
case EVENT_COMMIT:
  Copy1D (Measurement_Window_Data, inputSize, Measurement_fft_output  );   
  //function to copy the data collected from Measurement_Window_Data into the array Measurement_fft_output
  
  Spectrum (Measurement_fft_output, inputSize);  //function to calculate the Power of the data obtained
  int half =(int)(inputSize/2)+1;  
Subset1D (Measurement_fft_output, inputSize, 0, half, Measurement_fft_output);
    //function Subset1D to not duplicate the result data when plotting on the graph
 
MaxMin1D (Measurement_fft_output, inputSize, &maxPowerValue, &maxFrequencyIndex, &tempMinFrequency, &temp);
//function to find the max power of the data obtained on the graph.  
 
SetCtrlVal (panelHandle, PANEL_MaxFrequencyBox, maxFrequencyIndex);
//function to display the Max Frequency value
SetCtrlVal (panelHandle, PANEL_MaxPower, maxPowerValue);
//function to display the Max Power value
 
  RefreshGraph (panelHandle, PANEL_PowerSpectrum);
  //function to refresh the graph to display new graph from the new chosen data
  //it removes any plots deleted using DeleteGraphPlot
  
  FFTplotHandle = PlotWaveform (panelHandle, PANEL_PowerSpectrum, Measurement_fft_output, half, VAL_DOUBLE, 1.0, 0.0, 0.0, 1.0,
VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1, VAL_RED);
  //platform to display the graph 
  
 
  SetGraphCursorIndex(panelHandle, PANEL_PowerSpectrum,1,FFTplotHandle,maxFrequencyIndex);
   //function to display the cursor to visualize the max power value on the graph
  
  DeleteGraphPlot (panelHandle, PANEL_PowerSpectrum, FFTplotHandle, VAL_DELAYED_DRAW);
//function to delete the old graph.
  
  
break;
}  

return 0;
}


On Wednesday, April 25, 2012 9:40:10 PM UTC-5, Michelle Ngoc Luu wrote:
Team 2 Progress: :D
On Wednesday, April 25, 2012 9:40:10 PM UTC-5, Michelle Ngoc Luu wrote:

keiiy

unread,
Apr 27, 2012, 12:27:01 AM4/27/12
to uh-elet-...@googlegroups.com
I've created a flowchart for our part of the project. I think I might need to fix the order depending on what changes you made after I left. Let me know what I should add/edit. I'm planning on doing a rough draft for the final presentation that we will be giving on thursday. I'll be working on that tomorrow after work.

-Kelly
group 2 flowchart.pptx

mini-Lord vader

unread,
Apr 28, 2012, 8:37:31 PM4/28/12
to uh-elet-...@googlegroups.com
it looks great. 
Reply all
Reply to author
Forward
0 new messages