@Override
    public void doWork()
    {
        if(CurrentPattern == null)
            return;
        
        try
        {
            switch(CurrentPattern)
            {
                case TestThread:
                {
                    TestThread();
                    break;
                }
                case HoverAndLand:
                {
                    HoverAndLand(5000);
                    break;
                }
                case RLBF:
                {
                    RLBF();
                    break;
                }
                case TagAlignment:
                {
                    TagAlignment = new TagAlignment(Drone);
                    TagAlignment.SetReferenceYaw(ReferenceYaw);
                    SetTagAlignmentLanding(false);
                    
                    Drone.getVideoManager().addImageListener(TagAlignment);
                    
                    
                    TagAlignment();
                    break;
                }
                case TagAlignmentLanding:
                {
                    TagAlignment = new TagAlignment(Drone);
                    Drone.getVideoManager().addImageListener(TagAlignment);
                    
                    TagAlignment.SetReferenceYaw(ReferenceYaw);
                    SetTagAlignmentLanding(true);
                    TagAlignment();
                    break;
                }
                case SpinLeftHover:
                {
                    SpinLeftHover();
                    break;
                }
                case SpinRightHover:
                {
                    SpinRightHover();
                }
                default:
                {
                    return;
                }

            }
        }
        catch(Exception e)
        {
            System.out.println("Pattern stopped: " + e);
        }
        
        Drone.getVideoManager().removeImageListener(TagAlignment);
        TagAlignment = null;
        
    }