jeudi 5 mars 2015

python: area mapping using trigonometric circle


I have a car controlled by a raspberry pi, I would like to create maps to each place it visits. The solution I came up with is simple. Lets say you tell the car to go forward and then after 5 minutes you tell it to go right.


I have an accelerometer, that tells me the speed, i calculate the elapsed time and figure out the distance.


My question is how to save it as a map? I don't have an axis, therefore I can't say 4x 5y. I was thinking of using the trigonometry circle, 90 means forward, 270 means back and so on. Saved in SQLite + the time.


enter image description here


While that should work, is there a better solution to generate a map? can't use a gps since I'm working indoor. Using Python 2.x





Aucun commentaire:

Enregistrer un commentaire