mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move rkbDiff calculation code to RigWellPath so it can be shared instead of copied.
This commit is contained in:
@@ -56,6 +56,32 @@ double RigWellPath::datumElevation() const
|
||||
return m_datumElevation;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigWellPath::rkbDiff() const
|
||||
{
|
||||
if (hasDatumElevation())
|
||||
{
|
||||
return datumElevation();
|
||||
}
|
||||
|
||||
// If measured depth is zero, use the z-value of the well path points
|
||||
if (m_wellPathPoints.size() > 0 && m_measuredDepths.size() > 0)
|
||||
{
|
||||
double epsilon = 1e-3;
|
||||
|
||||
if (cvf::Math::abs(m_measuredDepths[0]) < epsilon)
|
||||
{
|
||||
double diff = m_measuredDepths[0] - (-wellPathPoints()[0].z());
|
||||
|
||||
return diff;
|
||||
}
|
||||
}
|
||||
return HUGE_VAL;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user