wasSharp – Diff between revs 14 and 27
?pathlinks?
Rev 14 | Rev 27 | |||
---|---|---|---|---|
Line 23... | Line 23... | |||
23 | var sourcePhi = Math.PI*sourceGeographicCoordinate.Latitude/180; |
23 | var sourcePhi = Math.PI * sourceGeographicCoordinate.Latitude / 180; |
|
24 | var targetPhi = Math.PI*targetGeographicCoordinate.Latitude/180; |
24 | var targetPhi = Math.PI * targetGeographicCoordinate.Latitude / 180; |
|
25 | var deltaPhi = Math.PI*(targetPhi - sourcePhi)/180; |
25 | var deltaPhi = Math.PI * (targetPhi - sourcePhi) / 180; |
|
26 | var deltaLam = Math.PI*(targetGeographicCoordinate.Longitude - sourceGeographicCoordinate.Longitude)/180; |
26 | var deltaLam = Math.PI * (targetGeographicCoordinate.Longitude - sourceGeographicCoordinate.Longitude) / 180; |
|
Line 27... | Line -... | |||
27 | |
- | ||
28 | |
27 | |
|
29 | var a = Math.Sin(deltaPhi/2)*Math.Sin(deltaPhi/2) + |
28 | var a = Math.Sin(deltaPhi / 2) * Math.Sin(deltaPhi / 2) + |
|
30 | Math.Cos(sourcePhi)*Math.Cos(targetPhi)* |
29 | Math.Cos(sourcePhi) * Math.Cos(targetPhi) * |
|
Line 31... | Line 30... | |||
31 | Math.Sin(deltaLam/2)*Math.Sin(deltaLam/2); |
30 | Math.Sin(deltaLam / 2) * Math.Sin(deltaLam / 2); |