Well I can certainly field a few of these.
Quote:
Originally Posted by theprgramerdude
First of all, for the Encoder->GetRate() function, it's return type is a double, but what units does it return it in?
|
In whatever units you'd like, you should be specifying a distance per pulse which the GetRate() function then uses. Which ever unit you are
implicitly using in distance per pulse is the unit GetRate() returns.
Quote:
|
Originally Posted by WPILibRev2259
Code:
double Encoder::GetRate()
{
return (m_distancePerPulse / GetPeriod());
}
|
Quote:
Originally Posted by theprgramerdude
Is there a maximum rate at which this can be called, even though the physical limit at which meaningful data can be obtained might be around 10,000 revs /sec max?
|
The encoder will obviously only have a certain refresh rate due to hardware limitations, but there is no hard coded maximum of calling the function.
Quote:
Originally Posted by theprgramerdude
Second, for the Timer functions, is it possible to obtain microsecond or better accuracy by subtracting two different timestamp functions, like GetPPCTimeStamp() or GetFPGATimeStamp(), and furthermore, are these timestamps just representations of how many clock cycles have passed, and thus dependent on the speed of the proccesor, or of the actual time in seconds passed?
|
Not entirely sure, however I frankly believe the accuracy the Timer object provides should be good enough for high-level applications - the Timer object will be the actual time in seconds passed.
http://mmrambotics.ca/wpilib/class_timer.html
It seems you are doing some interesting data acquisition. Care to elaborate?
EDIT: jwakeman beat me to the first answer, but I'll keep my post.