mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make azimuth in WBS plots continous in most cases
This commit is contained in:
parent
e41cadfa02
commit
ded7be1d73
@ -286,7 +286,7 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
|
||||
stabilityCurvesTrack->setVisibleXRange( 0.0, 2.5 );
|
||||
stabilityCurvesTrack->setColSpan( RimPlot::FIVE );
|
||||
stabilityCurvesTrack->setAutoScaleXEnabled( true );
|
||||
stabilityCurvesTrack->setTickIntervals( 0.5, 0.05 );
|
||||
stabilityCurvesTrack->setTickIntervals( 0.5, 0.1 );
|
||||
stabilityCurvesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
||||
stabilityCurvesTrack->setFormationWellPath( wellPath );
|
||||
stabilityCurvesTrack->setFormationCase( geoMechCase );
|
||||
@ -383,12 +383,12 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
|
||||
{
|
||||
minValue -= angleIncrement;
|
||||
}
|
||||
maxValue = cvf::Math::clamp( maxValue, angleIncrement, 360.0 );
|
||||
maxValue = cvf::Math::clamp( maxValue, angleIncrement, 720.0 );
|
||||
minValue = cvf::Math::clamp( minValue, 0.0, maxValue - 90.0 );
|
||||
}
|
||||
wellPathAnglesTrack->setColSpan( RimPlot::THREE );
|
||||
wellPathAnglesTrack->setVisibleXRange( minValue, maxValue );
|
||||
wellPathAnglesTrack->setTickIntervals( 90.0, 30.0 );
|
||||
wellPathAnglesTrack->setTickIntervals( 180.0, 45.0 );
|
||||
wellPathAnglesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
|
||||
wellPathAnglesTrack->setFormationWellPath( wellPath );
|
||||
wellPathAnglesTrack->setFormationCase( geoMechCase );
|
||||
|
@ -353,6 +353,7 @@ void RigGeoMechWellLogExtractor::wellPathAngles( const RigFemResultAddress& resA
|
||||
const double epsilon = 1.0e-6 * 360;
|
||||
const cvf::Vec3d trueNorth( 0.0, 1.0, 0.0 );
|
||||
const cvf::Vec3d up( 0.0, 0.0, 1.0 );
|
||||
double previousAzimuth = 0.0;
|
||||
for ( int64_t intersectionIdx = 0; intersectionIdx < (int64_t)m_intersections.size(); ++intersectionIdx )
|
||||
{
|
||||
cvf::Vec3d wellPathTangent = calculateWellPathTangent( intersectionIdx, TangentFollowWellPathSegments );
|
||||
@ -384,8 +385,18 @@ void RigGeoMechWellLogExtractor::wellPathAngles( const RigFemResultAddress& resA
|
||||
azimuth = azimuth + 360.0;
|
||||
}
|
||||
}
|
||||
// Make azimuth continuous in most cases
|
||||
if ( azimuth - previousAzimuth > 300.0 )
|
||||
{
|
||||
azimuth -= 360.0;
|
||||
}
|
||||
else if ( previousAzimuth - azimuth > 300.0 )
|
||||
{
|
||||
azimuth += 360.0;
|
||||
}
|
||||
|
||||
( *values )[intersectionIdx] = azimuth;
|
||||
previousAzimuth = azimuth;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user