[X3D-Public] Accelerometer environment sensor

Keith keithrvictor at gmail.com
Fri Nov 20 18:57:19 PST 2009


Hey Don:

Let me be more clear.
There two different hardware sensors that are relevent here:  
accelerometer and compass.
The accelerometer effectively provides you with a down vector. The  
compass provides you with the orientation about that down vector. So,  
if your hardware supports both these features, you can get the full 3d  
orientation of the device.    If you don't have a compass, you can't  
get that horizontal orientaion, or change in that orientation.  
Eitherway, it won't help to zero or reset.

For the iPhone, all versions support accelerometers, but you need the  
3gs ( or is it 3g?) to get the compass.
I don't know about the droid.

I hope that helps.

Keith Victor



Sent from my iPhone

On Nov 20, 2009, at 4:58 PM, Don Brutzman <brutzman at nps.edu> wrote:

> Keith Victor wrote:
>> Hey Don:
>> I agree that an orientation_changed output field would be helpfull  
>> in addition to the raw acceleration data.  For true 3D orientation,  
>> you would also need compass input along with the accelerometer.   
>> Or, is this the 2D orienation, as I had described.  We need to  
>> clearly define this.
>
> agreed.  another limitation is that you don't have a "fix" capability
> to know where "zero" or "north" or "origin default orientation"  
> might be.
> Hence thus suggestion to define default orientation based on when
> enabled field becomes true.
>
>> In an ideal world, you can integrate acceleration to get relative  
>> velocity.  And, once again to get relative position.  But, Im  
>> afraid thats not going to work with these simple devices.  The  
>> acceleration of gravity is so much stronger than anything else  
>> going on, that the only thing it is good for is detecting the  
>> orientation of the device ( which way is down ), and any extreme  
>> shaking.  You're not going to get any good velocity data out of an  
>> iPhone ;(
>
> that is a good question that is worth further checking - who can do  
> that?
>
>> What is the "IsActive" output field do?  Does that tell you if the  
>> device supports this feature.  If its enabled, and working, its  
>> going to be active. Perhaps SFBool isSupported   is a better name.
>
> isActive is required as part of the X3DSensor abstract interface.
> so applying your definition in this context sounds appropriate.
>
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br           brutzman at nps.edu
> Watkins 270   MOVES Institute, Monterey CA 93943-5000 USA  work +1.831.656.2149
> X3D, virtual worlds, underwater robots, XMSF  http://web.nps.navy.mil/~brutzman
>



More information about the X3D-Public mailing list