Coordinate Translation Functions
- Last UpdatedNov 24, 2023
- 2 minute read
|
coord_to_pos(Axis, Coord) |
||
|
Express a co-ordinate as a main axis position (FR or LP term). |
||
|
Input parameters: |
||
|
Axis |
short integer |
Main axis: |
|
1 = X (FR term) |
||
|
2 = Y (horizontal LP term) |
||
|
3 = Z (vertical LP term) |
||
|
Coord |
real |
The co-ordinate to be translated |
|
Returned value: |
||
|
[0] |
integer |
Result: |
|
0 = success, |
||
|
otherwise failure |
||
|
[1] |
short integer |
FR or LP number |
|
[2] |
real |
offset from the FR or LP number |
|
Exceptions: |
||
|
None |
||
|
pos_to_coord(Axis, No) |
||
|
Translate a FR or LP position to a co-ordinate. |
||
|
Input parameters: |
||
|
Axis |
short integer |
Main axis: |
|
1 = X (FR term) |
||
|
2 = Y (horizontal LP term) |
||
|
3 = Z (vertical LP term) |
||
|
No |
short integer |
The FR or LP number |
|
Returned value: |
||
|
[0] |
integer |
Result: |
|
0 = success, |
||
|
otherwise failure |
||
|
[1] |
real |
the translated co-ordinate |
|
Exceptions: |
||
|
None |
||
|
tra_coord_ship (Ucoord, Vcoord, Name) |
||
|
Get a coordinate in the ship coordinate system, from an earlier made indication in the picture. If the name of a panel is given, the point is calculated in the plane of the panel. If the name is empty, the plane of the view closest to the point given is used. |
||
|
Input parameters: |
||
|
Ucoord |
real |
U-coordinate of the point |
|
Vcoord |
real |
V-coordinate of the point |
|
Name |
string |
Name of panel defining the definition plane |
|
Returned value: |
||
|
[0] |
integer |
Result: |
|
0 = success, |
||
|
otherwise failure |
||
|
[1] |
real |
the resulting point, X-coordinate |
|
[2] |
real |
the resulting point, Y-coordinate |
|
[3] |
real |
the resulting point, Z-coordinate |
|
Exceptions: |
||
|
None |
||
|
tra_coord_pan (Ucoord, Vcoord, Name) |
||
|
Get a co-ordinate in the panel co-ordinate system from an earlier made indication in the picture. The name of the panel has to be supplied, as the point is expressed in the local co-ordinate system of that panel. |
||
|
Input parameters: |
||
|
Ucoord |
real |
U-coordinate of the point |
|
Vcoord |
real |
V-coordinate of the point |
|
Name |
string |
Name of panel defining the definition plane |
|
Returned value: |
||
|
[0] |
integer |
Result |
|
0 = success |
||
|
otherwise failure |
||
|
[1] |
real |
the resulting point, X-coordinate |
|
[2] |
real |
the resulting point, Y-coordinate |
|
[3] |
real |
the resulting point, Z-coordinate |
|
Exceptions: |
||
|
None |
||