NavList:
A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
Re: Why do we still use this terrible Babylonian hexadecimal system
From: Alexandre Eremenko
Date: 2004 Nov 18, 11:13 -0500
From: Alexandre Eremenko
Date: 2004 Nov 18, 11:13 -0500
Yes. I use a Linux standard spreadsheet "Gnumeric", but it is essentially the same as Excel. I just allocate 4 cells for each piece of data (one for degrees, one for minutes, one for seconds, and one for radians (or whatever "reasonable measure" of angles is used in calculations, fractional degrees, for example)). Then I just type the appropriate conversion formulas into these cells. Alex. P.S. If I ever have to do this in sea, I will use my little Casio scientific calculator fx-250D ($10, battery for 1800 hours), which has hexadecimal conversion to radians or fractional degrees. It also has all trigonometry to 8 digits, averaging and even standard deviation. I find it very convenient for sight reduction. It sounds incredible but I never replaced the battery since I bought it in 1989 (!) On Thu, 18 Nov 2004, Michael Dorl wrote: > Is there anyway to use excel with dd mm ss data? > > I've been using the following macros to convert back and forth. To add > them to a sheet,use TOOLS - MACRO - VISUAL BASIC EDITOR. > Then after visual basic stars, do INSERT MODULE and paste them into the > resulting window. > > Mike > > > Function DMStoDEC(s As String) As Double > > Dim parts() As String > > Dim Degrees As Integer > Dim Minutes As Integer > Dim Seconds As Integer > Dim sign As Integer > > parts = Split(s, , , vbBinaryCompare) > > Degrees = parts(0) > If Degrees < 0 Then > sign = -1 > Degrees = -Degrees > Else > sign = 1 > End If > > Minutes = parts(1) > Seconds = parts(2) > > DMStoDEC = sign * (Degrees + Minutes / 60# + Seconds / 3600#) > > End Function > > > Function DECtoDMS(A As Double) As String > > Dim Degrees As Integer > Dim Minutes As Integer > Dim Seconds As Double > > Degrees = Int(A) > A = 60 * (A - Degrees) > Minutes = Int(A) > Seconds = 60# * (A - Minutes) > Seconds = Round(Seconds, 3) > Seconds = Int(Seconds * 1000#) > Seconds = Seconds / 1000# > > DECtoDMS = Degrees & " " & Minutes & " " & Seconds > > End Function >