-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122989/
-----------------------------------------------------------
Review request for Marble and Torsten Rahn.
Bugs: 345263
http://bugs.kde.org/show_bug.cgi?id=345263
Repository: marble
Description
-------
Objective : Integration of marble with haversine formula for calculation of
path distance .
Research: There are few method from which we can calculate distance between two
latitude and longitude point or we can say geographic coordinate . Some of the
method are given here
1. haversine method
2.Spherical Law of Cosines
3.Equirectangular approximation
4.Bearing
Choosing right Method
I choose haversine method because haversine formula calculate the
great-circle distance between two points – that is, the shortest distance over
the earth’s surface – giving an ‘as-the-crow-flies’ distance between the points
(ignoring any hills ) and remains particularly well-conditioned for numerical
computation even at small distances’ – unlike calculations based on the
spherical law of cosines
Distance calculation using the 'haversine' formula which is basically calculate
the shotrtest distance between two point in earth surface
Haversine A = sin²(??/2) + cos ?1 ? cos ?2 ? sin²(??/2) ;
c = 2 ? atan2( ?A, ?(1?A) )
d = R ? c
A= is the square of half the chord length between the points.
R=mean radius of earth =6371
c =is the angular distance in radians
solution.
1). First of all we make function to calculate the distance between two point
eg. pointdistance( lon, lat , lon1, lat1)
2)After we call this pointdistace() function in the fuction pathdistance() and
pass the value of parameter and calculate the distance iterative.
eg. Pathdistance(){
for size of the vector -1 {
distance +=pointdistance( lon, lat , lon1, lat1);
}
}
Diffs
-----
src/plugins/render/annotate/EditPolylineDialog.h 4d383b8
src/plugins/render/annotate/EditPolylineDialog.cpp a99a3e9
Diff: https://git.reviewboard.kde.org/r/122989/diff/
Testing
-------
yes tested with the google map and the distance coming from the google map and
our marble are same :)
Thanks,
hardik beladiya
_______________________________________________
Marble-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/marble-devel