1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting info on AI objects from IVAO

Discussion in 'SimConnect' started by oliver_mpt, 13/3/08.

  1. oliver_mpt

    oliver_mpt

    Joined:
    8/1/08
    Messages:
    41
    Country:
    france
    Hello,

    I'm trying to get info from traffic injected by IVAP, the IVAO pilot client software.
    The IVAP developers told me they create objects with "SimConnect_AICreateNonATCAircraft".

    On my side, I collect info on AI traffic using the ObjectAdded / ObjectRemoved. I filter the object by type with

    if ((evt->eObjType == SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT) || (evt->eObjType == SIMCONNECT_SIMOBJECT_TYPE_HELICOPTER)){

    Most of the time I don't catch the objects created by IVAP (but randomly, a few of them, yes).

    Anybody has an idea on how to detect AI traffic created with "SimConnect_AICreateNonATCAircraft" ?

    Regards

    Olivier
  2. ronh

    ronh

    Joined:
    2/11/06
    Messages:
    325
    Country:
    canada
    Olivier,

    A shot in the dark. Have you set the STATE of the system event to on.

    Some are off by default.

    hr = SimConnect_SubscribeToSystemEvent(hSimConnect, EVENT_AI_ADD, "ObjectAdded");

    // The recurring events will be on by default

    hr = SimConnect_SetSystemEventState(hSimConnect, EVENT_AI_ADD, SIMCONNECT_STATE_ON);

    where EVENT_AI_ADD is one of your events to trigger the map to "ObjectAdded" system event.

    Sounds like you are doing things right. Perhaps you are missing events due to processing the other system events.

    Have you tried the simconnect.ini

    console=yes to see if you can spot any messages you miss.
    Last edited: 15/3/08

Share This Page