referring more particularly to fig1 - 4 , wherein like numbers refer to similar parts , a linear motion sensor 20 is shown in fig1 . the linear motion sensor 20 is comprised of a magnetic field sensor 22 which senses magnetic field strength and polarity which is moved along a symmetry axis 24 of an array 26 of four symmetrically arranged magnets 28 , 30 , 32 , and 34 . each of the magnets is arranged in one of the four quadrant of a rectangle 36 . each magnet 28 , 30 , 32 , and 34 is in the shape of a staircase having at least two steps , a proximal step 38 with a pole surface 40 closest to the line of symmetry 24 , and a distal step 42 which is spaced further from the line of symmetry and has a pole surface 43 . axial spacing between the steps of each magnet defines a step side 45 . the four step sides 45 together define a smaller rectangle 49 having a center coincident with the center point 47 of the larger rectangle 36 that lies on the line of symmetry 24 . each magnet of the array of magnets 26 is arranged with a single n - s or s - n pole , as shown in fig1 . magnets 28 , 34 which are which lie along a first diagonal 44 of the rectangle 36 are arranged with the north pole facing the line of symmetry 24 . the magnets 32 , 30 which lie along a second diagonal 46 of the rectangle 36 are arranged with the south pole facing the line of symmetry 24 . the diagonals 44 , 46 cross at the center 47 of the rectangle 36 and the symmetry axis 24 passes through the center 47 bisecting angles formed between the diagonals . magnets 28 , 32 , which are arranged as mirror images with respect to the line of symmetry 24 , are arranged with unlike poles facing each other . furthermore , magnets 30 , 34 which are also arranged as mirror images with respect to the line of symmetry 24 , also are arranged with unlike poles facing each other ; however , the arrangement of the polls n - s is reversed with respect to the poll arrangement s - n of the magnets 28 , 32 . as shown in fig1 , the sensor 22 is moved along the line of symmetry 24 by either motion of the sensor or of the magnetic array 26 . the sensor 22 is preferably a hall effect sensor with onboard logic that can be programmed to adjust to the output of the hall affect device according to an onboard program . a suitable device is , for example , an hal 855 available from micronas gmbh of freiburg , germany . fig3 shows a graph 48 of a simulation of the output of the hall effect sensor as it is moved along the axis of symmetry 24 from one side to the other of the rectangle 36 of the magnetic array 26 . also illustrated in fig3 is a graph 50 of a simulation of the output of the hall effect sensor as it moves along the symmetry axis in an arrangement wherein the spacing of the magnets remains as illustrated in fig1 but the lower steps 42 of each magnet are completely eliminated . the graph 50 shows how the field strength increases as the sensor 22 approaches a point 52 of maximum field strength between opposed magnets 28 , 32 , and decreases as the sensor approaches the center 47 of the rectangle 36 . as the sensor 22 continues to move toward a point 55 of maximum field strength between opposed magnets 30 , 34 , the magnetic field continues to decrease because the opposed poles of the second pair of magnets 30 , 34 are reversed . the arrangement of magnets without a step illustrated by the graph 50 shows that such an arrangement is unsuitable for a linear transducer because the field strength remains essentially constant for a considerable distance on either side of the center 47 and thus magnetic field strength could not be used to accurately determine position along symmetry axis 24 . in the magnetic array 26 illustrated in fig1 , each magnet 28 , 30 , 32 , 34 has a step height of 4 mm as measured from a rear face 58 of each magnet . these distal steps 42 on the upper magnets 28 , 30 extend toward each other and define an upper gap 54 between magnets 28 , 30 above the axis of symmetry 24 , and centered above the center 47 of the rectangle 36 . the distal steps 42 the lower magnets 32 , 34 extend toward each other and define a lower gap 56 between the lower magnets 32 , 34 that is positioned below the center 47 of the rectangle 36 . as shown in fig3 , the graph 48 is very nearly linear between a point 60 between proximal steps 38 of the magnets 28 , 32 of fig1 and a point 62 between proximal steps 38 of magnets 30 , 34 . in particular , the slope of the magnetic field strength remains nearly constant as the sensor 22 crosses the center 47 and is between the upper gap 54 and the lower gap 56 . the magnet array 26 of fig1 provides a relatively steeply sloped linear change in magnetic field strength over a range of approximately 15 mm between point 60 and point 62 . a graph of magnetic field strength for a 2 mm step 64 , and a 5 mm step 66 are also shown in fig3 illustrating how step size can be varied to search for the most linear change in magnetic field strength within a magnet array similar to the array 26 shown in fig1 . any remaining nonlinearity of the magnetic field strength slope can be corrected for by programming nonvolatile memory , which forms a part of the programmable hall effect sensor 22 . thus the output of the hall effect sensor 22 may be read directly as linear position . of course inherent accuracy is lost if the slope of magnetic field strength at any point approaches zero . the four magnet array 26 also provides nearly constant magnetic field strength for small deviations from the symmetry axis 24 . fig4 shows a simulation of off - axis magnetic field strength for points on the graph 48 where the magnetic field strength is approximately 800 gauss . the graph 68 shows a slope of zero in the immediate vicinity of the symmetry axis 24 that remains small for approximately 0 . 5 mm on either side of the symmetry axis 24 . this is in contrast to a two magnetic array comprising , for example the lower magnets 32 , 34 of fig1 , where the graph 70 of the off axis change in magnetic field has a constant and relatively steep positive slope on either side of a line 72 in the same relative position as the symmetry axis 24 . the individual magnets 28 , 30 , 32 , 34 as shown in fig1 can employ pole pieces 78 which increase the strength of the magnetic fields generated by the magnets . because high - strength magnets are often made from relatively rare elements , the cost of the magnets can be reduced by decreasing the size of the magnets while maintaining the field strength through the use of the pole pieces 78 which are constructed from magnetically permeable material typically a low cost soft ferrous alloy . the pole pieces may be plates affixed to the rear surfaces 58 of each of the magnets 28 , 30 , 32 , 24 of the array 26 . an alternative embodiment linear motion sensor 74 can be constructed where each magnet of the array has with three or more steps , as shown in phantom lines in fig1 . in the alternative embodiment , a third step 76 is situated intermediate in distance from the symmetry axis 24 having a spacing between the proximal step 38 and the distal step 42 . the use of a third step 76 is advantageous when a linear motion sensor with a relatively long sensing distance is required , for example a sensor with a substantially linear change in magnetic field strength over a distance of 30 mm was constructed using an array of four three - step magnets . in the design of the linear motion sensor 20 the following design variables can be used to achieve a desired shape of a graph of magnetic field strength versus linear position : varying the size of the rectangle 36 which defines the position of the magnets ; varying the number of steps formed in each magnet and the distance each step is spaced from the symmetry axis ; varying the width of the step along the symmetry axis ; varying the width of the gap 54 , 56 formed between the magnets along the symmetry axis ; varying the type of magnetic material used in the size of the magnets ; and employing pole pieces . although generally the most linear graph of field strength versus distance is desired for uniform position sensing resolution , a magnetic field graph can vary significantly from the linear and still , by means of the programmable logic in the sensor , provide a linear output . in this arrangement , where the slope of the graph of magnetic field strength with respect to linear position is not constant , the variation in slope affects the inherent accuracy , which variation can be used to improve accuracy over a specific range by optimizing the magnets to have greater slope where greater resolution of linear position is desired , at the expense of somewhat lesser accuracy whether slope is less . in a practical application employing the sensor 20 , the four magnets 28 , 30 , 32 , 34 are mounted in a housing which is mounted for linear motion , and the hall effect sensor 22 is fixedly mounted to a circuit board , typically the housing containing the four magnets is mounted to travel on rails or some similar arrangement which constrains the symmetry axis 24 to move over the hall effect sensor 22 . it should be understood that the programmable sensor 22 includes a hall effect device or sensor element 80 within the sensor package . the device or sensor element 80 is arranged parallel to the axis of symmetry and parallel to the magnetic pole surfaces 40 such that the magnetic field lines between the magnets of the array 26 are perpendicular to the hall effect device . the sensing direction of the hall effect device or sensor element 80 is perpendicular to its sensor element , and thus it is sensitive to magnetic field strength in a direction perpendicular to the axis of symmetry 24 . it should also be understood that the processing of the signal from the hall effect device 80 may be done outside the package that houses the hall effect device . furthermore , it should be understood that other types of magnetic field sensors such as , for example , giant magnetoresistive ( gmr ) or anisotropic magneto - resistive ( amr ) sensors , with or without on - chip programmability could be used . in order to minimize the effect of external magnetic fields on the sensing system 20 , the magnetic field used by the sensor should be maximized because by utilizing the entire measurement range of the magnetic sensor , variation in the output of the sensor due to external magnetic noise is minimized . to minimize package size , magnets of high magnetic field strength may be used such as alnico ( an aluminum - nickel - cobalt alloy ), or samarium - cobalt ( smco ), and neodymium - iron - boron ( ndfeb ). each magnet 28 , 30 , 32 , 34 may be formed as a single piece or may be formed by combining magnets of simpler shape by , for example , bonding one rectangular magnet on to another . the pole surfaces 40 , 43 , while generally planar and parallel to each other and the symmetry axis 24 , may incorporate such slight variations as do not substantially affect the benefits described . it should be understood that where the claims refer to relationships as being “ substantially parallel ”, “ substantially aligned ”, etc ., it is meant to encompass such minor variations from a parallel state , alignment , etc . which still preserve the functionality of the device . the linear motion sensor 20 is designed to allow slight misalignments in the magnets in the sensor without introducing substantial errors in the output of the sensor . furthermore , using the onboard logic it is possible to calibrate each linear motion sensor by controlled actuation accompanied by programming of onboard logic to linearize the output of the magnetic field sensor 22 , taking into account the measured deviance from linearity due to geometry misalignment or variations in the magnetic fields of the magnets . it should be understood that the arrangement of four similar or identical magnets at the corners of a rectangle , wherein magnets positioned across from each other along the line of symmetry have opposed poles and magnets connected by a diagonal have the same pole facing the symmetry axis , need not be limited to magnets having a staircase shape facing the line of symmetry . thus the profile of the magnets , rather than having a staircase shape of two or more steps , can be a completely free variable that is optimized according to desired criteria of magnetic field strength along the axis of symmetry . it is understood that the invention is not limited to the particular construction and arrangement of parts herein illustrated and described , but embraces all such modified forms thereof as come within the scope of the following claims .