dazza Posted June 27, 2008 Share Posted June 27, 2008 Does AutoIt have (or failing this--can someone code me) a degrees-minutes-secs converter?e.g. 50o 42' 43.33 = 50.712008 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 27, 2008 Share Posted June 27, 2008 Does AutoIt have (or failing this--can someone code me) a degrees-minutes-secs converter?e.g. 50o 42' 43.33 = 50.712008 We don't create scripts on request here. We help you write your own. A minute is just 1/60th of a degree, and a second is just 1/60th of a minute. So the math is easy: 50 + 42/60 + (43.33/60)/60Try to code it and come back with a more specific question about using AutoIt if you need to. P.S. If you need someone to code it for you, see the Rent-A-Coder link in my sig. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted June 27, 2008 Share Posted June 27, 2008 (edited) ;50o 42' 43.33 = 50.712008 $result = DMS2DEC(50,42,43.33) ConsoleWrite($result & @CRLF) $result2 = DEC2DMS($result) ConsoleWrite($result2 & @CRLF) Func DMS2DEC($fDegrees, $fMinutes, $fSeconds) Return $fDegrees + ($fMinutes/60) + ($fSeconds/3600) EndFunc Func DEC2DMS($fDec) Local $fDegrees, $fMinutes, $fSeconds $fDegrees = Int($fDec) $fMinutes = ($fDec - $fDegrees) * 60 $fSeconds = StringFormat("%.2f",($fMinutes - Int($fMinutes)) * 60) Return StringFormat("%s° %s' %s""", $fDegrees, Int($fMinutes), $fSeconds) EndFunc We don't create scripts on request here. We help you write your own. Oops. Sorry, first one of the day. I get more frustrated as the day progresses so I am less willing to help @ 5:00. Edited June 27, 2008 by weaponx Link to comment Share on other sites More sharing options...
dazza Posted June 27, 2008 Author Share Posted June 27, 2008 Many thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 27, 2008 Share Posted June 27, 2008 Oops. Sorry, first one of the day. I get more frustrated as the day progresses so I am less willing to help @ 5:00.Giving away fish in a caffeine-induced early morning frenzy... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now