View Full Version : Sensor needed?

04-01-2011, 02:00 AM
Hi all,

I originally posted this in the Viz 3 forum - it should have been posted here I think so sorry for the re-post :o

I am using pyserial to connect to a GPS unit and a compass module and then apply transforms to the GPS data from within a Vizard script. However, I am now wondering if I am approaching this all wrong? Should I be using a sensor plugin for this purpose :confused: , so that I can use the functionality provided by through viz.link for offsetting etc.??

Am I creating more problems for myself down-the-line by not using a sensor? Do I run the risk of introducing problematic lag within my project by using a python script to access these devices?

Any advise regarding this would be very gratefully received.

Thanks In Advance

04-05-2011, 02:16 AM
Ok, I feel the need to point out that I am NOT trying to get help with writing a sensor, or anyone to teach me C/C++ (although I probably need it :o) - what I am trying to get at is the reasoning behind using a sensor in the first place. Is it for convenience in use (viztracker, links etc.), or is it because it is simply not efficient using python scripts to do the job of connecting to hardware devices??

04-05-2011, 04:08 PM
If the code is working for you and the performance is not an issue, then I don't see any compelling reason to rewrite it using sensors. If you want to use the GPS data with links, then you can create an empty group node that holds the GPS position. You can then use the group node as the source object to any link.

04-06-2011, 02:29 AM
Ok, cheers for the reply farshizzle - thats answered my question beautifully :D