HTML automatically generated with rman
Table of Contents
tabdms - Convert to HMS/DMS tables
tabdms [parameter=value]
tabdms replaces selected column(s) from a table to their HMS/DMS
format.
Currently the format is fixed.
There is little controversie about
DMS, these are numbers between -180 or 180, or 0 to 360. In fact, the program
does not care about the absolute value, any number will do.
HMS is more
complicated, since the 24h system is used as well as the 360deg.
The
following parameters are recognized in any order if the keyword is also
given:
- in=
- input file name, an ascii table. No Default.
- out=
- output file
name, an ascii table. No Default.
- todms=
- list of columns (1..) to convert to
dms. Negative columns should be used if the format is to be interpreted
as ".DMS" instead of the default "D.MS". The D ins DMS is normally assumed
to be modulo 360. Default: none.
- tohms=
- list of columns (1..) to convert to
hms. Negative columns should be used if the format is to be interpreted
as ".HMS" instead of the default "H.MS". The H ins HMS is normally assumed
to be modulo 24. Default: none.
- fromhms=
- A list of columns (1..) to convert
from hms to degrees (or seconds) [none]
- fromhms=
- A list of columns (1..)
to convert from dms to seconds (or seconds) [none]
- separator=
- separator
between output D-M-S.S [Default: :]
- format=
- Format statement for columns
converted by fromhms= and fromdms= [Default: %g]
- scale=
- Scaling factor
applied to degrees. If you want seconds, use 3600 here. For radians, use
pi/180. [Default: 1]
The following example prints out the 4 possible
ways to convert the number "12.51" to DMS or HMS:
% echo 11.51 11.51 11.51 11.51 11.51 | tabdms - - todms=1,-2 tohms=3,-4
11:30:36.000 11:183:35:60.000 11:30:36.000 11:12:14:24.000 11.51
Column 1 in .DMS, 2 as D.MS, 3 as .HMS, 4 as H.MS and 5 is the original column
copied.
echo 12:00:00 12:00:00 | tabdms - - fromhms=1 fromdms=2
12 180
The code is compiled with a maximum number of columns, MAXCOL,
typically 256.
tabmath(1NEMO)
, nemoinp(1NEMO)
, nemoinpx(3NEMO)
src/kernel/tab/tabdms.c
source code
Peter Teuben
24-Jan-00 V0.4 doc written PJT
25-sep-13 V0.8 added fromdms= PJT
17-jul-20 clarifications PJT
Table of Contents