74 pure function prs(angle)
80 real(
double),
intent(in) :: angle
83 character ::
prs*(7),
mm*(2),ss*(2),ddd*(3)
89 s = nint((a-d-m/60.d0)*3600.d0)
100 write(ddd,
'(I3.3)') d
104 if(d.gt.0)
write(
prs,
'(A3,A1,A2,A1)') ddd,
'd',
mm,
"'"
105 if(d.eq.0)
write(
prs,
'(A3,A1,A2,A1)')
mm,
"'",ss,
'"'
123 real(
double),
intent(in) :: angle
126 character ::
dms*(10),
mm*(2),ss*(2),ddd*(3)
132 s = nint((a-d-m/60.d0)*3600.d0)
143 write(ddd,
'(I3.3)') d
147 write(
dms,
'(A3,2(A1,A2),A1)') ddd,
'd',
mm,
"'",ss,
'"'
165 real(
double),
intent(in) :: angle
168 character ::
dmss*(13),
mm*(2),ss*(5),ddd*(3)
174 s = (a-d-m/60.d0)*3600.d0
176 if(s.ge.59.995d0)
then
185 write(ddd,
'(I3.3)') d
188 if(s.lt.10)
write(ss,
'(A1,F4.2)')
'0',s
190 write(
dmss,
'(A3,A1,A2,A1,A5,A1)') ddd,
'd',
mm,
"'",ss,
'"'
208 real(
double),
intent(in) :: angle
211 character ::
dms2*(11),
mm*(2),ss*(2),ddd*(4),sig
224 s = nint((a-d-m/60.d0)*3600.d0)
235 write(ddd,
'(A1,I3.3)') sig,d
238 write(
dms2,
'(A4,2(A1,A2),A1)') ddd,
'd',
mm,
"'",ss,
'"'
256 real(
double),
intent(in) :: angle
259 character ::
ddms2*(10),sig
272 s = nint((a-d-m/60.d0)*3600.d0)
283 write(
ddms2,
'(A1,I2.2,2(A1,I2.2),A1)') sig,d,
'd',m,
"'",s,
'"'
301 real(
double),
intent(in) :: angle
304 character ::
d1ms2*(9),sig
317 s = nint((a-d-m/60.d0)*3600.d0)
328 write(
d1ms2,
'(A1,I1.1,2(A1,I2.2),A1)') sig,d,
'd',m,
"'",s,
'"'
341 pure function dmss2(angle, noSymbols)
347 real(
double),
intent(in) :: angle
348 logical,
intent(in),
optional :: nosymbols
351 character ::
dmss2*(14),
mm*(2),ss*(5),ddd*(4),sig
352 logical :: usesymbols
365 s = (a-d-m/60.d0)*3600.d0
367 if(s.ge.59.995d0)
then
376 write(ddd,
'(A1,I3.3)') sig,d
379 if(s.lt.10)
write(ss,
'(A1,F4.2)')
'0',s
382 if(
present(nosymbols)) usesymbols = .not. nosymbols
385 write(
dmss2,
'(A4,A1,A2,A1,A5,A1)') ddd,
'd',
mm,
"'",ss,
'"'
387 write(
dmss2,
'(A4,A1,A2,A1,A5,A1)') ddd,
' ',
mm,
' ',ss,
' '
400 pure function dm(angle)
406 real(
double),
intent(in) :: angle
409 character ::
dm*(7),
mm*(2),ddd*(3)
414 m = nint((a-d)*60.d0)
424 write(
dm,
'(A3,A1,A2,A1)') ddd,
'd',
mm,
"'"
442 real(
double),
intent(in) :: angle
445 character ::
dm2*(8),
mm*(2),ddd*(4),sig
456 m = nint((a-d)*60.d0)
462 write(ddd,
'(A1,I3.3)') sig,d
464 write(
dm2,
'(A4,A1,A2,A1)') ddd,
'd',
mm,
"'"
483 real(
double),
intent(in) :: angle
486 character ::
dmm2*(7),
mm*(2),dd*(3),sig
497 m = nint((a-d)*60.d0)
503 write(dd,
'(A1,I2.2)') sig,d
505 write(
dmm2,
'(A3,A1,A2,A1)') dd,
'd',
mm,
"'"
524 real(
double),
intent(in) :: angle
527 character ::
dmmm2*(9),
mm*(4),dd*(3),sig
539 if(m.ge.59.95d0)
then
544 write(dd,
'(A1,I2.2)') sig,d
546 if(m.lt.9.95d0)
write(
mm,
'(I1,F3.1)') 0,m
547 write(
dmmm2,
'(A3,A1,A4,A1)') dd,
'd',
mm,
"'"
567 real(
double),
intent(in) :: angle
568 logical,
intent(in),
optional :: nosymbols
571 character ::
dmmmmm2*(12),
mm*(6),dd*(4),sig
572 logical :: usesymbols
584 if(m.ge.59.95d0)
then
589 write(dd,
'(A1,I3.3)') sig,d
591 if(m.lt.9.9995d0)
write(
mm,
'(I1,F5.3)') 0,m
594 if(
present(nosymbols)) usesymbols = .not. nosymbols
597 write(
dmmmmm2,
'(A4,A1,A6,A1)') dd,
'd',
mm,
"'"
599 write(
dmmmmm2,
'(A4,A1,A6,A1)') dd,
' ',
mm,
' '
619 real(
double),
intent(in) :: angle
621 character ::
ddd2*(6),sig
630 write(
ddd2,
'(A1,F4.1,A1)') sig,a,
'd'
631 if(a.lt.9.95d0)
write(
ddd2,
'(A1,I1,F3.1,A1)') sig,0,a,
'd'
657 real(
double),
intent(in) :: angle
660 character ::
wdms*(26),
mm*(2),ss*(2),ddd*(3)
666 s = nint((a-d-m/60.d0)*3600.d0)
677 write(ddd,
'(I3.3)') d
681 write(
wdms,
'(A3,A5,A2,A7,A2,A7)') ddd,
'°',
mm,
'’',ss,
'”'
699 real(
double),
intent(in) :: angle
702 character ::
wdmss*(29),
mm*(2),ss*(5),ddd*(3)
708 s = (a-d-m/60.d0)*3600.d0
710 if(s.ge.59.995d0)
then
719 write(ddd,
'(I3.3)') d
722 if(s.lt.10)
write(ss,
'(A1,F4.2)')
'0',s
724 write(
wdmss,
'(A3,A5,A2,A7,A5,A7)') ddd,
'°',
mm,
'’',ss,
'”'
743 real(
double),
intent(in) :: angle
746 character ::
wdms2*(27),
mm*(2),ss*(2),ddd*(4),sig
759 s = nint((a-d-m/60.d0)*3600.d0)
770 write(ddd,
'(A1,I3.3)') sig,d
773 write(
wdms2,
'(A4,A5,A2,A7,A2,A7)') ddd,
'°',
mm,
'’',ss,
'”'
791 real(
double),
intent(in) :: angle
794 character ::
wdmss2*(30),
mm*(2),ss*(5),ddd*(4),sig
807 s = (a-d-m/60.d0)*3600.d0
809 if(s.ge.59.995d0)
then
818 write(ddd,
'(A1,I3.3)') sig,d
821 if(s.lt.10)
write(ss,
'(A1,F4.2)')
'0',s
823 write(
wdmss2,
'(A4,A5,A2,A7,A5,A7)') ddd,
'°',
mm,
'’',ss,
'”'
842 real(
double),
intent(in) :: angle
845 character ::
wddms2*(26),
mm*(2),ss*(2),dd*(3),sig
858 s = nint((a-d-m/60.d0)*3600.d0)
869 write(dd,
'(A1,I2.2)') sig,d
872 write(
wddms2,
'(A3,A5,A2,A7,A2,A7)') dd,
'°',
mm,
'’',ss,
'”'
890 real(
double),
intent(in) :: angle
893 character ::
wd1ms2*(25),sig
906 s = nint((a-d-m/60.d0)*3600.d0)
917 write(
wd1ms2,
'(A1,I1.1,A5,I2.2,A7,I2.2,A7)') sig,d,
'°',m,
'’',s,
'”'
935 real(
double),
intent(in) :: angle
938 character ::
wdm*(17),
mm*(2),ddd*(3)
943 m = nint((a-d)*60.d0)
952 write(
wdm,
'(A3,A5,A2,A7)') ddd,
'°',
mm,
'’'
970 real(
double),
intent(in) :: angle
973 character ::
wdm2*(18),
mm*(2),ddd*(4),sig
984 m = nint((a-d)*60.d0)
990 write(ddd,
'(A1,I3.3)') sig,d
992 write(
wdm2,
'(A4,A5,A2,A7)') ddd,
'°',
mm,
'’'
1012 real(
double),
intent(in) :: angle
1015 character ::
wdmm2*(17),
mm*(2),dd*(3),sig
1026 m = nint((a-d)*60.d0)
1032 write(dd,
'(A1,I2.2)') sig,d
1033 write(
mm,
'(I2.2)') m
1034 write(
wdmm2,
'(A3,A5,A2,A7)') dd,
'°',
mm,
'’'
1052 real(
double),
intent(in) :: angle
1055 character ::
wdmmm2*(19),
mm*(4),dd*(3),sig
1067 if(m.ge.59.95d0)
then
1072 write(dd,
'(A1,I2.2)') sig,d
1073 write(
mm,
'(F4.1)') m
1074 if(m.lt.9.95d0)
write(
mm,
'(I1,F3.1)') 0,m
1075 write(
wdmmm2,
'(A3,A5,A4,A7)') dd,
'°',
mm,
'’'
1093 real(
double),
intent(in) :: angle
1095 character ::
wddd2*(10),sig
1104 write(
wddd2,
'(A1,F4.1,A5)') sig,a,
'°'
1105 if(a.lt.9.95d0)
write(
wddd2,
'(A1,I1,F3.1,A5)') sig,0,a,
'°'
1129 real(
double),
intent(in) :: angle
1132 character ::
ams*(8),
mm*(2),ss*(4)
1137 s = (a-m/60.d0)*3600.d0
1139 write(
mm,
'(I2.2)') m
1140 write(ss,
'(F4.1)') s
1142 if(nint(s*10).lt.100)
write(ss,
'(A1,F3.1)')
'0',s
1143 write(
ams,
'(A2,A1,A4,A1)')
mm,
"'",ss,
'"'
1161 real(
double),
intent(in) :: angle
1164 character ::
ams2*(9),
mm*(2),ss*(4),sig
1176 s = (a-m/60.d0)*3600.d0
1178 write(
mm,
'(I2.2)') m
1179 write(ss,
'(F4.1)') s
1180 if(s.lt.9.95)
write(ss,
'(A1,F3.1)')
'0',s
1181 write(
ams2,
'(A1,A2,A1,A4,A1)') sig,
mm,
"'",ss,
'"'
1199 real(
double),
intent(in) :: angle
1202 character ::
amss*(9),
mm*(2),ss*(5)
1207 s = (a-m/60.d0)*3600.d0
1209 write(
mm,
'(I2.2)') m
1210 write(ss,
'(F5.2)') s
1211 if(s.lt.9.995d0)
write(ss,
'(A1,F4.2)')
'0',s
1212 write(
amss,
'(A2,A1,A5,A1)')
mm,
"'",ss,
'"'
1230 real(
double),
intent(in) :: angle
1233 character ::
ass*(5)
1238 s = (a-m/60.d0)*3600.d0
1240 write(
ass,
'(F4.1,A1)') s,
'"'
1264 real(
double),
intent(in) :: angle
1267 character ::
wams*(20),
mm*(2),ss*(4)
1272 s = (a-m/60.d0)*3600.d0
1274 write(
mm,
'(I2.2)') m
1275 write(ss,
'(F4.1)') s
1277 if(nint(s*10).lt.100)
write(ss,
'(A1,F3.1)')
'0',s
1278 write(
wams,
'(A2,A7,A4,A7)')
mm,
'’',ss,
'”'
1296 real(
double),
intent(in) :: angle
1299 character ::
wams2*(21),
mm*(2),ss*(4),sig
1311 s = (a-m/60.d0)*3600.d0
1313 write(
mm,
'(I2.2)') m
1314 write(ss,
'(F4.1)') s
1315 if(s.lt.9.95)
write(ss,
'(A1,F3.1)')
'0',s
1316 write(
wams2,
'(A1,A2,A7,A4,A7)') sig,
mm,
"’",ss,
'”'
1334 real(
double),
intent(in) :: angle
1337 character ::
wamss*(21),
mm*(2),ss*(5)
1342 s = (a-m/60.d0)*3600.d0
1344 write(
mm,
'(I2.2)') m
1345 write(ss,
'(F5.2)') s
1346 if(s.lt.9.995d0)
write(ss,
'(A1,F4.2)')
'0',s
1347 write(
wamss,
'(A2,A,A5,A)')
mm,
"’",ss,
'”'
1365 real(
double),
intent(in) :: angle
1368 character ::
wass*(11)
1373 s = (a-m/60.d0)*3600.d0
1375 write(
wass,
'(F4.1,A7)') s,
'”'
Procedures to convert angles to formatted text strings.
pure character function, dimension(10) wddd2(angle)
Print angle as dd.d string, HTML version input in rad, output between -99.9 and +99....
pure character function, dimension(9) dmmm2(angle)
Print angle as dd:mm.m string, input in rad, output between -99 and +99 !!!
pure character function, dimension(7) prs(angle)
Print separation angle (>0) as ddd.mm or mm.ss string, input in rad.
pure character function, dimension(19) wdmmm2(angle)
Print angle as dd:mm.m string, HTML version. Input in rad, output between -99 and +99 !...
pure character function, dimension(18) wdm2(angle)
Print angle as ddd.mm string, input in rad, output between -180 and +180 with ° and ’.
pure character function, dimension(11) wass(angle)
Print angle as a string of ss.s", input in rad - HTML version of ass()
pure character function, dimension(25) wd1ms2(angle)
Print angle as d.mm.ss string, input in rad, output between -9 and +9 - HTML version of d1ms2.
pure character function, dimension(8) ams(angle)
Print angle as mm:ss.s string, input in rad.
pure character function, dimension(10) dms(angle)
Print angle as ddd.mm.ss string, input in rad - See wdms() for HTML version.
pure character function, dimension(29) wdmss(angle)
Print angle as ddd.mm.ss.ss string, input in rad with °, ’ and ” - HTML version of dmss()
pure character function, dimension(21) wamss(angle)
Print angle as HTML mm:ss.ss string, input in rad - HTML version of amss()
pure character function, dimension(27) wdms2(angle)
Print angle as dms string, input in rad, output between -180 and +180 with °, ’ and ” - HTML ver...
pure character function, dimension(26) wddms2(angle)
Print angle as dd.mm'ss" string, input in rad, output between -99 and +99 with °,...
pure character function, dimension(17) wdm(angle)
Print angle as ddd:mm string, input in rad with ° and ’ - HTML version of dm()
pure character function, dimension(21) wams2(angle)
Print angle as mm'ss.s" string, input in rad - html version of ams2()
pure character function, dimension(9) d1ms2(angle)
Print angle as d.mm.ss string, input in rad, output between -9 and +9 !!!
pure character function, dimension(14) dmss2(angle, nosymbols)
Print angle as dms.ss string, input in rad, output between -180 and +180.
pure character function, dimension(9) amss(angle)
Print angle as mm:ss.ss string, input in rad.
pure character function, dimension(8) dm2(angle)
Print angle as ddd.mm string, input in rad, output between -180 and +180.
pure character function, dimension(7) dm(angle)
Print angle as ddd:mm string, input in rad.
pure character function, dimension(13) dmss(angle)
Print angle as a ddd.mm.ss.ss string, input in rad.
pure character function, dimension(6) ddd2(angle)
Print angle as dd.d string, input in rad, output between -99.9 and +99.9 !!!
pure character function, dimension(9) ams2(angle)
Print angle as mm:ss.s string, input in rad.
pure character function, dimension(11) dms2(angle)
Print angle as dms string, input in rad, output between -180 and +180 - See wdms2() for HTML version.
pure character function, dimension(20) wams(angle)
Print angle as mm'ss.s" string, input in rad; HTML version of ams()
pure character function, dimension(30) wdmss2(angle)
Print angle as ddd.mm.ss.ss string, input in rad, output between -180 and +180 with °,...
pure character function, dimension(10) ddms2(angle)
Print angle as dd.mm.ss string, input in rad, output between -99 and +99 - See wddms2() for HTML vers...
pure character function, dimension(5) ass(angle)
Print angle as a string of ss.s", input in rad.
pure character function, dimension(12) dmmmmm2(angle, nosymbols)
Print angle as dd:mm.mmm string (for gps), input in rad, output between -180 and +180 !...
pure character function, dimension(7) dmm2(angle)
Print angle as dd.mm string, input in rad, output between -99 and +99 !!!
pure character function, dimension(26) wdms(angle)
Print angle as ddd.mm.ss string, input in rad with °, ’ and ” - HTML version of dms()
pure character function, dimension(17) wdmm2(angle)
Print angle as dd.mm string, HTML version input in rad, output between -99 and +99 !...
Procedures to handle angles.
pure real(double) function rev2(ang)
Returns angle in radians between -pi and pi.
pure real(double) function rev(ang)
Returns angle in radians between 0 and 2pi.
Provides all constants in the library, and routines to define them.
real(double), parameter, public r2d
Radians to degrees.
real(double), parameter, public mm
millimeter in cgs (cm)
Provides kinds and related constants/routines.
integer, parameter double
Double-precision float. Precision = 15, range = 307.