View unanswered posts | View active topics It is currently Tue Dec 18, 2018 11:40 am






Reply to topic  [ 5 posts ] 
EV3 Gyro Dataset 
Author Message
Rookie

Joined: Fri Sep 20, 2013 8:39 am
Posts: 38
Post EV3 Gyro Dataset
I experimented with one of the sample programs. It appears that the definition of angle and rate in the Gyro Data set are swapped
Code:
// Some sensors modes like modeEV3Gyro_RateAndAngle will
     // return multiple values, which can be retrieved with getSensorDataset()
     // A dataset can be up to 8 floats, so make sure your array is appropriately sized.
     // For the gyro, the first element in the dataset is rate, the next one is the current angle
      getSensorDataset(gyro, &dataSet[0], dataSetSize);
      displayCenteredBigTextLine(1, "Dataset size: %d", dataSetSize);
      displayCenteredBigTextLine(4, "Rate: %2.0f", dataSet[0]);
      displayCenteredBigTextLine(6, "Angle: %2.0f", dataSet[1]);


Also the Gyro Reset function appears to do nothing.


Sun Aug 17, 2014 7:23 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: EV3 Gyro Dataset
Hiya Sirius,

Thanks for the report. I'll take a look at them!

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Aug 17, 2014 8:17 am
Profile WWW
Rookie

Joined: Fri Sep 20, 2013 8:39 am
Posts: 38
Post Re: EV3 Gyro Dataset
v4.26 - Looks like the gyro reset now works!


Sun Aug 31, 2014 6:41 am
Profile
Rookie

Joined: Fri Sep 20, 2013 8:39 am
Posts: 38
Post Re: EV3 Gyro Dataset
For completeness, the Basic_Gyro_dataset example in the 4.26 EV3 examples has been changed so the display is correct but the comments are still incorrect
Code:
// For the gyro, the first element in the dataset is rate, the next one is the current angle
      getSensorDataset(gyro, &dataSet[0], dataSetSize);
      displayCenteredBigTextLine(1, "Dataset size: %d", dataSetSize);
      displayCenteredBigTextLine(4, "Rate: %2.0f", dataSet[1]);
      displayCenteredBigTextLine(6, "Angle: %2.0f", dataSet[0]);



The Angle is the first entry in the array and the Rate is the second entry so the comment is wrong.


Tue Sep 02, 2014 10:31 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: EV3 Gyro Dataset
Good call, I will fix that forthwith!

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Sep 09, 2014 10:23 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.