nevarmore
08-05-2004, 06:28 PM
What I'm working with involves gathering speed and distance information from a GPS device. To the layman, I'm using it to augment/check my cars speedometer and odometer.
At present my device outputs lat/long coordinates and ground speed. At present I'm only concerned about collecting the speed data and then calculating distance from that based on time.
What I need to do is multiply my speed (distance / time) by time to get distance. I am currently playing around with the DateTime class. I am used to time formats that I could do DateTime.Now - myStartTime = myElapsedTime where my Elapsed time is in milliseconds. However DateTime doesn't seem to work like this.
Do the DateTime.getHours, .getMilliseconds, getSeconds, etc functions return the total time in whatever units or do they only return the individual hours/minutes/seconds/milliseconds fields?
At present my device outputs lat/long coordinates and ground speed. At present I'm only concerned about collecting the speed data and then calculating distance from that based on time.
What I need to do is multiply my speed (distance / time) by time to get distance. I am currently playing around with the DateTime class. I am used to time formats that I could do DateTime.Now - myStartTime = myElapsedTime where my Elapsed time is in milliseconds. However DateTime doesn't seem to work like this.
Do the DateTime.getHours, .getMilliseconds, getSeconds, etc functions return the total time in whatever units or do they only return the individual hours/minutes/seconds/milliseconds fields?