convert longitude in decimal degrees to degrees,minutes,seconds using javascript?
353272
Any language can be used. The basic arithmetic operation is to multiply the decimal by 60 every time, until such time there is no decimal portion left. The C code for the same would look like;\n\ndouble longitude = ...;\nint long = (int)longitude;\nint min;\ndouble minutes = longitude - long;\ndouble seconds;\nint sec;\nmin = minutes * 60;\nseconds = (minutes * 60) - min;\nsec = seconds * 60;\n\nDo not know Java syntax, so cant help you with that...
598049
this will help\nhttp://www.timezoneconverter.com/
224148
<span id="tP"> </span>\n\n<script type="text/javascript">\n// Clock Script Generated By Maxx Blade's Clock v2.0d\n// http://www.maxxblade.co.uk/clock\nfunction tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+19800000); return x; } \nfunction tN(){ return new Date(); } \nfunction lZ(x){ return (x>9)?x:'0'+x; } \nfunction tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } \nfunction y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) } \nfunction dT(){ window.status=''+eval(oT)+''; document.title=''+eval(oT)+''; document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); } \nfunction aP(x){ return (x>11)?'pm':'am'; } \nvar dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),oT="dN[tS().getDay()]+' '+tS().getDate()+' '+mN[tS().getMonth()]+' '+y2(tS().getYear())+' '+':'+':'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";\nif(!document.all){ window.onload=dT; }else{ dT(); }\n</script>
1167572
The answer is:\n115740.74074074074074074074074074 etc.\n\nthe 740s after the decimal repeats forever.
238200
set the number of decimal places to 0
364837
Start by getting the 12:00pm GMT out of the question... if your longitude is 6h17m32.143sW of the Prime Meridian, then your time zone is an even -7 hours offset from GMT.\n\nThe more precise question would be, "At my location, solar time at solar noon GMT is 6:17:32.143am. My latitude is 44°44'45.694"N. Where am I?"\n\nTo convert the time reference to longitude, consider that the International Date Line (180°E & 180°W) is 12h0m0sW of the Prime Meridian. 6h0m0sW would be an even 90°W. \n\n6:17am yields a differential of 5h42m27.857s. Convert that to seconds (5*60*60 + 42*60 + 27.857), divide by 43,200 (12h*60m*60s) and multiply that by 180° to get your numeric longitude, then multiply the decimal portion out to determine your minutes and seconds of longitude.
859591
Longitude and Latitude!
844456
Insert this for the Date:\n<h4>It is now  \n<script type="text/javascript">\n<!--\nvar currentTime = new Date()\nvar month = currentTime.getMonth() + 1\nvar day = currentTime.getDate()\nvar year = currentTime.getFullYear()\ndocument.write(month + "/" + day + "/" + year)\n//-->\n</script>\n</h4>\n\nInsert this for Time:\n<h4>It is now  \n<script type="text/javascript">\n<!--\nvar currentTime = new Date()\nvar hours = currentTime.getHours()\nvar minutes = currentTime.getMinutes()\nif (minutes < 10)\nminutes = "0" + minutes\ndocument.write(hours + ":" + minutes + " ")\nif(hours > 11){\ndocument.write("PM")\n} else {\ndocument.write("AM")\n}\n//-->\n</script>\n</h4>
623360
greenwich england is zero long and the equator is zero lat\n\nhttp://www.satsig.net/maps/lat-long-finder.htm
963586
A nautical mile, whether on land or at sea, is set equal to a minute of latitude (there are 60 minutes in a degree). It is used at sea because it makes it easier to measure changes in latitude. It is roughly equal to 1.152 miles.
400127
C  H   O\n.6  12   6\n\nWITHOUT DECIMAL POINT
772358
the example you gave is misleading.\n\n1.30 hours( 1 hour and 20 minutes) = 78 minutes \n78 * 5 = 390 minutes\n390 minutes /60 =6.5 hours\n\n1.50 hours( 1 hour and 30 minutes)=  90 minutes \n90 * 5= 450 minutes\n450/60 = 7.5 hours\n\nif the decimal represents number of minutes then you've got\nsome conversion/manipulation to do.\n\nuse the modulus function to extract the decimal part.\n\nmultiply by 100 to get the number of minutes.\n\ndivide the result by 60 to get the decimal equivalent of minutes.\nie\nminutes=(1.30 mod 1)*100\ndecimalminutes=((1.30 mod 1)*100)/60)\n\nthe fix command returns the number without the decimal,\nand no rounding\nie\nfix(4343.99) returns 4343\n\n\nsooo - using your example I'd convert everything to minutes\ntrueminutes=((1.3 mod 1)*100) + (fix(1.3) * 60)\ntruminutes=90 \n\nthen I'd multiply (or add up) the numbers \nsince it's the same hours for mon - fri, I'd just multiply by 5\ntotalminutes=trueminutes * 5\ntotalminutes=450\n\nNow, I'd divide by 60 to get hours\nhours=totalminutes /60\nhours=7.5
689040
longitudes are vertical and latitudes horizontal
846187
if you are using a "while" or "do while" loop\n\nwhile ((x1 - x0) > 0.001)\n{\n//your code here\n}\n\nor you can do this\n\ndo\n{\n//your code here\n}\nwhile ((x1 - x0) > 0.001);
1107632
There's Greenwich Mean Time, which was measured from the 0 degree meridian in Greenwich, UTC (Universal Time co-ordinate) which is measured from an atomic clock in france somewhere (UTC doesn't have summer time, GMT does) and there's standard time which works on the premise that 1 rotation of the earth is 24 hrs, so 360 degrees in 24 hrs = 15 degrees every hour, so every 15 degrees of longitude is 1 hr of time difference
1173388
longitude and latitude
810525
Move the decimal two places to the left.\n.3455