Track Symbols - ilabs-kdc/bluesky GitHub Wiki

The basic method of drawing graphic-related images on the screen has the same format and it can be found on this website. This section particularly focuses on the track symbols that are shown on the screen.

An lvnl variable symbol is created to draw multiple traffic symbols based on their current responsible flight officer. Buffer values and the Vertex Array Objects (VAO) need to be created and initialized with the above-defined method. Since multiple flight symbols are needed to be drawn on the radar screen, multiple buffer values are also created accordingly. The method used to implement traffic symbols is quite different compared to that of labels because if buffer values are shared for multiple symbols, then the symbols will be overlapped with each other.

The first two steps of initializing and creating the buffer values and VAOs are the same as those implemented in the above-mentioned method. The draw method is used to calculate the number of instances the symbol should be drawn on the screen. The number of instances of that traffic symbol can be calculated with the draw_track_symbol() function which takes 2 arguments. The first argument is the symbol variable and the second argument is the ATC responsible. An example can be seen regarding this for the flight responsible by the APP operator.

def draw(self):
    if draw_track_sym(symbol, 'APP') != 0:
        self.vao_variable.draw(n_instances=draw_track_sym(symbol, 'APP'))

After drawing the traffic symbol, the next step is updating the attributes for the symbols to navigate along the simulation data. A member function update_attributes() is created to update the traffic symbols accordingly and this function is called in update_aircraft_data() member function. The argument passed to this function is the aircraft data. This function makes sure that buffer values get segregated and updated according to the symbol variable and no buffer value is shared among multiple traffic symbols. An example can be seen regarding this for the flight responsible by the APP operator.

def update_attributes(self, data):
    iapp = misc.get_indices(symbol, 'APP')
    self.attribute1.update(data[iapp])

This is a structure for drawing the traffic symbols on the radar screen and the main emphasis is set on the symbol variable. This variable can also be created and accessed by the command as shown on this website.