#include <iostream>
int main(int argc, char* argv[])
{
if (argc != 2)
{
cout << "Usage: " << argv[0] << " <odimh5file>" << endl;
return -1;
}
std::vector<PolarScan*> scans;
try
{
cout << "WHAT:" << endl;
cout <<
" - Object: " << volume->
getObject() << endl;
cout <<
" - Version: " << volume->
getVersion() << endl;
cout <<
" - Date/Time: " << volume->
getDateTime() << endl;
cout <<
" - Date/Time str: " << timeutils::absoluteToString(volume->
getDateTime()) << endl;
cout << "WHERE:" << endl;
cout <<
" - Latitude: " << volume->
getLatitude() << endl;
cout <<
" - Longitude: " << volume->
getLongitude() << endl;
cout <<
" - Altitude: " << volume->
getAltitude() << endl;
cout << "HOW:" << endl;
cout <<
" - End epochs: " << volume->
getEndEpochs() << endl;
cout <<
" - System: " << volume->
getSystem() << endl;
cout <<
" - Software: " << volume->
getSoftware() << endl;
cout <<
" - ZR_A: " << volume->
getZR_A() << endl;
cout <<
" - ZR_B: " << volume->
getZR_B() << endl;
cout <<
" - KR_A: " << volume->
getKR_A() << endl;
cout <<
" - KR_B: " << volume->
getKR_B() << endl;
for (size_t i=0; i<scans.size(); i++)
{
cout << "------" << endl;
cout << " SCAN " << endl;
cout << "------" << endl;
cout << "Rays: " << numrays << endl;
cout << "Star ttime: " << timeutils::absoluteToString(startdatetime) << endl;
cout << "End time: " << timeutils::absoluteToString(enddatetime) << endl;
cout << "A1gate: " << a1gate << endl;
cout << "Direction: " << (direction > 0 ? "CW" : "CCW") << endl;
for (int i=0; i<numrays; i++)
{
int j = PolarScan::originaRayIndex(i, direction, numrays, a1gate);
printf(
"i %03d = ray %03d = time %s / %s - az: %03.03f / %03.03f \n",
i,
j,
timeutils::absoluteToString( times[j].start ).c_str(),
timeutils::absoluteToString( times[j].stop ).c_str(),
angles[j].start,
angles[j].stop
);
}
}
cout << "Lettura eseguita!" << endl;
}
catch (std::exception& stde)
{
cerr << "Errore di esecuzione: " << stde.what() << endl;
}
catch (...)
{
cerr << "Errore di esecuzione sconosciuto" << endl;
}
for (size_t i=0; i<scans.size(); i++) delete scans[i];
delete volume;
delete factory;
getchar();
return 0;
}