Grid Point
- When accessing invalid grid points (e.g. outside the grid) produces an error. Invalid numerical values result in -88 [dB].
cna.grid.get(a,b) and cna.grid[{a,b}] return both a grid point object r. The second expression can both, read and write a numerical value. The value corresponds to the currently selected evaluation parameter (e.g. Ld).
cna.grid.lerp(a,b) starts a read bi-linear interpolation at the specified floating-point coordinate. Return -88 if the value is outside of the grid.
- The value of a grid point object can be used in conjunction with an index, with 1..4 representing the evaluation parameters and -1 representing the currently selected evaluation parameter:
cna.print(r[-1])
- The validity of the evaluation parameter can be checked using
r:valid(x)where x corresponds to the index above.
- Each grid point has the values x, y, row, col and ground, to read the X and Y coordinate of the center point, the row and column No. (from botton left corner, 0-based) and the ground height.
- The expression
cna.grid:all(c) will iterate across the grid. If c is not existing, is iterated over the grid row by row. Otherwise a string-integer pair is expected: The first part must be col for a column or row for a row, the second is a number within the aforementioned grid size. Example:
for r in cna.grid.all("col",1) do
cna.print(c[-1])
end