更新 'src/MultiPlayer/multiplaymgr.cxx'
This commit is contained in:
parent
2b99e69fd6
commit
4111852e0b
@ -1433,18 +1433,23 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData& motionInfo)
|
|||||||
for (unsigned i = 0 ; i < 3; ++i)
|
for (unsigned i = 0 ; i < 3; ++i)
|
||||||
PosMsg->linearAccel[i] = XDR_encode_float (motionInfo.linearAccel(i) * timeAccel * timeAccel);
|
PosMsg->linearAccel[i] = XDR_encode_float (motionInfo.linearAccel(i) * timeAccel * timeAccel);
|
||||||
|
|
||||||
//zhongjin
|
for (unsigned i = 0 ; i < 3; ++i)
|
||||||
// for (unsigned i = 0 ; i < 3; ++i)
|
PosMsg->angularAccel[i] = XDR_encode_float (motionInfo.angularAccel(i) * timeAccel * timeAccel);
|
||||||
// PosMsg->angularAccel[i] = XDR_encode_float (motionInfo.angularAccel(i) * timeAccel * timeAccel);
|
|
||||||
|
|
||||||
float heading = ifce.get_Psi();
|
//zhongjin
|
||||||
float pitch = ifce.get_Theta();
|
|
||||||
float roll = ifce.get_Phi();
|
|
||||||
|
|
||||||
PosMsg->angularAccel[0] = XDR_encode_float (heading);
|
float heading = ifce.get_Psi();
|
||||||
PosMsg->angularAccel[1] = XDR_encode_float (pitch);
|
float pitch = ifce.get_Theta();
|
||||||
PosMsg->angularAccel[2] = XDR_encode_float (roll);
|
float roll = ifce.get_Phi();
|
||||||
|
|
||||||
|
PosMsg->jwhtext[0] = XDR_encode_float (heading);
|
||||||
|
PosMsg->jwhtext[1] = XDR_encode_float (pitch);
|
||||||
|
PosMsg->jwhtext[2] = XDR_encode_float (roll);
|
||||||
|
|
||||||
|
SGPropertyNode* n = fgGetNode("/sim/replay/log-raw-speed-multiplayer-values", true /*create*/);
|
||||||
|
float speed = n->getDoubleValue(speed);
|
||||||
|
PosMsg->jwhtext[3] = XDR_encode_float (speed);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
xdr_data_t* ptr = msgBuf.properties();
|
xdr_data_t* ptr = msgBuf.properties();
|
||||||
|
Loading…
Reference in New Issue
Block a user