SITL: Added <time> tag to JSBSim output directive

Instructs JSBSim to transmit current simulation time which is used to sync with Ardupilot
This commit is contained in:
Rajat Singhal 2019-05-10 06:50:51 +05:30 committed by Andrew Tridgell
parent 2317e73e0b
commit dedb7e108f

View File

@ -133,7 +133,9 @@ bool JSBSim::create_templates(void)
AP_HAL::panic("Unable to create jsbsim fgout script %s", jsbsim_fgout);
}
fprintf(f, "<?xml version=\"1.0\"?>\n"
"<output name=\"127.0.0.1\" type=\"FLIGHTGEAR\" port=\"%u\" protocol=\"UDP\" rate=\"%f\"/>\n",
"<output name=\"127.0.0.1\" type=\"FLIGHTGEAR\" port=\"%u\" protocol=\"UDP\" rate=\"%f\">\n"
" <time type=\"simulation\" resolution=\"1e-6\"/>\n"
"</output>",
fdm_port, rate_hz);
fclose(f);