#ifndef jfxoffline_tools_distance
#define jfxoffline_tools_distance

#include <iostream>

#include "CoordSys.h"

using namespace jf;

int main(int argc, char** argv) {
    assert(argc == 5);
    std::string lon1 = argv[1];
    std::string lat1 = argv[2];
    std::string lon2 = argv[3];
    std::string lat2 = argv[4];
    double dlon1 = atof(lon1.c_str());
    double dlat1 = atof(lat1.c_str());
    double dlon2 = atof(lon2.c_str());
    double dlat2 = atof(lat2.c_str());
    double d = d_p(point(dlon1, dlat1, 0), point(dlon2, dlat2, 0));
    std::cout << d;
}

#endif