NMPB08 shared libraries
|
00001 00008 #include "RoadEmissionNMPB08.h" 00009 #include "CalculRoadEmission.h" 00010 #include <vector> 00011 #include <math.h> 00012 #include <stdio.h> 00013 using namespace std; 00014 using namespace CalculRoadEmissionNMPB; 00015 00025 double* NMPB08_Lwm (RoadTraffic* roadTraffic, RoadSpectrumType spectrumType) 00026 { 00027 try 00028 { 00029 CalculRoadEmission calculRoadEmission(spectrumType, roadTraffic->surfaceType); 00030 return calculRoadEmission.SoundPowerLevelPerMeter(roadTraffic); 00031 } 00032 catch (const std::exception& e) 00033 { 00034 printf ("ERREUR : %s \n", e.what()) ; 00035 return NULL; 00036 } 00037 } 00038 00048 double* NMPB08_Lwm_rolling (RoadTraffic* roadTraffic, RoadSpectrumType spectrumType) 00049 { 00050 try 00051 { 00052 CalculRoadEmission calculRoadEmission(spectrumType, roadTraffic->surfaceType); 00053 return calculRoadEmission.Lwm_rolling(roadTraffic); 00054 } 00055 catch (const std::exception& e) 00056 { 00057 printf ("ERREUR : %s \n", e.what()) ; 00058 return NULL; 00059 } 00060 } 00061 00071 double* NMPB08_Lwm_traction (RoadTraffic* roadTraffic, RoadSpectrumType spectrumType) 00072 { 00073 try 00074 { 00075 CalculRoadEmission calculRoadEmission(spectrumType, roadTraffic->surfaceType); 00076 return calculRoadEmission.Lwm_traction(roadTraffic); 00077 } 00078 catch (const std::exception& e) 00079 { 00080 printf ("ERREUR : %s \n", e.what()) ; 00081 return NULL; 00082 } 00083 } 00084 00100 double* NMPB08_Lw_rolling (RoadVehicleType type, 00101 double vehicleSpeed, 00102 RoadSurfaceType surfaceType, 00103 double surfaceAge, 00104 RoadSpectrumType specType) 00105 { 00106 try 00107 { 00108 CalculRoadEmission calculRoadEmission(specType, surfaceType); 00109 return calculRoadEmission.Lw_rolling(type,vehicleSpeed, surfaceType, surfaceAge); 00110 } 00111 catch (const std::exception& e) 00112 { 00113 printf ("ERREUR : %s \n", e.what()) ; 00114 return NULL; 00115 } 00116 } 00117 00133 double* NMPB08_Lw_traction (RoadVehicleType type, 00134 double vehicleSpeed, 00135 RoadFlowType flowType, 00136 double ramp, 00137 RoadSpectrumType specType) 00138 { 00139 try 00140 { 00141 CalculRoadEmission calculRoadEmission(specType, RoadSurface_Default); 00142 return calculRoadEmission.Lw_traction(type,vehicleSpeed, flowType, ramp); 00143 } 00144 catch (const std::exception& e) 00145 { 00146 printf ("ERREUR : %s \n", e.what()) ; 00147 return NULL; 00148 } 00149 } 00150 00172 bool NMPB08_DefineRoadSurfaceType(int idRoadSurface, 00173 double AVL, double BVL, double Vref_VL, 00174 double APL, double BPL, double Vref_PL, 00175 double const* spectrum) 00176 { 00177 if(idRoadSurface < RoadSurface_UserDefined) 00178 { 00179 printf (".ERROR: definition of road surface type with idRoadSurface < RoadSurface_UserDefined \n") ; 00180 return false; 00181 } 00182 00183 return DefineRoadSurfaceType(idRoadSurface, 00184 AVL, BVL, Vref_VL, 00185 APL, BPL, Vref_PL, 00186 spectrum); 00187 }