Tom Wyant
and 1 contributors


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


 Query UTDF> load foo/
 0     Wed Apr  1 00:00:00 2009
 Query UTDF> select 100
 100   Wed Apr  1 00:01:40 2009
 Query UTDF> tracking_mode
 Query UTDF> exit


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:


This command prints the number of UTDF records currently loaded.


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


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


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.


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.


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.


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


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


Support is by the author. Please file bug reports at, or in electronic mail to the author.


Thomas R. Wyant, III wyant at cpan dot org


Copyright (C) 2010, 2012-2019 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 directory LICENSES.

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.