Calculating Azimuth Based on Departure and Latitude!
Hi all! I am trying to translate a formula I have been using in Excel to work in the Smartsheet environment. The use of this formula is to calculate the azimuth from one point to another by using the latitude between the points and the departure between the two points. This is the formula that works in Excel:
=IF(AND(C10=0,B10>0),"EAST",IF(AND(C10=0,B10<0),"West",IF(AND(C10>0,B10=0),"North",IF(AND(C10<0,B10=0),"South",IF(C10="","",IF(AND(C10>0,B10>0),DEGREES(ATAN(B10/C10)),IF(AND(C10<0,B10>0),90+ABS(DEGREES(ATAN(C10/B10))),IF(AND(C10<0,B10<0),180+DEGREES(ATAN(B10/C10)),IF(AND(C10>0,B10<0),270+ABS(DEGREES(ATAN(C10/B10))),"")))))))))
For my purposes, C10 = [Latitude]1 and B10 = [Departure]1 in Smartsheet world. I think my main issue is Smartsheet doesn't use ATAN and the formatting is a bit different overall. Any suggestions would be very helpful! Thanks in advance!
Answers
-
I'm afraid this is going to be impossible in core Smartsheet. Smartsheet doesn't have any trig functions or degrees.
If you have Data Shuttle, you could export your sheet to an Excel stored in Drive, Box, Sharepoint etc and that has columns setup with your trig functions. Then reimport the data back to the same sheet with the data from the formulas.
Alternatively you could use Bridge and Javascript to run these functions
-
Hi Brian,
I see! I will look into one of those workflows. Thank you for the quick response!!
-
How accurate do you have to be with this? ARCTAN can be estimated pretty close using series expansion (see "Taylor Expansion"). This could be setup as a form of longhand in Smartsheet. It's been a couple decades since I last messed with trig, but I believe it would be doable.
-
Pretty accurate as we're using it to convert GCP/field points to a known base point. I will look into that though, it may be within our tolerances. Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!