#7765 Well Log Curves : Improve handling of units

This commit is contained in:
Magne Sjaastad
2021-06-09 14:51:26 +02:00
parent be160a9fe6
commit 8259220abd
11 changed files with 84 additions and 49 deletions

View File

@@ -194,6 +194,52 @@ QString RiaDefines::mockModelBasicInputCase()
return "Input Mock Debug Model Simple";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaDefines::DepthUnitType RiaDefines::fromEclipseUnit( EclipseUnitSystem eclipseUnit )
{
switch ( eclipseUnit )
{
case RiaDefines::EclipseUnitSystem::UNITS_METRIC:
return DepthUnitType::UNIT_METER;
break;
case RiaDefines::EclipseUnitSystem::UNITS_FIELD:
return DepthUnitType::UNIT_FEET;
break;
case RiaDefines::EclipseUnitSystem::UNITS_LAB:
break;
case RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN:
break;
default:
break;
}
return DepthUnitType::UNIT_NONE;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaDefines::EclipseUnitSystem RiaDefines::fromDepthUnit( DepthUnitType depthUnit )
{
switch ( depthUnit )
{
case RiaDefines::DepthUnitType::UNIT_METER:
return RiaDefines::EclipseUnitSystem::UNITS_METRIC;
break;
case RiaDefines::DepthUnitType::UNIT_FEET:
return RiaDefines::EclipseUnitSystem::UNITS_FIELD;
break;
case RiaDefines::DepthUnitType::UNIT_NONE:
break;
default:
break;
}
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------