#include <iostream>
using namespace std;
using namespace Radar;
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 << "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 << "A1gate: " << a1gate << endl;
cout << "Direction: " << (direction > 0 ? "CW" : "CCW") << endl;
for (int i=0; i<numrays; i++)
{
printf(
"i %03d = ray %03d = time %s / %s - az: %03.03f / %03.03f \n",
i,
j,
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;
}
OdimH5 objects factory.
Definition odimh5v20_factory.hpp:50
virtual PolarVolume * openPolarVolume(const std::string &path)
Get a OdimH5 PVOL object from an existing file.
Definition odimh5v20_factory.cpp:260
virtual std::string getVersion()
Get the value of 'version' attribute.
Definition odimh5v20_classes.cpp:294
virtual time_t getDateTime()
Get the joined value of 'date' and 'time' attributes.
Definition odimh5v20_classes.cpp:296
virtual std::string getObject()
Get the value of 'object' attribute.
Definition odimh5v20_classes.cpp:292
virtual SourceInfo getSource()
Get the value of 'source' attribute.
Definition odimh5v20_classes.cpp:298
virtual std::string getConventions()
Get OdimH5 conventions attribute value.
Definition odimh5v20_classes.cpp:152
OdimH5 v2.0 Polar Volume SCAN.
Definition odimh5v20_classes.hpp:989
virtual time_t getEndDateTime()
Get the value of 'enddate' and 'endtime' attributes.
Definition odimh5v20_classes.cpp:1353
static int originaRayIndex(int index, int originalDirection, int numrays, int a1gate)
Calculate the original ray index of a scan.
Definition odimh5v20_classes.hpp:1240
virtual std::vector< AZAngles > getAzimuthAngles()
Get the 'azangles' attribute values.
Definition odimh5v20_classes.cpp:1438
virtual int getDirection()
Get the direction of the scan.
Definition odimh5v20_classes.cpp:1701
virtual time_t getStartDateTime()
Get the value of 'startdate' and 'starttime' attributes.
Definition odimh5v20_classes.cpp:1351
virtual int getNumRays()
Get the 'numrays' attribute value.
Definition odimh5v20_classes.cpp:1383
virtual int getA1Gate()
Get the 'a1gate' attribute value.
Definition odimh5v20_classes.cpp:1385
virtual std::vector< AZTimes > getAzimuthTimes()
Get the 'aztimes' attribute values.
Definition odimh5v20_classes.cpp:1505
OdimH5 v2.0 Polar Volume.
Definition odimh5v20_classes.hpp:846
virtual double getZR_A()
Get the 'zr_a' attribute value.
Definition odimh5v20_classes.cpp:1034
virtual double getKR_B()
Get the 'kr_b' attribute value.
Definition odimh5v20_classes.cpp:1040
virtual std::string getSoftwareVer()
Get the 'sw_version' attribute value.
Definition odimh5v20_classes.cpp:1032
virtual std::string getSystem()
Get the 'system' attribute value.
Definition odimh5v20_classes.cpp:1028
virtual double getAltitude()
Get the value of 'altitude' attribute.
Definition odimh5v20_classes.cpp:1019
virtual double getLatitude()
Get the value of 'longitude' attribute.
Definition odimh5v20_classes.cpp:1017
virtual double getZR_B()
Get the 'zr_b' attribute value.
Definition odimh5v20_classes.cpp:1036
virtual std::string getTaskOrProdGen()
Get the 'task' attribute value.
Definition odimh5v20_classes.cpp:1022
virtual time_t getEndEpochs()
Get the 'endepochs' attribute value.
Definition odimh5v20_classes.cpp:1026
virtual bool getSimulated()
Get the 'simulated' attribute value.
Definition odimh5v20_classes.cpp:1042
virtual std::string getSoftware()
Get the 'software' attribute value.
Definition odimh5v20_classes.cpp:1030
virtual double getKR_A()
Get the 'kr_a' attribute value.
Definition odimh5v20_classes.cpp:1038
virtual time_t getStartEpochs()
Get the 'startepochs' attribute value.
Definition odimh5v20_classes.cpp:1024
virtual std::vector< PolarScan * > getScansBetween(double minElevation, double maxElevation)
Get the pointers to all the scans with an elevation angle between the given limits.
Definition odimh5v20_classes.cpp:1178
std::string toString() const
Convert fields into a string formated acording to OdimH5 specifications.
Definition odimh5v20_support.cpp:161
Namespace related to ODIMH5 version 2.0.
Definition odimh5v20.hpp:46
std::string absoluteToString(time_t value)
, const char* fmt)
Definition time.cpp:256
Main header file of the library.