![]()  | 
	
| 
	 | 
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			I'm confused, I thought the whole point was that you wanted to collect a preset amount of samples? If the duration of the trial is not known at runtime, then the number of samples to collect cannot be known either. 
		
		
		
		
		
		
		
		
	
	To answer your other question, the '*' is simply the multiplication operator.  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Ok, you're right.  Originally I wanted to collect a fixed amount of data points.  But then I switched which program I was working on and the new one needs to be flexible depending on how long the trial lasts.  Given that....I'm worried that if i'm unable to specify MAX_SAMPLES value then I will get disparate values across the board (i.e. two different independent trials which both happen to be for the same duration may yield different amount of data points (e.g. 2000 vs 1849)).  Which is what leads me to think it might be a processing speed issue.  Unless, if I'm able to specify the SAMPLE_RATE and that would hold true for all trials then if everything goes smoothly it should collect properly.  (i.e. if i can get the Birds to collect at 30 Hz consistently then I don't have any other problem.)  My problem was that when I set (what I thought was) the collection rate to 1.0/30: viz.starttimer(0,(1.0/30),viz.FOREVER) 
		
		
		
		
		
		
		
		
	
	viz.starttimer(4,(1.0/30),viz.FOREVER) I thought that that would tell Vizard to record data at a rate of 30 Hz. If that's not how I'm supposed to tell the Birds what rate to collect at then that's what I need to know. Namely, all I need is for the Birds to collect at a fixed rate for every trial (and the right (i.e. consistent) amount of total data points should emerge from that every time---without a need to specify MAX_SAMPLES).  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			So if I define the sample rate but not max samples then it should sample at that rate regardless right?  And then data collection would stop whenever the trial ended?  So everytime a trial lasted 60 seconds I should get 1800 data points (without having to define max samples).  And everytime a trial lasted 30 seconds I should get 900 data points (without having to define max samples)....etc etc etc.????
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Computers are not %100 perfect when it comes to timing, however you should be able to achieve a reliable sample rate of 30Hz. I did some tests here and I got the same number of samples every time. I don't know why you would get such varying values. Is your simulation running at 60Hz? Do you have a simple script that reproduces your results?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			How do I check/make sure it is running at 60Hz? 
		
		
		
		
		
		
		
		
	
	Reproduces what results?  | 
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Press the F4 key while your script is running and it will display the framerate in the upper left corner of the window. 
		
		
		
		
		
		
		
		
	
	I was referring to the results of your script that vary between 1700 to 1800 samples recorded.  | 
| 
		 
			 
			#7  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			When I press F4 the number keeps rapidly changing.  It looks like it's fluctuating between 45-55.  I don't know what that means but that's what I got.  Is it supposed to be stationary?  If so, is there a way to fix that value?
		 
		
		
		
		
		
		
		
		
	
	 | 
![]()  | 
	
	
| Thread Tools | |
| Display Modes | Rate This Thread | 
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Flock of Birds recognized, but no data sent | sjroorda | Vizard | 9 | 03-01-2016 09:48 PM | 
| Using vrpn_server with Flock of birds | sylvain | Precision Position Tracker (PPT) | 3 | 11-30-2007 10:45 AM | 
| Flock of Birds | Elittdogg | Vizard | 9 | 10-02-2007 02:53 PM | 
| Flock of birds extended range problem | theuberk | Vizard | 4 | 07-30-2007 10:31 AM | 
| Adding more than one Flock of Birds | asimbh | Vizard | 3 | 12-15-2006 02:48 AM |