WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1  
Old 11-27-2007, 05:42 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #2  
Old 11-27-2007, 07:16 PM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
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).
Reply With Quote
  #3  
Old 11-28-2007, 11:07 AM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
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.????
Reply With Quote
  #4  
Old 11-28-2007, 11:50 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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?
Reply With Quote
  #5  
Old 11-28-2007, 02:13 PM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
How do I check/make sure it is running at 60Hz?

Reproduces what results?
Reply With Quote
  #6  
Old 11-28-2007, 02:17 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #7  
Old 11-29-2007, 09:02 AM
Elittdogg Elittdogg is offline
Member
 
Join Date: Aug 2007
Posts: 77
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?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 09:21 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC