Table of Contents

Name

tabdms - Convert to HMS/DMS tables

Synopsis

tabdms [parameter=value]

Description

tabdms replaces selected column(s) from a table to their HMS/DMS format.

Currently the format is fixed.

Parameters

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]

Examples

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

Limitations

The code is compiled with a maximum number of columns, MAXCOL, typically 256.

See Also

tabmath(1NEMO) , nemoinp(1NEMO) , nemoinpx(3NEMO)

Files

src/kernel/tab/tabdms.c source code

Author

Peter Teuben

Update History


24-Jan-00    V0.4 doc written    PJT
25-sep-13    V0.8 added fromdms=    PJT


Table of Contents