#include "string"
#include "iostream"
#include "fstream"
#include "iomanip"

using namespace std;

int main(int argc, char const *argv[])
{
    ifstream fin("stt1d_tri_cen.txt");
    ofstream fout("stt1d_tri_cen_IGRF_in.txt");

    double lon, lat;
    for (size_t i = 0; i < 81920; i++)
    {
        fin >> lon >> lat;
        if (lon < -180) lon = 180;
        if (lon > 180) lon = 180;
        if (lat < -90) lat = -90;
        if (lat > 90) lat = 90;
        fout << "2019,8,22 D K250 " << setprecision(12) << lat << " " << lon << "\n";
    }
    
    fin.close();
    fout.close();
    return 0;
}
