NAME

query_utdf - Ad-hoc query of data in a UTDF file.

SYNOPSIS

query_utdf
Query UTDF> load foo/utdf.data
653
0     Wed Apr  1 00:00:00 2009
Query UTDF> select 100
100   Wed Apr  1 00:01:40 2009
Query UTDF> tracking_mode
automatic
Query UTDF> exit

DETAILS

This script implements a simple interactive query of a UTDF file. The operating philosophy is that there is at (almost) all times a current UTDF record. Any Astro::UTDF method can be called on that record simply by giving the method name. If the method takes arguments they can be specified as well.

Besides the Astro::UTDF methods, a number of additional commands have been provided:

count

This command prints the number of UTDF records currently loaded.

exit

This command terminates the script. End-of-file also works.

help

Display this documentation. help utdf displays the documentation for Astro::UTDF.

list

This command lists data from the file. It takes any number of arguments. An argument that is entirely numeric (e.g. 42) specifies the number of a record to list. An argument that is two numeric strings separated by a dash (e.g. 86-99) specifies a range of records to list. Any other argument specifies the name of a field to list. For example,

list 150 100-120 measurement_time azimuth elevation

Lists the measurement_time, azimuth, and elevation from record 150 and records 100 through 120, in that order.

Record numbers referring to non-existent records will be ignored. Non-existent fields will cause the command (though not the script) to die horribly.

The range defaults to the current record, and the list of fields defaults to measurement_time.

load

This command loads the file named in the command, replacing the previously-loaded file if any. If the file contains any records, record 0 is selected.

next

This command selects the next record. Optionally you can specify a number, either positive or negative, and the selection will be moved that amount. For example, if record 1 is selected, next 3 will select record 4, and next -1 will select record 0.

select

This command selects the record at the given index, which defaults to 0. Negative indices select from the end.

system

This command issues a system command. You can use '!' as a synonym.

SUPPORT

Support is by the author. Please file bug reports at https://github.com/trwyant/perl-Astro-UTDF/issues or in electronic mail to the author.

AUTHOR

Thomas R. Wyant, III harryfmudd at comcast dot net

COPYRIGHT AND LICENSE

Copyright (C) 2010, 2012-2023, 2026 Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the files LICENSE-Artistic and LICENSE-GPL.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.