Thursday, January 22, 2015

Returning to Python

My programming career started as a teenager in high school. Some of the first computer languages I learned were Turing and C, but that was only to satisfy the requirements in some of my courses. When I decided to pursue a programming career, I chose Python to harden my Computer Science concepts. I used it for about a year, completing assignments that I found online from other universities, and starting my own projects such as a web scraper and an email auto-responder. It has been a few years since I have really gotten back into using Python, and I'm finding it slightly difficult to avoid my C++ syntax.

Geometry

After mastering high school Calculus and experiencing the torture of Engineering Calculus AB at the University of Toronto, I have yet to take full advantage of my knowledge in Math, and my skills are getting a bit rusty.

In order to calculate the velocity using 2 points on a map, we need to find the displacement between the points and the timestamp given for each sample. I will leave the velocity in its X and Y components for simplicity and later calculations.

Map Coordinates

I would like to store map coordinates in time in seconds only, but online I could only find methods for converting between Latitude Longitude to Degrees Minutes Seconds (DMS).

However, according to the University of Nebraska Lincoln, I can easily multiply latitude and longitude by 3600 to get position in seconds.

1° = 60’ = 3600”

Total Seconds = 60(60degrees + minutes) + seconds
Total Seconds = 3600latitude
Total Seconds = 3600longitude

No comments:

Post a Comment