Sunday, December 30, 2012

Avionics Bending: Inertial Navigation System (INS) - Part 4

First Litton LTN-72RL CDU  Integration with X-Plane 

So far all of the data you have seen on the Litton LTN-72RL CDU was test data. Today I finally got around to integrate the Litton CDU with X-Plane. For this first setup i chose the data that is displayed on the POSITION DATA page of the CDU; this data is Latitude, Longitude and time in GMT (or Zulu).

Here are the X-Plane data refs that I feed to the CDU via the ARINC 429 interface using ARINC 575 data words:

gLongitude = XPLMFindDataRef("sim/flightmodel/position/longitude");
gLatitude = XPLMFindDataRef("sim/flightmodel/position/latitude");
gZuluHR = XPLMFindDataRef("sim/cockpit2/clock_timer/zulu_time_hours");
gZuluMIN = XPLMFindDataRef("sim/cockpit2/clock_timer/zulu_time_minutes");
gZuluSEC = XPLMFindDataRef("sim/cockpit2/clock_timer/zulu_time_seconds");

While X-Plane does not directly talk to the CDU (it talks to a CDU device driver that does the ARINC formatting and data transfer via UDP) I still chose to implement the data extraction out of X-Plane following the ARINC 429 label standard. The labels are 0310, 0311 and 0150. Below is the code snipped from the X-Plane plugin that builds the extract data:

    // Label 310 - Present Position Latitude
    sbuf.label = 0310;
    sbuf.value = XPLMGetDatad(gLatitude);
    msgsnd( msqidOut, &sbuf, 9,0);
    
    // Label 311 - Present Position Longitude
    sbuf.label = 0311;
    sbuf.value = XPLMGetDatad(gLongitude);
    msgsnd( msqidOut, &sbuf, 9, 0);
    
    // Label 150 - UTC
    sbuf.label = 0150;
    sbuf.value = XPLMGetDatai(gZuluHR)*10000 + XPLMGetDatai(gZuluMIN)*100 + XPLMGetDatai(gZuluSEC);
    msgsnd( msqidOut, &sbuf, 9, 0);    


Lets put all this in motion. Watch the short video below to see the LTN-72RL CDU display the LAT, LNG and GMT data from X-Plane in real time via the ARINC 429/575 data stream:

No comments:

Post a Comment