Commit a563df01 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Modification du contenu des fichiers trace , suppression de...

Modification du contenu des fichiers trace , suppression de delta-latitude/longitude remplace par altitude et range, adaptation du programme trk2dt.cc, Reza 30/11/2018
parent c2439d46
......@@ -402,12 +402,11 @@ void SaveTrack(DateTime & dateobs, string & satname, SGP4 & sgp4, Observer & obs
<< RadiansToDegrees(obsgeo.latitude)<<" , "<<RadiansToDegrees(obsgeo.longitude) << endl;
ofs << "## Date Time UTC : yyyy-mm-dd hh:mm:ss.ssss "<<endl;
ofs << "## Satellite Azimuth and Elevation , corresponding Latitude and Longitude (in degrees)"<<endl;
ofs << "## DeltaLatitude,DeltaLongitude=Latitude,Longitude Satellite - Observatory (in degrees) "<<endl;
ofs << "## Date Time UTC Azimuth Elevation Latitude Longitude DeltaLatitude DeltaLongitude (Angles in degree)" << endl;
ofs << "## Date Time UTC Azimuth Elevation Range Latitude Longitude Altitude (Angles in degree, Range,Altitude in km)" << endl;
if (prtlev>1) {
cout << "#### Track for satellite : " << satname << " Date (yyyy/mm/dd): "
<< dateobs.Year()<<"/"<<dateobs.Month()<<"/"<<dateobs.Day()<<endl;
cout << "## Date/Time UTC Azimuth Elevation Latitude Longitude DeltaLatitude DeltaLongitude (Angles in degree)" << endl;
cout << "## Date Time UTC Azimuth Elevation Range Latitude Longitude Altitude (Angles in degree, Range,Altitude in km)" << endl;
}
DateTime datecur = datestart;
......@@ -421,15 +420,15 @@ void SaveTrack(DateTime & dateobs, string & satname, SGP4 & sgp4, Observer & obs
//...Convert satellite position to geodetic coordinates
CoordGeodetic geo = eci.ToGeodetic();
// Vector Vungeo = AzAlt2Vec(RadiansToDegrees(geo.longitude),RadiansToDegrees(geo.latitude));
ofs <<datecur<<" "<<setw(10)<<RadiansToDegrees(topo.azimuth)<<" "<<setw(10)<<RadiansToDegrees(topo.elevation)
ofs <<datecur<<" "<<setw(10)<<RadiansToDegrees(topo.azimuth)
<<" "<<setw(10)<<RadiansToDegrees(topo.elevation)<<" "<<setw(10)<<topo.range
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude)<<" "<<setw(10)<<RadiansToDegrees(geo.longitude)
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude-obsgeo.latitude)
<<" "<<setw(10)<<RadiansToDegrees(geo.longitude-obsgeo.longitude)<<endl;
<<" "<<setw(10)<<geo.altitude<<endl;
if (prtlev>1) {
cout <<datecur<<" "<<setw(10)<<RadiansToDegrees(topo.azimuth)<<" "<<setw(10)<<RadiansToDegrees(topo.elevation)
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude)<<" "<<setw(10)<<RadiansToDegrees(geo.longitude)
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude-obsgeo.latitude)
<<" "<<setw(10)<<RadiansToDegrees(geo.longitude-obsgeo.longitude)<<endl;
cout <<datecur<<" "<<setw(10)<<RadiansToDegrees(topo.azimuth)
<<" "<<setw(10)<<RadiansToDegrees(topo.elevation)<<" "<<setw(10)<<topo.range
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude)<<" "<<setw(10)<<RadiansToDegrees(geo.longitude)
<<" "<<setw(10)<<geo.altitude<<endl;
}
datecur = datecur + tspaninc;
......@@ -448,7 +447,7 @@ void SaveSunTrack(DateTime & dateobs, Observer & obs, int sincmin, int prtlev)
<< dateobs.Year()<<"/"<<dateobs.Month()<<"/"<<dateobs.Day()<<endl;
ofs << "#### Observations position, latitude,longitude (degrees) : "
<< RadiansToDegrees(obsgeo.latitude)<<" , "<<RadiansToDegrees(obsgeo.longitude) << endl;
ofs << "## Date Time UTC Azimuth Elevation Latitude Longitude DeltaLatitude DeltaLongitude (Angles in degree)" << endl;
ofs << "## Date Time UTC Azimuth Elevation Range Latitude Longitude Altitude (Angles in degree, Range,Altitude in km)" << endl;
DateTime dt0(dateobs.Year(),dateobs.Month(),dateobs.Day(),0,0,0);
DateTime dt = dt0;
......@@ -466,10 +465,11 @@ void SaveSunTrack(DateTime & dateobs, Observer & obs, int sincmin, int prtlev)
dt = dt + tsp; //inc=sincmin minutes
continue;
}
ofs <<dt<<" "<<setw(10)<<RadiansToDegrees(topo.azimuth)<<" "<<setw(10)<<RadiansToDegrees(topo.elevation)
ofs <<dt<<" "<<setw(10)<<RadiansToDegrees(topo.azimuth)
<<" "<<setw(10)<<RadiansToDegrees(topo.elevation)<<" "<<setw(10)<<topo.range
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude)<<" "<<setw(10)<<RadiansToDegrees(geo.longitude)
<<" "<<setw(10)<<RadiansToDegrees(geo.latitude-obsgeo.latitude)
<<" "<<setw(10)<<RadiansToDegrees(geo.longitude-obsgeo.longitude)<<endl;
<<" "<<setw(10)<<geo.altitude<<endl;
dt = dt + tsp; //inc=sincmin minutes
}
return;
......
......@@ -68,10 +68,10 @@ int main(int narg, const char* arg[])
dt.AddDoubleColumn("timesec");
dt.AddDoubleColumn("azimuth");
dt.AddDoubleColumn("elevation");
dt.AddDoubleColumn("range");
dt.AddDoubleColumn("latitude");
dt.AddDoubleColumn("longitude");
dt.AddDoubleColumn("deltalatitude");
dt.AddDoubleColumn("deltalongitude");
dt.AddDoubleColumn("altitude");
dt.Info().Comment()="Satellite track DataTable from predictsatsgp4.cc";
......@@ -79,8 +79,10 @@ int main(int narg, const char* arg[])
dt.Info()["timesec"] = "time of day, in seconds";
dt.Info()["azimuth"] = "Azimuth angle , in degree";
dt.Info()["elevation"] = "Elevation angle , in degree";
dt.Info()["range"] = "Range (distance ?) in km";
dt.Info()["latitude"] = "Latitude , in degree";
dt.Info()["longitude"] = "Longitude , in degree";
dt.Info()["altitude"] = "Altitude in km";
int nlines = 0;
int nok = 0;
......@@ -105,19 +107,19 @@ int main(int narg, const char* arg[])
cout << "StartDate (Offset for timesec column) set from first date in track file ->"<<date0<<endl;
}
double azim, elev, latitude, longitude, deltlat, deltalong;
sscanf(sline.c_str()+30, "%lg %lg %lg %lg %lg %lg", &azim, &elev, &latitude, &longitude, &deltlat, &deltalong);
double azim, elev, range, latitude, longitude, alt;
sscanf(sline.c_str()+30, "%lg %lg %lg %lg %lg %lg", &azim, &elev, &range, &latitude, &longitude, &alt);
double tmsec = TimeStamp::TimeDifferenceSeconds(datetm, date0);
row[0] = datetm;
row[1] = tmsec;
row[2] = azim;
row[3] = elev;
row[4] = latitude;
row[5] = longitude;
row[6] = deltlat;
row[7] = deltalong;
row[3] = elev;
row[4] = range;
row[5] = latitude;
row[6] = longitude;
row[7] = alt;
dt.AddRow(row); nok++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment