Skip to content

Commit 260d8b4

Browse files
Guu-Chang YangGuu-Chang Yang
authored andcommitted
Added test cases for distance within 10, 50, and 150 meters
1 parent 3a18eee commit 260d8b4

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

tests/unit/cv/localization.cpp

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,62 @@ TEST(CVLocalization, DistanceAccuracy) {
212212
9333060,
213213
},
214214

215+
{
216+
// coordinate 9 (40.459N, 50.459E)
217+
// coordinate 10 (40.46N, 50.46E)
218+
// esitmitated distance from https://www.omnicalculator.com/other/latitude-longitude-distance is 139.72 m
219+
220+
"Coordinates of Distance 5",
221+
40.459,
222+
50.459,
223+
40.46,
224+
50.46,
225+
226+
139.72,
227+
},
228+
229+
{
230+
// coordinate 11 (50.1123N, 45.1234E)
231+
// coordinate 12 (50.11235N, 45.1234E)
232+
// esitmitated distance from https://www.omnicalculator.com/other/latitude-longitude-distance is 5.56 m
233+
234+
"Coordinates of Distance 6",
235+
50.1123,
236+
45.1234,
237+
50.11235,
238+
45.1234,
239+
240+
5.56,
241+
},
242+
243+
{
244+
// coordinate 13 (5.123N, 2.345E)
245+
// coordinate 14 (5.122N, 2.345E)
246+
// esitmitated distance from https://www.omnicalculator.com/other/latitude-longitude-distance is 111.2 m
247+
248+
"Coordinates of Distance 7",
249+
5.123,
250+
2.345,
251+
5.122,
252+
2.345,
253+
254+
111.2,
255+
},
256+
257+
{
258+
// coordinate 15 (5.123N, 2.345E)
259+
// coordinate 16 (5.1231N, 2.3452E)
260+
// esitmitated distance from https://www.omnicalculator.com/other/latitude-longitude-distance is 24.785 m
261+
262+
"Coordinates of Distance 8",
263+
5.123,
264+
2.345,
265+
5.1231,
266+
2.3452,
267+
268+
24.785,
269+
},
270+
215271
{
216272
// DUMMY TEST (the same coordinate)
217273
"DUMMY TEST",

0 commit comments

Comments
 (0)