After looking thru it, I'm thinking it's incorrect.
There is this suspiciously simple method:
public void onSensorChanged(SensorEvent event) { // TODO Auto-generated method stub myCompassView.updateDirection((float)event.values[0]);
}
Basically, it seems like they are using the x component of the force vector as if it were an angle. Can someone else look at this and let me know what you think?
> After looking thru it, I'm thinking it's incorrect.
> There is this suspiciously simple method:
> public void onSensorChanged(SensorEvent event) {
> // TODO Auto-generated method stub
> myCompassView.updateDirection((float)event.values[0]);
> }
> Basically, it seems like they are using the x component of the force
> vector as if it were an angle. Can someone else look at this and let me
> know what you think?
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> After looking thru it, I'm thinking it's incorrect.
You are mistaken.
> There is this suspiciously simple method:
What does "suspiciously simple" even mean?
Why should simplicity engender suspicion?
It's obviously a cover method for one that is less "suspicious".
> public void onSensorChanged(SensorEvent event) { > // TODO Auto-generated method stub > myCompassView.updateDirection((float)event.values[0]); > }
> Basically, it seems like they are using the x component of the force > vector as if it were an angle. Can someone else look at this and let me > know what you think?
I think, no, wait, I am certain because I read the code to which you linked that it uses the x component to calculate the angle.
It's trigonometry. I know, it must seem like magic.
On Thursday, September 27, 2012 1:01:08 PM UTC-5, MagouyaWare wrote:
> Why not post a comment on his blog and ask him about it? That's what > others have done... and he seems to respond to comments/questions > consistently...
>> After looking thru it, I'm thinking it's incorrect.
>> There is this suspiciously simple method:
>> public void onSensorChanged(SensorEvent event) {
>> // TODO Auto-generated method stub
>> myCompassView.updateDirection((float)event.values[0]);
>> }
>> Basically, it seems like they are using the x component of the force >> vector as if it were an angle. Can someone else look at this and let me >> know what you think?
>> -- >> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-d...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>> After looking thru it, I'm thinking it's incorrect.
> You are mistaken.
>> There is this suspiciously simple method:
> What does "suspiciously simple" even mean?
> Why should simplicity engender suspicion?
> It's obviously a cover method for one that is less "suspicious".
>> public void onSensorChanged(SensorEvent event) { >> // TODO Auto-generated method stub >> myCompassView.updateDirection((float)event.values[0]); >> }
>> Basically, it seems like they are using the x component of the force >> vector as if it were an angle. Can someone else look at this and let me >> know what you think?
> I think, no, wait, I am certain because I read the code to which you > linked that it uses the x component > to calculate the angle.
> It's trigonometry. I know, it must seem like magic.
> private static final double CONVERT = Math.PI / 180.0;
I'm sorry, I made a mistake. I said, "uses the x component to calculate the angle" and should have said, "uses the angle to calculate the x component".
> After looking thru it, I'm thinking it's incorrect.
> There is this suspiciously simple method:
> public void onSensorChanged(SensorEvent event) { > // TODO Auto-generated method stub > myCompassView.updateDirection((float)event.values[0]); > }
> Basically, it seems like they are using the x component of the force > vector as if it were an angle. Can someone else look at this and let me > know what you think?
>> After looking thru it, I'm thinking it's incorrect.
>> There is this suspiciously simple method:
>> public void onSensorChanged(SensorEvent event) { >> // TODO Auto-generated method stub >> myCompassView.updateDirection((float)event.values[0]); >> }
>> Basically, it seems like they are using the x component of the force >> vector as if it were an angle. Can someone else look at this and let me >> know what you think?
>>> After looking thru it, I'm thinking it's incorrect.
>> You are mistaken.
>>> There is this suspiciously simple method:
>> What does "suspiciously simple" even mean?
>> Why should simplicity engender suspicion?
>> It's obviously a cover method for one that is less "suspicious".
>>> public void onSensorChanged(SensorEvent event) { >>> // TODO Auto-generated method stub >>> myCompassView.updateDirection((float)event.values[0]); >>> }
>>> Basically, it seems like they are using the x component of the force >>> vector as if it were an angle. Can someone else look at this and let me >>> know what you think?
>> I think, no, wait, I am certain because I read the code to which you >> linked that it uses the x component >> to calculate the angle.
>> It's trigonometry. I know, it must seem like magic.
>> private static final double CONVERT = Math.PI / 180.0;
> I'm sorry, I made a mistake. I said, "uses the x component to calculate > the angle" and should have > said, "uses the angle to calculate the x component".