Skip to content

Automation and Dashboard

This page covers automating the simulated telemetry feed on a 1-second timer, then building a live KX Dashboard to visualize the data.

Automating the telemetry feed

Currently, you must manually call .airTelDummyData.loadDummyData[] each time you want data. In this section, you will configure the RTE to call it automatically on a 1-second timer.

Create the initialization function

  1. Open KX Analyst and connect to airTelWorkspace when prompted.
  2. Add a new function under the airTelDummyData module and name it .airTelDummyData.initRTE.
  3. Enter the following code:

    // @fileOverview Initialises the real time engine on a timer. When this code executes, it will start a timer that will execute the loadDummyData with a parameter of 1 every 1000ms.  
    // @returns {Type} Returns nothing. 
    {[]
        .d.prcl.addFunctToTimer[`.airTelDummyData.loadDummyData; (); 0Nz; 0Nz; 1000; 1b];
        }
    

    When this code executes, it starts a timer that executes the loadDummyData every 1000ms. Refer to the timer API to understand how this inbuilt timer function works.

  4. Click Save.

  5. Export the analytic to KX Control: right-click airTelDummyData and select Export to Control > Export as Analytic Group(s), then click OK.

Test the timer manually

  1. Restart the workflow and the RTE.
  2. Open the RTE and RDB in the IDE.
  3. Connect to the RTE instance in the IDE and run:

    .airTelDummyData.initRTE[]
    
  4. Switch to the RDB instance and run:

    count airTelTelemetry;
    

    Press Ctrl+D repeatedly — the row count should increase by one each second.

If the count is not increasing, check that you have added the initRTE function correctly and executed it in the RTE.

Configure auto-start

To make the timer start automatically whenever the RTE initializes:

  1. Stop the workflow and the RTE in KX Control.
  2. Refresh the tree to pick up the exported analytic changes.
  3. In the Instance Params subtab of airTelRTE, set initialStateFunc to .airTelDummyData.initRTE.

    Configure auto-start

  4. Confirm that airTelDummyData is still listed in the Selected Analytics section of the Analytics tab.

  5. Restart the workflow.

Confirm data is building

Connect to the RDB process and run count airTelTelemetry; repeatedly. The count should increase by approximately one per second, confirming the automated feed is running.

The addition of .airTelDummyData.initRTE to the initialStateFunc parameter means the timer now starts automatically every time airTelRTE starts within the workflow.

Create a dashboard

With live data flowing into the RDB, you can now visualize it using KX Dashboard Builder — a browser-based tool included with KX Delta Platform.

Open Dashboard Builder

  1. In KX Control, navigate to Tools > Open Builder > Dashboard Builder from the top menu.
  2. The builder opens in a new browser tab at the demo screen.
  3. Click the New Document icon.

    New Dashboard

  4. Name the dashboard airTelDashboard. The dashboard opens in the Builder view, with the new dashboard name displayed in the upper-left corner.

Create a connection to the RDB

  1. Click Connections at the bottom of the configuration options panel on the right.
  2. Click New and enter the following:

    Field Value
    Name airTelRDBConnection
    Host localhost
    Port 8003
    Password *
    Confirm Password *
    TLS Unchecked
  3. Click Test to verify the connection. If the test fails, confirm the RDB is running on port 8003.

    Test connection

  4. Click Save and close the dialog.

Create a table grid

This grid will show the latest altitude for each aircraft, updating every second, with color-coded highlights for climbs and descents.

  1. Drag the Data Grid component from the left panel onto the layout area.

    Drag Data Grid

  2. Click to populate the data source.

  3. Click New and rename the node to lastAltitude.
  4. Edit the datasource as follows:

    1. Select airTelRDBConnection at the top of the data source dialog.
    2. Enter the following query:

      select last altitude by aircraftId from airTelTelemetry
      
    3. Set Subscription to Polling and Interval to 1 second.

    4. Set Max Rows to 1000.
    5. Click Execute to preview the data, then Apply to save the changes.
    6. Click Select Item to add the query to the current chart.
    7. Click Close.

Clean up the grid appearance

In Design mode with the grid selected, make the following changes in the right-hand panel.

Note

This menu is context sensitive so will not appear if you do not click into the grid in Design mode.

In the Basics tab, uncheck:

  • Filter visible
  • Enable grouping

In File export, uncheck:

  • Show Export CSV Button
  • Show Export Excel Button

Click Preview to confirm the grid is updating cleanly. Experiment with column widths, labels, text alignments, and border styles to suit your preference.

Preview the grid

Add highlight rules for altitude changes

  1. In Design mode, click Highlight Rules in the grid's configuration panel.
  2. Click + to add a new highlight rule, named aircraft climb:

    • Target and Condition Source: altitude
    • Condition Operator: >
    • Color: Green
  3. Click + to add a new highlight rule, named aircraft descend:

    • Target and Condition Source: altitude
    • Condition Operator: <
    • Color: Red

You should now see the aircraft altitude climb and descend slightly during the flight.

See altitude changes

Click Save (the floppy disk icon at the top of the screen).

Create a dropdown list

The dropdown will allow users to select an aircraft ID, which will drive the line graph in the next step.

  1. Drag the Drop Down List icon onto the layout area.

  2. In the Basics section, click the Data Source field and create a new data source.

    1. Right click on the name and rename it to uniqueAircraft.

    2. Select airTelRDBConnection at the top of the dialog box and enter:

      `aircraftId xasc select distinct aircraftId from airTelTelemetry
      
    3. Click Execute, then Apply.

    4. Click Select Item to close the dialog.

  3. Click Preview and confirm the dropdown lists aircraft IDs such as AC001, AC002, etc.

    Select an aircraft

Note

If nothing is showing, confirm you have clicked both Apply and Select Item — missing either step is the most common cause.

Map the selected value to a view state:

  1. Click the Selected Value field to open a dialog box.

  2. Create a new view state named name, with type symbol and default value AC001. Note that the current value will also change to AC001.

  3. Click Select Item to close the dialog.

  4. In Data Source Mapping, confirm aircraftId is set as both Value and Text.

Create a line graph

This graph will redraw whenever the user selects a different aircraft in the dropdown.

  1. Drag the Line Graph icon onto the layout area, positioning it alongside the other components.

  2. In the Basics section, click on the Datasource field and add a new datasource.

    1. Right-click on the name and rename the datasource to symbolAircraft.

    2. Select airTelRDBConnection at the top of the dialog and enter the following query:

      {[name]
        select last aircraftId,
        last altitude
        by time:`time$(0D00:15:00 xbar timestamp)
        from airTelTelemetry
        where aircraftId = name,
              altitude > 42000
        }
      

      Note

      This query returns data grouped into 15-minute chunks using xbar. The [name] argument is linked to the dropdown's selected value, so the graph redraws when a new aircraft is chosen.

    3. In the value field below the function declaration, enter <%name%> to pass the dropdown selection into the query as the name argument.

    4. Click Execute

      Execute

    5. Click Apply, then Select Item to close the dialog.

Configure the graph settings in the side panel:

  • Set Focus to the name view state.
  • In Layers, set the graph type to Line.
  • In x-axis settings:

    • X-Axis Type: time
    • Tick Spacing: Fixed Tick Interval (ms)
      • Value: 900000 (15 minutes in milliseconds — matches the xbar interval in the query)
  • In y-axis settings:

    • Check Use Min/Max
    • Min: 41000
    • Max: 43000

Leave the workflow running. Every 15 minutes you should see a small variation in altitude reflected in the line graph as new data bands accumulate.

Click Save.


Summary

You have now built a complete, end-to-end aircraft telemetry system on KX Delta Platform:

  • A schema defines the structure of the telemetry data.
  • A messaging server enables processes to discover and communicate with each other.
  • A metrics plant logs and distributes all incoming records.
  • An HDB stores historical data on disk; an RDB holds today's data in memory.
  • A workflow orchestrates all components with proper startup dependencies.
  • A real-time engine generates and publishes simulated telemetry on a 1-second timer using a custom q analytic.
  • A dashboard visualizes live altitude data in a table grid and line graph, with interactive filtering by aircraft ID.

This pattern — define schemas, configure infrastructure, write analytics, automate, and visualize — is the foundation for any data capture system you build on KX Delta Platform.