Programmable magnetostriction based linear position sensors