BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-30-2008, 08:22 AM   #1
siva.guduru
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 0000
PIN: N/A
Carrier: NA
Posts: 36
Exclamation Help Regarding Orientation Angle

Please Login to Remove!

Hello,

I am developing a Blackberry GPS application, my main motto is is to draw an arrow from souce to target showing direction. But the problem i am facing is i am getting the angle between source and destination by getAzimuth method of location api... if i draw the arrow using that angle... i am not able to rotate the arrow as per geographic direction of my phone.

Later i found out that i have to add up Orientation angle as well and as said in API If orientation angle is 0 then we are facing north, if 90 east, 180 south and 270 west 360 again north...

but when i am trying to get Orientation angle even i keep my phone steady towards north ia m getting different values each time i call to get the orientation. onr time i am getting 120 other time i am gettin 270 even though i am facing north. My hpone is 8820 smart hpone wit inbuilt GPS receiver.

Please help me regarding this.

Siva Charan Guduru.
Offline  
Old 07-31-2008, 12:39 AM   #2
siva.guduru
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 0000
PIN: N/A
Carrier: NA
Posts: 36
Default

Hello,

Please help me regarding this... i want to know how to get stable orientaion value for device when we hold it in particular direction.
Offline  
Old 07-31-2008, 02:54 AM   #3
ghane
Knows Where the Search Button Is
 
Join Date: Mar 2006
Model: 9000
Carrier: Starhub
Posts: 15
Default

I am not a developer, so am not aware of the API you are using.

However, there is no way for the BB to know which way you are facing, north or south. By taking two position fixes close together, and drawing a line between them, we can estimate which way you are moving. However, this does not still tell us which way you were facing while walking, or the orientation of the phone.

You need a compass to detect orientation.
Offline  
Old 07-31-2008, 08:16 AM   #4
siva.guduru
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 0000
PIN: N/A
Carrier: NA
Posts: 36
Default But the API provides Orientaion Class

But the J2ME location API provides an Orientation class... if implementation does not support the Orientation then it will throw the location exception.. but here in my case i am able to get the Orientation value, the real problem is what ever value i am getting is not constant even if i keep my device steadily in one position.

rgs,
Siva Charan Guduru.
Offline  
Old 07-31-2008, 09:52 AM   #5
takeshi
BlackBerry Mensa
 
takeshi's Avatar
 
Join Date: Jan 2005
Location: Houston
Model: 8310
Carrier: at&t
Posts: 7,741
Default

Re-read ghane's post. The orientation is probably based on two position fixes. Even so it's possible to obtain an incorrect orientation which is something you'll need to address in your code.

You can see this sort of behavior occasionally even in the best GPS apps. Again, the BB can't tell which way you're facing as it does not have a compass. You can make an educated guess based on prior positioning data though.
Offline  
Old 07-31-2008, 10:38 AM   #6
CanuckBB
BlackBerry Extraordinaire
 
CanuckBB's Avatar
 
Join Date: Feb 2006
Location: YYZ
Model: 9900
Carrier: Rogers
Posts: 1,183
Default

The orientation is derived by the last 2 locations and an assumption that you are facing in the direction you are moving.
Offline  
Old 07-31-2008, 10:03 PM   #7
RemyJ
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Default

The API isn't BlackBerry specific so if a device happens to have a built in compass, you can get orientation while stopped.
Offline  
Old 08-19-2008, 12:27 AM   #8
siva.guduru
Knows Where the Search Button Is
 
Join Date: Dec 2007
Model: 0000
PIN: N/A
Carrier: NA
Posts: 36
Default Reg coordinates

hello,

Thank you for all your replies...

Now if i want to convert two locations as two cordinates on screen how can i do that... supposee there is a location which i want o convert in to X and Y coordinates of screen to represetn on screen (x,y), is there any way i can do that.

I have a vague idea suppose if we have a Latitude if we can take some Cos and Sin values thani think we weill get some coordinate value but what about longitude then how can we go about longitude... where should we incorporate longitude in calculating the coordinate information.

Any Help regarding this would be of great use for me...

Thanks & Regards,
Siva Charan Guduru.
Offline  
Old 09-04-2008, 06:00 AM   #9
ghane
Knows Where the Search Button Is
 
Join Date: Mar 2006
Model: 9000
Carrier: Starhub
Posts: 15
Default

Quote:
Originally Posted by siva.guduru View Post
hello,

Thank you for all your replies...

Now if i want to convert two locations as two cordinates on screen how can i do that... supposee there is a location which i want o convert in to X and Y coordinates of screen to represetn on screen (x,y), is there any way i can do that.

I have a vague idea suppose if we have a Latitude if we can take some Cos and Sin values thani think we weill get some coordinate value but what about longitude then how can we go about longitude... where should we incorporate longitude in calculating the coordinate information.

Any Help regarding this would be of great use for me...

Thanks & Regards,
Siva Charan Guduru.
Simple, your Latitude is the Y coordinate, and the Longitude is the X coordinate. That is absolutely correct, if you assume the earth is flat. The assumption is reasonable unless:
  1. You are near the poles
  2. The two points are far from each other, eg a few thousand km

Once you have the two points, scale correctly.
Offline  
Closed 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


Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16) picture

Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16)

$189.99



VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250 picture

VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250

$99.99



HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee picture

HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee

$235.94



Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue picture

Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue

$141.00



Sketchy Chics - June 2021 - December 2022. Vintage Collection Art picture

Sketchy Chics - June 2021 - December 2022. Vintage Collection Art

$22.50



Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair picture

Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair

$199.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.