|
FhSim
3.1.0
Marine systems simulation
|
Perform trigonometric function, such as sin, arcsin, arctan2, etc.
Collaboration diagram for Trigonometric:Perform trigonometric function, the trigonometric object is defined through its parameters, which give the port widths and the kind of trigonometric function (sin, arcsin, cos, arccos, tan, arctan, arctan2, repro). An argument outside the domain of the function (arcsin of 2, repro of 0) gives inf or NaN, which the engine's NaN check stops.
| Function | Input ports | Input name |
|---|---|---|
| Sine | 1 | sin |
| ArcSine | 1 | arcsin |
| Cosine | 1 | cos |
| ArcCosine | 1 | arccos |
| Tangent | 1 | tan |
| ArcTangent | 1 | arctan |
| Reciprocal | 1 | repro |
| Four quadrant arc tangent | 2 | arctan2 |
| Name | Width | Description |
|---|---|---|
| In | <PortWidth> | The input port for sin, asin, cos, arccos, tan, arctan, repro |
| In1 | <PortWidth> | The input port for arctan2; opposite side (y): angle = atan2(In1, In2) |
| In2 | <PortWidth> | The input port for arctan2; adjacent side (x) |
| Name | Width | Description |
|---|---|---|
| Out | <PortWidth> | The result of the trigonometric operation. |
| Name | Width | Description |
|---|---|---|
| PortWidth | 1 | The number of elements in the input and output ports. |
| TrigoFunc | - | Selection of trigonometric function, see table above. Required unless the legacy name <TrigonometricFunction> is given. Overrides <TrigonometricFunction> |
| TrigonometricFunction | - | Legacy name of <TrigoFunc>, used only when <TrigoFunc> is not given |
This SimObject contains no initial conditions.
This SimObject is referred to as Math/Trigonometric