public static Phasor parsePhasor(String ss){
                Phasor ph = new Phasor();
                ss = ss.trim();
                int anglePos = ss.indexOf('<');
                if(anglePos==-1){
                    anglePos = ss.indexOf('L');
                    if(anglePos==-1)throw new IllegalArgumentException("no angle symbol, <, in the string, ss");
                }
                int degPos = ss.indexOf('d');
                if(degPos==-1)degPos = ss.indexOf('D');
                int radPos = ss.indexOf('r');
                if(radPos==-1)degPos = ss.indexOf('R');
                String mag = ss.substring(0,anglePos);
                ph.magnitude = Double.parseDouble(mag);
                String phas = null;
                if(degPos!=-1){
                    phas = ss.substring(anglePos+1, degPos);
                    ph.phaseInDeg = Double.parseDouble(mag);
                    ph.phaseInRad = Math.toRadians(ph.phaseInDeg);
                }
                if(degPos==-1 && radPos==-1){
                    phas = ss.substring(anglePos+1);
                    ph.phaseInDeg = Double.parseDouble(phas);
                    ph.phaseInRad = Math.toRadians(ph.phaseInDeg);
                }
                if(radPos!=-1){
                    phas = ss.substring(anglePos+1, radPos);
                    ph.phaseInRad = Double.parseDouble(phas);
                    ph.phaseInDeg = Math.toDegrees(ph.phaseInRad);
                }
                ph.rectangular.polar(ph.magnitude, ph.phaseInRad);

                return ph;
        }