FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Camera view

A camera view the user can switch to: mounted on a body, or on a fixed post.

+ Collaboration diagram for Camera view:

Publishes a view to the visualization's camera (FhSim core ADR 0038): the key N cycles between the free camera and the views, FhSimUI's Camera menu lists them. The view is placed by the inputs Position (NED) and Euler (roll, pitch, yaw), with the camera at Offset on the body, turned by Heading and tilted by Pitch. Connect the inputs to a vessel's outputs and the camera rides along; give constants and it stands on a post. Needs an FhSim core with camera views (fhsim/visual/renderer/CameraViews.h); with an older one it publishes nothing and says so.

Example configuration excerpt

<Lib LibName = "fhsim_base" SimObject = "Camera/View" Name = "BridgeCam" Offset = "10, 0, -6" Pitch = "-5" FieldOfView = "55"/>
<Lib LibName = "fhsim_base" SimObject = "Camera/View" Name = "PenPost" Active = "1"/>
...
<Connection BridgeCam.Position = "Gunnerus.Pos" BridgeCam.Euler = "Gunnerus.EulerAnglesNED"
PenPost.Position = "-30, 0, 4" PenPost.Euler = "0, 0, 0"/>

Configuration parameters

Name Width Description
Offset 3 The camera's place on the body [m], in the body's frame (x forward, y starboard, z down). (Default: 0,0,0)
Heading 1 The camera turned from the body's x towards its y [deg]. (Default: 0)
Pitch 1 The camera tilted up from there [deg]. (Default: 0)
FieldOfView 1 Vertical field of view [deg]; 0: the free camera's. (Default: 0)
NearClip 1 Near clip distance [m]; 0: the free camera's. (Default: 0)
FarClip 1 Far clip distance [m]; 0: the free camera's. (Default: 0)
Active 1 1: the camera takes this view at the start. (Default: 0)

Input Ports

Name Width Description
Position 3 The body's origin [m], NED.
Euler 3 The body's roll, pitch and yaw [rad] (z-y-x).

Output Ports

This SimObject does not contain any outputs.

Initial conditions

This SimObject does not contain any initial conditions.

This SimObject is referred to as Camera/View