1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
int pLayer, pCloudType, pCloudBase, pCloudTops, pWindMSL, pWindKts, pWindShearDir, pWindShearKts, pTurbulence;
float pWindDir;
sscanf(IOSCommand.c_str(), "%i %i %i %i %i %f %i %i %i %i", &pLayer, &pCloudType, &pCloudBase, &pCloudTops, &pWindMSL, &pWindDir, &pWindKts, pWindShearDir, pWindShearKts, pTurbulence);
XPLMSetDatai(XPLMFindDataRef("sim/weather/cloud_type[0]"), pCloudType);
XPLMSetDatai(XPLMFindDataRef("sim/weather/cloud_base_msl_m[0]"), pCloudBase * 0.3048);
XPLMSetDatai(XPLMFindDataRef("sim/weather/cloud_tops_msl_m[0]"), pCloudTops * 0.3048);
XPLMSetDatai(XPLMFindDataRef("sim/weather/wind_altitude_msl_m[0]"), pWindMSL * 0.3048);
XPLMSetDataf(XPLMFindDataRef("sim/weather/wind_direction_degt[0]"), pWindDir);
XPLMSetDatai(XPLMFindDataRef("sim/weather/wind_speed_kt[0]"), pWindKts);
XPLMSetDatai(XPLMFindDataRef("sim/weather/shear_direction_degt[0]"), pWindShearDir);
XPLMSetDatai(XPLMFindDataRef("sim/weather/shear_speed_kt[0]"), pWindShearKts);
XPLMSetDatai(XPLMFindDataRef("sim/weather/turbulence[0]"), pTurbulence);
|