context("test-cal-gps-dist")
test_that("cal-gps-dist works", {
expect_equal(0, cal_gps_dist(121.434174,31.158213,121.434174,31.158213))
# 1.58km, earth two points distance
expect_equal(1.58, round(cal_gps_dist(121.434174,31.158213,121.444366,31.169403) / 1000, 2))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.