Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Figure : 1,
 Database table
 
Vehicleid   Latitude    Longitude   datetime
1   16.43924553090  79.92235564210  2012-12-19 16:00:00.000
1   16.43517902890  79.92466106060  2012-12-19 16:02:00.000
1   16.43111252690  79.92498125760  2012-12-19 16:04:00.000
1   16.42797459620  79.92517337580  2012-12-19 16:06:00.000
2   14.68807134570  79.50083987840  2012-12-19 17:12:00.000
2   14.68514259410  79.51420230760  2012-12-19 17:14:00.000
3   18.56690251930  82.50047999880  2012-12-19 18:22:00.000
3   18.56884750210  82.50426359800  2012-12-19 18:24:00.000
 
Based on above figure1 (database table), how to calculate distance between starting and ending points by using c# .net  and also at the same time insert the starting( lat& long) and ending (lat & long) as well as strating time, ending time, distance values in another table like below table
 

Vehicleid   Starting(lat & long)    Ending (lat  & long)    Distance(in kms)    Strat time  End time
1   16.43924553090, 79.92235564210  16.43517902890,
79.92466106060  ?   2012-12-19 16:00:00.000 2012-12-19 16:02:00.000
1   16.43517902890,
79.92466106060  16.43111252690,
79.92498125760  ?   2012-12-19 16:02:00.000 2012-12-19 16:04:00.000
1   16.43111252690,
79.92498125760  16.42797459620,
79.92517337580  ?   2012-12-19 16:04:00.000 2012-12-19 16:06:00.000
Posted 31-Dec-12 2:00am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 230
2 BillWoodruff 205
3 Sergey Alexandrovich Kryukov 195
4 DamithSL 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,650
3 Kornfeld Eliyahu Peter 3,460
4 Sergey Alexandrovich Kryukov 2,811


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100