![]() |
VR-Link API Documentation for HLA 1.3
|
This DDM example is based on the simple talk/listen example and demonstrates VR-Link's support for using the HLA DDM services to reduce the amount of received data based on geographic filtering.
The HLA DDM services allow federates to specify regions used for both updating and subscribing data. When one federate's update region overlaps another federate's subscribe region, data will be delivered. When there are no overlaps, data is not delivered.
The DDM regions used by VR-Link are based on a geographic playbox specified in geodetic coordinates. Both the talk and listen federates must first enable DDM in the exercise connection and establish the playbox in order to define regions within it. Once DDM is enabled and the playbox is established, the talk federate only needs to create an entity and it is automatically associated with a DDM update region. The extents of the update region are based on the entity's current location and velocity. A larger velocity results in a larger region such that a new update of the entity will still find itself within its previous region. When the entity's publisher is ticked, VR-Link evaluates the entity's current location and velocity and adjusts the entity's update region if necessary (i.e., as the entity approaches the region's edge). In addition, the talk federate uses the entity's region to create an attached emitter using the same region. Like the simple talk example, the DDM talk example creates an aircraft entity with an emitter and flies the aircraft north.
The listen federate creates a lower lattitude region and upper lattitude region. It uses both of these subscription regions to initialze a reflected entity list but only the lower region with a reflected emitter list. When the talk federate is started, its update region overlaps the listen's lower subscription region. As a result, the listen federate initially receives updates from both the entity and emitter and prints emitter # and location values. After a short time ( ~10 seconds), the talk entity will move north such that its update region no longer overlaps the listen's lower subscription region and the entity and emitter objects will go out-of-scope and be removed. The value output will stop. After another short period, the entity's update region will overlap the listen's upper subscription region (only associated with the entity reflected list) and the entity object will come back in-scope and the location value output will resume. Eventually, the entity will go out-of-scope again and output will stop.
These two classes are used to specify DDM regions used by VR-Link:
The DDM talk and listen examples are self contain in the following files: