position and direction tracking

Signed-off-by: keneo <bartek@szabat>