Copyright VirtualSim 2004-2020 - All rights reserved
IG to Host
The lower section of the CIGI Packet definition is reserved for receiving messages from IG to the host (vsTASKER simulation engine).
Because of the asynchronous communication between Host and IG, each response is tagged with the same id as the request.
The principle retained to treat asynchronous response to request, without blocking the single thread of the simulation engine, is to give to a logic the task to talk to the IG.
Sending the Line of Sight request message will be done on the same principle as here. Instead of the CigiViewDefV3, we will use the CigiLosVectReqV3_2 class.
In the LoSvectorReq Packet, the code will be the following:
void Pkt::request(WCoord from, float az, float el, int id)
{
from.convertToLLA();
if (az > 180) az -= 360; // [0..359] -> [-179..180]