Re: [android-developers] Phone's camera facing given gps coordinates

2011-10-16 Thread lbendlin
or you let the Google Location API do the work for you.  
myLocation.bearingTo(theOtherLocation)

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Phone's camera facing given gps coordinates

2011-10-15 Thread Fu
Hi, all

can anyone give me an idea about how to wirte a android app to define
whether my phone's camera is facing a given gps coordinates or not.
and if not, give the direction to let my phone's camera to face that
given gps coordinates.


thanks alots

Fu

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Phone's camera facing given gps coordinates

2011-10-15 Thread Fu
Hi, all

can anyone give me an idea about how to wirte a android app to define
whether my phone's camera is facing a given gps coordinates or not.
and if not, give the direction to let my phone's camera to face that
given gps coordinates.


thanks alots

Fu

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Phone's camera facing given gps coordinates

2011-10-15 Thread TreKing
On Thu, Oct 13, 2011 at 6:53 PM, Fu fuhaoh...@gmail.com wrote:

 can anyone give me an idea about how to wirte a android app to
 define whether my phone's camera is facing a given gps coordinates or
 not.and if not, give the direction to let my phone's camera to face
 that given gps coordinates.


You need:
+ Given GPS point
+ Phone location (see docs)
+ Device orientation (see docs)
+ Linear algebra to determine angle of rotation difference between device
orientation and target point (see high school)

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Phone's camera facing given gps coordinates

2011-10-15 Thread Bob Kerns
Well, technically, you need spherical trigonometry, not linear algebra.

For nearby points, linear algebra will be a good approximation, so perhaps 
that's a good enough answer for him. But if you want an app to face you 
toward Mecca, for example, that won't be enough.

A good navigation text will be helpful in that case.

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en