Cody

Problem 190. Great Circle Distance

Solution 1764496

Submitted on 27 Mar 2019 by Abdelfatah Teamah
• Size: 11
• This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(round(sphere_distance(100,10,50,-20,14)*10000)/10000,75.9097));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In sphere_distance (line 2) In ScoringEngineTestPoint1 (line 1) In solutionTest (line 3)]

2   Pass
assert(isequal(round(sphere_distance(6371e3,-97.7430608,30.267153,-74.0244265,40.6081588)*10000)/10000,2426004.8394));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In sphere_distance (line 2) In ScoringEngineTestPoint2 (line 1) In solutionTest (line 5)]

3   Pass
assert(isequal(round(sphere_distance(6371e3,-97.7430608,31.267153,-74.0244265,40.6081588)*10000)/10000,2364307.7819));

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In sphere_distance (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)]