Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void settingActiveElementWell(TallySondeo tally, StatusWell currentStatus) {
- logger.debug("settingActiveElementWell");
- if (!tally.empty()){
- ElementWell last = HelperElementWell.lastElementSondeo(tally.getElements());
- if (last != null){
- ElementWell lastSecond = HelperElementWell.lastFromLastElement(tally.getElements(), ElementWellStatus.DRILLSTRING,
- last.getPosition());
- if (lastSecond == null){
- if (currentStatus.getDepthTool() > 0){
- last.setActive(Boolean.TRUE);
- currentStatus.setPositionActiveElementWell(last.getPosition());
- }else{
- last.setActive(Boolean.FALSE);
- currentStatus.setPositionActiveElementWell(0);
- }
- }
- else{
- if (last.getLengthKellyDown() >= currentStatus.getDepthTool() &&
- lastSecond.getLengthKellyDown() < currentStatus.getDepthTool()){
- last.setActive(Boolean.TRUE);
- currentStatus.setPositionActiveElementWell(last.getPosition());
- }else{
- last.setActive(Boolean.FALSE);
- currentStatus.setPositionActiveElementWell(0);
- }
- }
- }
- }
- logger.debug("position active " + currentStatus.getPositionActiveElementWell());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement