| Lines 3-4 were replaced by lines 3-4 |
| - * for [MA7] (horizontal field), the central field is in x direction |
| - * for [MA6], [MA09] and [MA15] (vertical field), the central field is in z direction |
| + * for [MA7] and [MA7] (horizontal field), the central field is in x direction |
| + * for [MA6], [MA09], [MA10], [MA15] and [MB11] (vertical field), the central field is in z direction |
| Lines 6-7 were replaced by lines 6-7 |
| - * a dipole approximation is used, therefore positions close to the magnet are not precise |
| - * for [MA02] and [MA11] we have no stray field numbers |
| + * a dipole approximation is used, therefore positions very close to the magnet might not be precise |
| + * for [MA02] we have no stray field numbers |
| Removed lines 44-47 |
| - if (fact*runit/r3 > 1) { |
| - errmsg("distance too low"); |
| - return; |
| - } |
| Line 51 was replaced by lines 47-48 |
| - console.log(xb,yb,horizontal); |
| + g5y = Math.pow(bb*10000./5.*runit*fact, 1.0/3); |
| + g5a = g5y * Math.pow(2,1.0/3) |
| At line 56 added 2 lines. |
| + g5x = g5a; |
| + g5z = g5y; |
| At line 60 added 2 lines. |
| + g5x = g5y; |
| + g5z = g5a; |
| Line 62 was replaced by line 63 |
| - prec = 4-bunit; |
| + prec = 5-bunit; |
| Line 66 was replaced by line 67 |
| - while (eps > 0.09 * b) { |
| + while (eps > 0.009 * b) { |
| At line 69 added 12 lines. |
| + if (runit == 1) { |
| + rprec = 2; |
| + } else { |
| + rprec = 0; |
| + } |
| + document.getElementById("g5x").innerHTML = g5x.toFixed(rprec); |
| + document.getElementById("g5y").innerHTML = g5y.toFixed(rprec); |
| + document.getElementById("g5z").innerHTML = g5z.toFixed(rprec); |
| + if (fact*runit/r3 > 1) { |
| + errmsg("distance too low"); |
| + return; |
| + } |
| Line 77 was replaced by lines 90-100 |
| - |
| + function turn(dim) { |
| + xp = parseFloat(document.getElementById("x").value); |
| + yp = parseFloat(document.getElementById("y").value); |
| + zp = parseFloat(document.getElementById("z").value); |
| + r = Math.sqrt(xp*xp+yp*yp+zp*zp); |
| + document.getElementById("x").value = "0"; |
| + document.getElementById("y").value = "0"; |
| + document.getElementById("z").value = "0"; |
| + document.getElementById(dim).value = r; |
| + calc(); |
| + } |
| Lines 88-92 were replaced by lines 111-123 |
| - <input type="radio" name=m onClick="mag(0,0.0064,6)"> MA6 |
| - <input type="radio" name=m onClick="mag(1,0.034,6.8)"> MA7 |
| - <input type="radio" name=m onClick="mag(0,0.030,9)"> MA09 |
| - <input type="radio" name=m onClick="mag(0,0.066,14.9)"> MA15 |
| - <input type="radio" name=m onClick="mag(0,0.0257,11)"> MA11ERC |
| + <!-- mag(h,f,b) |
| + h: 1/0 for horizontal/vertical |
| + f: stray field at 1 m perpendicular to field, when central field at max. |
| + b: max. field |
| + --> |
| + <input type="radio" name=m onClick="mag(0,0.0032,6)"> MA6 |
| + <input type="radio" name=m onClick="mag(1,0.017,6.8)"> MA7 |
| + <input type="radio" name=m onClick="mag(0,0.015,9)"> MA09 |
| + <input type="radio" name=m onClick="mag(0,0.012,10)"> MA10 |
| + <input type="radio" name=m onClick="mag(0,0.033,14.9)"> MA15 |
| + <input type="radio" name=m onClick="mag(1,0.0121,11)"> MA11 |
| + <input type="radio" name=m onClick="mag(0,0.0235,11)"> MB11 |
| + <p> |
| Line 95 was replaced by line 126 |
| - <td rowspan=9 valign=top><input type=button value=">" onClick="calc();"><div id=msg align=right></div></td> |
| + <td rowspan=9 valign=top><input type=button value=">" onClick="calc();"></td> |
| Lines 102-108 were replaced by lines 133-139 |
| - <tr><td></td><td>at position</td><td></td><td></td></tr><tr> |
| - <tr><td>x</td><td><input type=text id=x size=6 value="0" onChange="calc();"></td> |
| - <td>Bx=</td><td><div id=bx align=right></div></tr> |
| - <tr><td>y</td><td><input type=text id=y size=6 value="1" onChange="calc();"></td> |
| - <td>By=</td><td><div id=by align=right></div></td></tr> |
| - <tr><td>z</td><td><input type=text id=z size=6 value="0" onChange="calc();"></td> |
| - <td>Bz=</td><td><div id=bz align=right></div></td></tr> |
| + <tr><td colspan=2>position</td><td colspan=3><div id=msg align=left style='color: red;'></div></td><td>5 Gauss distance</td></tr><tr> |
| + <tr><td>x</td><td><input type=text id=x size=6 value="0" onChange="calc();"><input type=button value="turn to x" onClick="turn('x');"></td> |
| + <td>Bx=</td><td><div id=bx align=right></div></td><td></td><td>rx=<span id=g5x align=right></span></td></tr> |
| + <tr><td>y</td><td><input type=text id=y size=6 value="1" onChange="calc();"><input type=button value="turn to y" onClick="turn('y');"></td> |
| + <td>By=</td><td><div id=by align=right></div></td><td></td><td>ry=<span id=g5y align=right></span></td></tr> |
| + <tr><td>z</td><td><input type=text id=z size=6 value="0" onChange="calc();"><input type=button value="turn to z" onClick="turn('z');"></td> |
| + <td>Bz=</td><td><div id=bz align=right></div></td><td></td><td>rz=<span id=g5z align=right></span></td></tr> |