::hwat::utils:: ReadTargetLocationCSVFile

Returns the data in a 201 Head Target Location CSV file.

Syntax

::hwat::utils:: ReadTargetLocationCSVFile filenamewithpath

Arguments

filenamewithpath
The name of the CSV file.

Returns

Success
A Tcl list of the form target location, X coordinate, Y coordinate, Z coordinate, minimum horizontal angle, horizontal angle, maximum horizontal angle, minimum vertical angle, vertical angle, maximum vertical angle
Failure
{}

Example

::hwat::utils:: ReadTargetLocationCSVFile "D:/hwatfiles/target.csv"

Comments

Format requirements are:
  1. Each value should be separated by comma ",".
  2. There should be at least 10 values in each line. If fewer values are present, that line is invalid. If more than 10 values are present in a line, the first 10 values are considered and remaining are discarded.
  3. If any line data is invalid, this function skips that line and proceeds with the parsing of the next line.
  4. There should be at least 1 valid data line. Otherwise, function returns {}.
  5. Skips all lines, started with #. These lines are comment lines.