Small vehicle tracking assignment

Status
Not open for further replies.

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
28,048
Reaction score
17,803
Hi guys. I have this assignment to do, it quite a small one. I think I may have to use a google maps API as it involves coordinates.

The basic idea is that a vehicle travels throughout a 5 hour period and every 10 minutes his GPS is logged and at the end of the entire trip, all the coordinates are calculated and a total distance needs to be displayed.

Having never done anything like this before, what would you guys suggest, using a Bing or Google API?

Any feedback appreciated. It's a small assignment and should take likely no longer than a few hours to do.
 
Looks like I may not need any API integration as coordinates are fairly standard.
 
As the crow flies or via the nearest roads?

If as the crow flies then you need neither as you can use trigonometry/Pythagoras triangle, because a degree, minute and second each approximate a distance

As the crow flies.

It looks like the global coordinates are fairly standardized so from one coordinate to another will always be a certain distance.

It looks like there is actually a pack for this.


 
Last edited:
Here is an interesting problem. I could use some help please from the more mathematically minded forumites which is not me!

The maximum range of the Latitude and Longitude is as such:

Latitude: -90, 90
Longitude: -180, 180


Now I have two text boxes on my razor view for latitude and longitude input. Now the maximum value I can enter into each text box is 999999999. But if I go over that I get blue screen death, cats and dogs living together, John Crichton going through wormhole chaos. I can however enter in a lot more with 0000000000012 interchangeably for eg.

GeoFinder.jpg

How I can I limit the actual value that is entered. My maths is catching up with me here.

These properties:

C#:
[Display(Name = "Latitude")]
[Required(ErrorMessage = "Latitude value required"), Range(-90, 90)]
public double? Lat { get; set; }

[Display(Name = "Longitude")]
[Required(ErrorMessage = "Longitude value required"), Range(-180, 180), ]
public double? Lon{ get; set; }
 
Status
Not open for further replies.
Top
Sign up to the MyBroadband newsletter
X