FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::field::Feature Struct Reference

#include <ParametricScalarField.h>

Public Attributes

FeatureType type = FeatureType::GaussianBlob
 Which shape to evaluate.
 
std::array< double, 3 > centre {0.0, 0.0, 0.0}
 
std::array< double, 3 > sigma {1.0, 1.0, 1.0}
 
double headingRad = 0.0
 
double cosHeading = 1.0
 
double sinHeading = 0.0
 sin(headingRad); filled with cosHeading.
 
double amplitude = 0.0
 Peak contribution of the feature, in the field's unit.
 
double width = 1.0
 

Detailed Description

One analytic contribution added on top of a ParametricScalarField background.

Which members are read depends on type; the rest are ignored. The struct is kept flat and non-polymorphic on purpose: features are evaluated in the echosounder's inner loop, of the order of 1200 evaluations per ping, and the set of shapes is closed.

Member Data Documentation

◆ centre

std::array<double, 3> marenv::field::Feature::centre {0.0, 0.0, 0.0}

GaussianBlob: centre [north, east, vertical] [m]. HorizontalFront: only [0] and [1] are used, as the front origin. DepthBand: only [2] is used, as centre_z. The vertical entry follows the field's ZReference.

◆ cosHeading

double marenv::field::Feature::cosHeading = 1.0

cos(headingRad) and sin(headingRad); the ParametricScalarField constructor fills them, so a query computes no trigonometry. A hand-built Feature need not set them.

◆ headingRad

double marenv::field::Feature::headingRad = 0.0

Heading [rad], measured from North (x) toward East (y). A GaussianBlob is rotated by it; a HorizontalFront runs along it and varies across it.

◆ sigma

std::array<double, 3> marenv::field::Feature::sigma {1.0, 1.0, 1.0}

GaussianBlob: standard deviations [along heading, across heading, vertical] [m]. DepthBand: only [2] is used, as sigma_z. All used entries must be positive.

◆ width

double marenv::field::Feature::width = 1.0

HorizontalFront: transition half-width [m]. Must be positive. The contribution reaches 0.96 * amplitude at two widths from the origin.


The documentation for this struct was generated from the following file: