// Main Control loop void loop() { static uint32_t nextTick = 0; while(getTickCount()<nextTick); nextTick = getTickCount()+TICK_FRAME_PERIOD; CommandProcess(); #ifdef GPS GPSCommandProcess(); #endif SensorsRead(SENSOR_ACC|SENSOR_GYRO|SENSOR_MAG|SENSOR_BARO,1); #ifdef ABROBOT SensorsRead(SENSOR_HALL,1); #endif #ifdef OPTION_RC if(IsSSVConnected()) { ssv_rc_update(); if(getTickCount()%1000) UpdateBattery(); } if(ChronographRead(ChronRC)>= OUTPUT_RC_INTERVAL) { SensorsDynamicCalibrate(SENSOR_GYRO|SENSOR_MAG); ChronographSet(ChronRC); computeRC(); armDetect(); } #endif if(getMagMode()||!(GetSensorCalState()&(1<<MAG))) nvtUpdateAHRS(SENSOR_ACC|SENSOR_GYRO|SENSOR_MAG); else nvtUpdateAHRS(SENSOR_ACC|SENSOR_GYRO); if((GetFrameCount()%18)==0) report_sensors(); IncFrameCount(1); #ifdef OPTION_RC if(GetFrameCount()==MOTORS_ESC_DELAY) motorsStart(); stabilizer(); if((GetFrameCount()%12)==0) UpdateLED(); #endif }
int main( int argc, char** argv ) { setlocale(LC_ALL, "ru_RU.UTF-8"); VideoLib::FrameCapturePtr capture(new VideoLib::FrameCapture(".\\vid2.avi")); VideoLib::StabilizerPtr stabilizer(new VideoLib::Stabilizer(BUFFER_SIZE,cv::Size(320,240),cv::Size(320,240))); stabilizer->setCapture(capture); GUI::VisualHolder vs_holder(stabilizer); if(!capture->grab()){ std::cout << "Can't open video file"; cv::waitKey(); return 0; } for(;;){ GUI::Builder::showWnds(vs_holder); if(cv::waitKey(30) >= 0) break; } return 0; }
InputParameters validParams<PTGeothermal>() { InputParameters params = validParams<Material>(); MooseEnum stat("constant compressibility wseos", "constant"); params.addParam<MooseEnum>("fluid_property_formulation", stat, "Fluid property formulation, default = constant"); MooseEnum stabilizer("none zero supg supg_dc", "none"); params.addParam<MooseEnum>("stabilizer", stabilizer, "Energy transport stabilizer, default = none"); params.addParam<bool>( "pressure_dependent_permeability", false, "Flag true if permeability is pressure dependent, default = false"); params.addParam<Real>( "reference_pressure", 101325, "Reference pressure [Pa], default = 101325"); params.addParam<Real>( "reference_temperature", 297.15, "Reference temperature [K], default = 297.15"); params.addParam<Real>( "permeability", 1.0e-12, "Intrinsic permeability [m^2], default = 1.0e-12"); params.addParam<Real>( "porosity", 0.3, "Rock porosity, default = 0.3"); params.addParam<Real>( "compressibility", 1.0e-5, "Total compressibility of the researvoir, default = 1.0e-5"); params.addParam<Real>( "density_rock", 2.50e3, "Rock density [kg/m^3]"); params.addParam<Real>( "gravity", 9.80665, "Gravity acceleration constant [m/s^2], default = 9.80665"); params.addParam<RealGradient>( "gravity_direction", RealGradient(0,0,-1), "Gravity unit directional vector, default = '0 0 -1'"); params.addParam<RealGradient>( "constant_pressure_gradient", RealGradient(0,0,0), "Constant pressure gradient, default = '0 0 0'"); params.addCoupledVar( "pressure", "Assign nonlinear variable for pressure [Pa], if mass balance is involved"); params.addCoupledVar( "temperature", "Assign nonlinear variable for temperature [K], if energy balance is involved"); params.addParam<Real>( "density_water", 1000, "Initial water density [kg/m^3], default = 1000"); params.addParam<Real>( "viscosity_water", 0.001, "Initial water viscosity [Pa.s], default = 0.001"); params.addParam<Real>( "specific_heat_rock", 0.92e3, "Specific heat of the rock [J/(kg.K)], default = 0.92e3"); params.addParam<Real>( "specific_heat_water", 4.186e3, "Specific heat of water [J/(kg.K)], default = 4.186e3"); params.addParam<Real>( "thermal_conductivity", 2.5, "Thermal conductivity of the reservoir [W/(m.K)], default = 2.5"); params.addParam<Real>( "supg_dc_threshold", 1e-12, "Threshold magnitude of temperature gradient to include SUPG discontinuity capturing, default = 1e-12"); return params; }