March 6th, 2013, 02:46 AM
Real time position calculation
I'm developing a small program that is supposed to simulate a plane flying and to show the position relative to a ground station on a gauge.
I wrote the code to draw the gauge with GDI, but I'm not sure how to calculate the position of the plane efficiently.
The plane position will be simply plotted on the form with a god's eye view.
My initial thought was to use a timer set to, say, 0.1s, and calculate how much the plane has moved by calculating the exact time difference between subsequent frames. I belive this method can be quite inefficient.
The second idea I had was to use XNA snd determine the movement in the update method. I consider this to be an overkill for the purpose of my program.
Click Here to Expand Forum to Full Width