BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-29-2009, 03:34 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Distance calculation

Please Login to Remove!

Formula for distance calculation includs 'acos' that is not supported by API (Math, MathUtils) versions 4.5 and lower. The 'acos' is available in versions 4.7 and up.

How can I calculate a distance by latitude and longitude in app for regular non-touchable devices? Is there any formula for acos calculation?
Offline  
Old 09-29-2009, 06:09 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

acos is just the inverse of cos.

See this article:

Inverse trigonometric functions - Wikipedia, the free encyclopedia
Offline  
Old 10-01-2009, 04:00 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I created my own method. It works.

Thanks
Offline  




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