FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
ValuesDisplay

Displaying signal values as a billboard.

+ Collaboration diagram for ValuesDisplay:
Author
Karl-Johan Reite
Date
29.11.2013 KJR: Initial version.

Example configuration excerpt

<Lib LibName = "fishery"
SimObject = "Trawl/ValuesDisplay"
Name = "Display"
FilterFrames = "30"
DisplayBox = "0, 20, 0.6, 0.12"
Material = "gray32"
Signal1 = "1,Roll angle,{:4.1f},deg,57.4"
Signal2 = "1,Control signal,{:4.1f},m/s"
Signal3 = "3,Crowfoot.LineForce1,[{:4.1f} {:4.1f} {:4.1f}],kN,0.001"
/>
</Lib Libname = "fishery"
SimObject = "Trawl/Crowfoot"
Name = "CrowFoot"
NumLines = "3"
/>
...

Input Ports

Name Width Description
In1...In<N> <size of Signal<N>> The input signals, one port per Signal<N> parameter, with the width given as the first element of that parameter.
Note
Everything this simObject does is compiled only when FH_VISUALIZATION is defined. In a headless build the object constructs, reads no parameters and registers no ports, so an input file declaring it still loads, but a connection to In<N> refers to a port that does not exist in that build.

Configuration parameters

Name Width Description
FilterFrames 1 The number of visual frames to filter the output, using a FIR filter
DisplayBox 4 The x and y position for upper left corner, widt and heigth in ratio of screen size
Material 1 The material to use as background. The default is transparent.
Signal<N> Signal size prefix string, value format, suffix string (typically unit) and optionally a multiplier factor. The number of signals is the number of consecutively numbered Signal<N> parameters supplied (Signal1, Signal2, ...); a gap in the numbering ends the list.

Initial conditions

This simobject has no initial conditions.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName = "environment"
SimObject = "Environment"
Name = "Environment"
Waves.NumWaves = "0"
Bathymetry.Depth = "190"
Current.Model = "Constant"
Current.Vector = "1, 0, 0"
/>
<Lib
LibName = "fishery"
SimObject = "Trawl/ValuesDisplay"
Name = "Display"
FilterFrames = "30"
DisplayBox = "0, 20, 0.6, 0.12"
Material = "gray32"
Signal1 = "3,Pos,[{:.2f} {:.2f} {:.2f}],m"
Signal2 = "3,Vel,[{:.2f} {:.2f} {:.2f}],m/s"
/>
<Lib
LibName = "fishery"
SimObject = "Trawl/CenterWeight"
Name = "CenterWeight"
Mass = "1000"
Material = "Simple/Green"
Density = "7500"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
CenterWeight.Force1 = "10,10,10"
CenterWeight.Force2 = "10,10,10"
CenterWeight.Force3 = "10,10,10"
Display.In1 = "CenterWeight.Pos"
Display.In2 = "CenterWeight.Vel"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
CenterWeight.Pos = "0,0,-5"
CenterWeight.Vel = "0,0,0"
/>
</INITIALIZATION>
<SIMULATION>
<Timing TStart="0" TEnd="30"/>
<Integrator Method="RK45_i" LogStates="0" UseRSSNorm="0">
<StepControl StepMax="0.1" StepMin="1E-060" AbsTol="0.001" RelTol="0.001"/>
</Integrator>
<!-- TODO migrate_v3: FileOutput="objects:all" -> configure via <OBSERVERS> section -->
</SIMULATION>
</Contents>

This SimObject is referred to as Trawl/ValuesDisplay