tmp
This commit is contained in:
27
geomag70_linux/prepare_stt1d_obs.cpp
Normal file
27
geomag70_linux/prepare_stt1d_obs.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user