element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
NexGen Flight Simuator NexGen Flight Simulator: Software Overview: Nav IOP
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 21 Aug 2013 6:12 PM Date Created
  • Views 322 views
  • Likes 4 likes
  • Comments 1 comment
  • serial_communications
  • arduino_duemilanove
  • hardware
  • eclipse
  • flight_simulation
  • software_design
  • protocols
  • nexgen_flight_simulator
  • arduino
  • diy_cockpit
  • software
  • linux
Related
Recommended

NexGen Flight Simulator: Software Overview: Nav IOP

phoenixcomm
phoenixcomm
21 Aug 2013

DEPRECATED: 1/23/2000

DESIGN GOALS: I have talked about the IOP before so I will review the design:

image

  1. The IOP can control multiple CDUs (dumb terminals) via an Ardunio's USB.
  2. The IOP listens to the NavGroup UDP broadcast for present position, etc.
  3. The IOP sends the PP/etc to be updated on the CDUs.
  4. All software will be written in C.
  5. We will standardize on the eclipse platform for software development.

 

CDU - IOP Software Protocol:

  • The CDU sends one character to the IOP. The IOP will respond with character string.
  • The IOP sends a command to the CDU. The IOP will respond with NAC.

 

CDU - IOP Software Review:  This IOP is built on on Linux platorm which performs the following functions:

  • handles all input via an internal command select(2)
  • All of the CDU's fuctions via a program called nav_iop.c
  • The software handles all keystrokes
  • The software handles the all the switches
  • The software handles the displays
  • As well as
    • listening to the NAV-GROUP network
    • Updating present position
    • Storing all the variables.
  • Multiple CDUs can be handled by using a array of structures to hold them. 
  • this is the definitions:

 

  • enum fd_index {
    • RD,
    • WR,
    • FD_pair };
  • struct cdu_s {
    •           // device info

    •           char * device_info;                    // something useful about the cdu

    •           char * device_name;                    // in the form of "dev/xxxxxxxxx"

    •           int fd[ fd_index ];                         // file descriptors

    •           // power flags

    •           int power;

    •           int power_48v;

    •           int power_400hz;

    •           int keybord_power;

    •           // keyboard state info

    •           unsigned short alpha_high;

    •           unsigned short alpha_low;

    •           unsigned short clear_flag;

    •           unsigned short keypad_power;

    •           unsigned short cursor;

    •           unsigned short keystroke;

    •           // switch state info

    •           unsigned short power_flag;

    •           unsigned short mode_sw;

    •           unsigned short display_sw;

    •           unsigned short dest_thumb_sw;

    •           unsigned short fly2_thumb_sw;

    •           // display info

    •           short display_cntl;

    •           short keyboard_cntl;

    •           char chars[displays][display_max + 1];

    • };

 

And this is how we invoke it.

static struct cdu_s cdu[] = {

                    { "Pilots", "dev/USBtty0", {O_R, O_W }, }          // Please note the the O_ option are for demonstration purposes only and are not correct.

               };

 

ARDUINO Software Review: The Arduino has the following things to do:

 

  • One Arduino per CDU so each CDU has its own Device Name ie /dev/USBTTY0. This is important, so that the NAV-IOP O/S knows which CDU is requesting service.
  • Ps2 keyboard decoder, for the Keypad interface. There is a good article in the Arduino Playground.
  • One 16 bit I2C Bus expander, PCF8575C,
    • four switches (2 thumbwheel and 2 rotary).
  • Drive two relays:
    • Main Power
    • Keyboard Lights
  • Use two (2) MAX6955 Display Controlers via the I2C Bus, which drives the 16 and 7 segment displays.

 

Processor Shoot Out
DevicesPinsDuemilanoveMega2560
USB Serial Device20 (RX) and 1 (TX)0 (RX) and 1 (TX)
External Interrupts22 (INT0) and 3  (INT1)

2 (INT0), 3 (INT1), 21 (INT2),

20 (INT3), 19 (INT4), 18 (INT5)

Ps2 Keyboard23 (INT1) and 4 (DATA)3 (INT1) and 4 (DATA)
I2C Interface2A4 (SDA) and A5 (SCL)20 (SDA) and 21 (SCL)
Display Switch*4N/A*22, 23, 24, 25
Mode Switch*426, 27, 28, 29
Thumbwheel Switch 1*430, 31, 32, 33
Thumbwheel Switch 2*434, 35, 36, 37
Keyboard Power Relay138
Display Power139
MEM LED, Red140
MEM LED, Green141
MAL LED, Red142
MAL LED, Green143
Arduino LED113 (LED)13 (LED)

 

*If the Duemilanove is used we need to use several I2C I/O Expander.

 

IOP (Linux) Software Review: The software is written using the Linux/Unix async communications with several devices (file handles) at the same time, that will include the USBtty, and UDP and TCIP connections at the same time. 

 

 

(MORE TO COME)

 

 

image Keep Tuned In More to Come!!

  • Sign in to reply
  • DAB
    DAB over 11 years ago

    Hi Chris,

     

    It looks like you have a good setup to run the displays.

    The simulation software should be able to support the information needed to update the displays and maintain a simulated flight path.

     

    Can't wait to see it up and running.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube