FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
SeineOperation Class Reference
+ Inheritance diagram for SeineOperation:
+ Collaboration diagram for SeineOperation:

Public Member Functions

 SeineOperation (std::string simObjectName, ISimObjectCreator *creator)
 The constructor sets the pointer to the output object and the parser object.
 
 ~SeineOperation ()
 The destructor cleans up.
 
void CalcOutput (const double dT, const double *const adX)
 Performs calculations common to several output ports.
 
void CalcOutput2 (const double dT, const double *const adX)
 
void CalcOutputCommon (const double dT, const double *const adX) const
 
void CalcOutput2Common (const double dT, const double *const adX) const
 
virtual void OdeFcn (const double dT, const double *const adX, double *const adXDot) const
 Calculates the state derivatives.
 
virtual void FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const creator)
 
void PreOdeFcn (double T, const double *X) override
 Latches the buoy at the vessel position of a step that starts in Phase_NotSet.
 
void AcceptedStep (const double dT, const double *const adX) override
 
virtual const double * WarpConnected (const double dT, const double *const adX)
 
virtual const double * BuoyPos (const double dT, const double *const adX)
 
virtual const double * VesselHeading (const double dT, const double *const adX)
 
virtual const double * VesselSpeed (const double dT, const double *const adX)
 
virtual const double * PWarpLength (const double dT, const double *const adX)
 
virtual const double * SWarpLength (const double dT, const double *const adX)
 

Protected Types

enum  EPhase_t {
  Phase_NotSet = 0 , Phase_SetFirstLeg , Phase_SetNet , Phase_SetSecondLeg ,
  Phase_Towing , Phase_Hauling , Phase_Finished
}
 Enumerator to define which operational phase the vessel is in.
 

Protected Member Functions

void ReadTensionFilter (ISimObjectCreator *const creator)
 Reads TensionFilterTimeConstant, or the old per-step TensionFilterConstant, and reports a bad or doubled setting.
 
double TensionFilterWeight (const double dT) const
 The weight of the measurement taken at the accepted step dT.
 
void ReadWarpAttractorName (ISimObjectCreator *const creator)
 Reads the warp attractor name from AttractorNameWarp, or from its old name AttractorNameWarps.
 
void CheckSchedule (ISimObjectCreator *const creator) const
 Refuses a schedule that cannot run: a speed that is zero or not a number, MinWarpLength above WarpLength.
 
EPhase_t PhaseAt (const double dT) const
 

Static Protected Member Functions

static double NetAttractorStrengthAt (const double dT)
 The relative strength of the net attractor at time dT: 101 at t = 0, falling linearly to 1 at 5 s. Relative to t = 0, not TStart (FISH-0120).
 

Protected Attributes

ISignalPort * m_inVesselPos
 
ISignalPort * m_inPBridleTension
 
ISignalPort * m_inSBridleTension
 
ISignalPort * m_inNetSWingPos
 
ISignalPort * m_inNetPWingPos
 
ISignalPort * m_inNetVel
 
ISignalPort * m_inPBridlePos
 
ISignalPort * m_inSBridlePos
 
ICommonComputation * m_commonCalc
 Calculations necessary for more than one output port.
 
ICommonComputation * m_commonCalc2
 
double m_vesselHeading [7]
 
double m_vesselSpeed [7]
 
double m_phaseStartTime [7]
 
double m_buoyPos [3]
 
double m_initialSpeed
 
double m_setSpeed
 
double m_towSpeed
 
double m_haulSpeed
 
double m_finishedSpeed
 
double m_winchHaulSpeed
 
double m_initialHeading
 
double m_towHeading
 
double m_spreadAngle
 
double m_setWarpLength
 
double m_outPWarpLength
 
double m_outSWarpLength
 
double m_addedTrackLength
 
double m_towTime
 
double m_minWarpLength
 
std::string m_attractorNameNet
 
std::string m_attractorNameWarp
 
std::string m_phase [7]
 
std::string m_speed [7]
 
std::string m_heading [7]
 
AttractorNetBin * m_attractorNet
 
double m_wingSpread
 
double m_netTangentialSpeed
 
double m_netNormalSpeed
 
double m_fileWritePeriod
 
double m_bridleTension [2]
 
double m_bridleSpread
 
bool m_outputToFile
 
sfh::timers::StopWatch m_StopWatchFileWrite
 
std::ofstream m_Outfile
 
std::string m_fileName
 
double m_tensionFilterValue [2]
 
double m_tensionFilterTimeConstant
 TensionFilterTimeConstant [s].
 
double m_tensionFilterStepWeight
 TensionFilterConstant, used when m_tensionFilterPerStep.
 
bool m_tensionFilterPerStep
 Only the old TensionFilterConstant was given: a weight per accepted step.
 
bool m_hasTensionSample
 A measurement has been filtered.
 
double m_lastTensionTime
 The time of the last accepted step [s].
 
bool m_showStatus
 ShowStatus: the status lines are shown on the HUD.
 

Static Protected Attributes

static constexpr double kDefaultTensionFilterTimeConstant = 10.0
 The time constant when neither TensionFilterTimeConstant nor TensionFilterConstant is given [s].
 
static constexpr double kWarpConnectedValues [2] = {0.0, 1.0}
 The values of the WarpConnected port: not connected, connected.
 

Member Function Documentation

◆ ReadTensionFilter()

void SeineOperation::ReadTensionFilter ( ISimObjectCreator *const  creator)
protected

The operational phase at time dT, from the phase schedule alone: every port reads the same phase at the same time, on any thread and in any order (FISH-0104).

Member Data Documentation

◆ m_buoyPos

double SeineOperation::m_buoyPos[3]
protected

The vessel position at the start of the last step that starts in Phase_NotSet. Only PreOdeFcn writes it, between the steps, so no port reads it while it changes.


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