Graphs and Adding the Data to Excel

The time has come to assess whether or not I am a suitable pilot for the project. After collecting some results involving concentratiing for a little while and meditating a little while, I gathered these preliminary results and put them into graph form. The results were as follows

The first is myself

Untitled2

This is my willing test subject

Untitled

 

The results are pretty inconclusive and it’s been decided that I will spend 3 minutes meditating and 3 concentrating, and do the same with my test subject (to see how I compare)

The main aspect that was offputting at first was the idea that I have to type all of this data into the cells manually.

After some further research into the matter I discovered that you can import data from notepad straight into excel. The problem is that the format of my text file is not suitable as is, it displays as follows

Meditation value: 43 and the time is 18:25:18
Attention Span: 54 and the time is 18:25:19
Meditation value: 74 and the time is 18:25:19
Attention Span: 57 and the time is 18:25:20
Meditation value: 97 and the time is 18:25:20
Attention Span: 53 and the time is 18:25:21
Meditation value: 69 and the time is 18:25:21

and excel reads the descending values into one column which I do not want. A rewrite of my code should fix this so it displays as

Meditation value: 43 while Attention Span: 54 and the time is 18:25:18

so that I can read them straight in. I am also looking to use openGL to make c++ render my results in real time into a linegraph, but this is proving a difficult task.

 

More to follow

 

 

Situational Update: LEAP Motion Arrives

The project can finally continue to with exciting pace. The LEAP motion device is now in my position and ready to be used to help fly the AR Drone. It is an infra red device that can read human gestures and turn them into meaningful data – in this case commands for the copter.

20140320_144640

In terms of its size it is actually smaller than I expected, and surprisingly easy to set  up. More on the development of thise to follow

20140320_144744

Coding Nightmares and Coding Solutions!

For a long time a hitch in my program had been trying to get it to output my attention and meditation span into a text file.

These are read in from the mindwave device shown below.

20140320_144533

The problem was that I was trying to record the time with my results but in the text file where the results were stored I was recieving  this:

Attention Span:41 and the time is °ø

Attention Span:37 and the time is °ø

Attention Span:41 and the time is °ø A

ttention Span:43 and the time is XöR

and so on.

After a few hours thinking and dispairing over the issue at hand some research eventually yielded and answer. The ‘fprintf’ function I was using to print the notepad file is a very OLD function leftover from Visual C but still works in Visual C++. The problem is that the time I was passing to the function was in a string format, which is not a recognised format in Visual C (before it’s time if you like) and therefore it couldn’t understand the data it was told to display. This meant it instead pasted a random value. I then stumbled upon a better, newer funtion called fstream. This rapidly fixed the issue and left the way clear for further progress