87 size_t dot_pos = fname.find(
':', 0);
88 size_t slash_pos = fname.find(
'/', 0);
90 string name = fname.substr(0, dot_pos);
93 if(dot_pos + 1 < slash_pos)
94 proto = fname.substr(dot_pos + 1, slash_pos - dot_pos - 1);
97 if(slash_pos < string::npos)
98 port = fname.substr(slash_pos + 1, string::npos);
101 Name = name +
":" + port +
"/" + proto;
106 SockPort = atoi(port.c_str());
108 if (to_upper(proto) ==
"UDP")
109 SockProtocol = FGfdmSocket::ptUDP;
111 SockProtocol = FGfdmSocket::ptTCP;
282 string asciiData, scratch;
284 if (socket == 0)
return;
291 socket->
Append(FCS->GetDaCmd());
292 socket->
Append(FCS->GetDeCmd());
293 socket->
Append(FCS->GetDrCmd());
294 socket->
Append(FCS->GetDfCmd());
295 socket->
Append(FCS->GetDaLPos());
296 socket->
Append(FCS->GetDaRPos());
297 socket->
Append(FCS->GetDePos());
298 socket->
Append(FCS->GetDrPos());
299 socket->
Append(FCS->GetDfPos());
302 socket->
Append(radtodeg*Propagate->GetPQR(eP));
303 socket->
Append(radtodeg*Propagate->GetPQR(eQ));
304 socket->
Append(radtodeg*Propagate->GetPQR(eR));
305 socket->
Append(radtodeg*Accelerations->GetPQRdot(eP));
306 socket->
Append(radtodeg*Accelerations->GetPQRdot(eQ));
307 socket->
Append(radtodeg*Accelerations->GetPQRdot(eR));
310 socket->
Append(Auxiliary->Getqbar());
311 socket->
Append(Auxiliary->GetVt());
312 socket->
Append(Propagate->GetUVW(eU));
313 socket->
Append(Propagate->GetUVW(eV));
314 socket->
Append(Propagate->GetUVW(eW));
315 socket->
Append(Auxiliary->GetAeroUVW(eU));
316 socket->
Append(Auxiliary->GetAeroUVW(eV));
317 socket->
Append(Auxiliary->GetAeroUVW(eW));
318 socket->
Append(Propagate->GetVel(eNorth));
319 socket->
Append(Propagate->GetVel(eEast));
320 socket->
Append(Propagate->GetVel(eDown));
323 socket->
Append(Aerodynamics->GetvFw()(eDrag));
324 socket->
Append(Aerodynamics->GetvFw()(eSide));
325 socket->
Append(Aerodynamics->GetvFw()(eLift));
326 socket->
Append(Aerodynamics->GetLoD());
327 socket->
Append(Aircraft->GetForces(eX));
328 socket->
Append(Aircraft->GetForces(eY));
329 socket->
Append(Aircraft->GetForces(eZ));
332 socket->
Append(Aircraft->GetMoments(eL));
333 socket->
Append(Aircraft->GetMoments(eM));
334 socket->
Append(Aircraft->GetMoments(eN));
337 const auto Atmosphere = FDMExec->GetAtmosphere();
338 socket->
Append(Atmosphere->GetDensity());
339 socket->
Append(Atmosphere->GetPressureSL());
340 socket->
Append(Atmosphere->GetPressure());
341 socket->
Append(Winds->GetTurbMagnitude());
342 socket->
Append(Winds->GetTurbDirection());
343 socket->
Append(Winds->GetTotalWindNED().Dump(
","));
346 socket->
Append(MassBalance->GetJ()(1,1));
347 socket->
Append(MassBalance->GetJ()(1,2));
348 socket->
Append(MassBalance->GetJ()(1,3));
349 socket->
Append(MassBalance->GetJ()(2,1));
350 socket->
Append(MassBalance->GetJ()(2,2));
351 socket->
Append(MassBalance->GetJ()(2,3));
352 socket->
Append(MassBalance->GetJ()(3,1));
353 socket->
Append(MassBalance->GetJ()(3,2));
354 socket->
Append(MassBalance->GetJ()(3,3));
355 socket->
Append(MassBalance->GetMass());
356 socket->
Append(MassBalance->GetXYZcg()(eX));
357 socket->
Append(MassBalance->GetXYZcg()(eY));
358 socket->
Append(MassBalance->GetXYZcg()(eZ));
361 socket->
Append(Propagate->GetAltitudeASL());
362 socket->
Append(radtodeg*Propagate->GetEuler(ePhi));
363 socket->
Append(radtodeg*Propagate->GetEuler(eTht));
364 socket->
Append(radtodeg*Propagate->GetEuler(ePsi));
365 socket->
Append(Auxiliary->Getalpha(inDegrees));
366 socket->
Append(Auxiliary->Getbeta(inDegrees));
367 socket->
Append(Propagate->GetLocation().GetLatitudeDeg());
368 socket->
Append(Propagate->GetLocation().GetLongitudeDeg());
371 scratch = Aerodynamics->GetAeroFunctionValues(
",");
372 if (scratch.length() != 0) socket->
Append(scratch);
374 if (SubSystems &
ssFCS) {
375 scratch = FCS->GetComponentValues(
",");
376 if (scratch.length() != 0) socket->
Append(scratch);
379 socket->
Append(GroundReactions->GetGroundReactionValues(
","));
381 if (SubSystems &
ssPropulsion && Propulsion->GetNumEngines() > 0) {
382 socket->
Append(Propulsion->GetPropulsionValues(
","));
385 for (
unsigned int i=0;i<OutputParameters.size();++i) {
386 socket->
Append(OutputParameters[i]->GetValue());