WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-01-2011, 02:00 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Sensor needed?

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

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 , 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
Reply With Quote
  #2  
Old 04-05-2011, 02:16 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
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 ) - 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??
Reply With Quote
  #3  
Old 04-05-2011, 04:08 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #4  
Old 04-06-2011, 02:29 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Ok, cheers for the reply farshizzle - thats answered my question beautifully
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


All times are GMT -7. The time now is 09:30 AM.


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