Welcome to Cockpitbuilders.com. Please login or sign up.

June 15, 2024, 12:14:05 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
172 Guests, 0 Users
Members
Stats
  • Total Posts: 59,642
  • Total Topics: 7,853
  • Online today: 113
  • Online ever: 831
  • (May 03, 2024, 12:39:25 PM)
Users Online
Users: 0
Guests: 172
Total: 172

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

Raspberry Pi based instrument panel for Cessna 208b Caravan.

Started by mikeybear, May 28, 2016, 06:24:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mikeybear

Hi

Here is some of my latest work I'd like to show to the community.
I've been building a cockpit to fly the C208b, now for a little over 9 months, The first stage was the throttle quadrant, followed by the engine gauges and annunciator panel , and now the main instruments.
My priority has been to make something that is flyable , rather than an exact replica, so it often looks a little like a building site :).

I started off using SimPlugin's Panel builder, running on a separate screen , but I wanted to run it on a separate computer.
I looked at using a mini-itx card , but realised that was going to get quite expensive , a tiny power supply was going to cost me about £24/$36 when I realised I could get a Raspberry Pi 3 for £30/$45 ok the power supply and heatsink case cost another £20/$30.

So the challenge started.

I professionally work with OpenGL , and an experimental driver became available in feb this year , around the same time as the RPi 3.

So I had  ago at writing my own , getting a couple of instruments , ASI and Artificial Horizon working very quickly. this allowed me to rationalise my code very quickly, allowing the rest of the instruments to be added , initially ,using the textures, supplied with the aircraft, I then drew my own , as I wanted them to be geometrically correct.

To cut  long story short, I've managed to get 9 instruments running in a window size of 1400x1050 at about 14 frames per second.  ( on a 1920x1080 ( 1080p monitor) , I've just ordered a 1400x1050 15" laptop screen, which makes the instruments about 2 3/4 " , slightly undersize, but more than readable.

This is linked to X-Plane via a plugin I've written talking over the network to the RPi,

Hope this is of interest.

Dave



iwik


Ridgenj

Very nice work
Luis

Sent from my SM-N910T using Tapatalk


mikeybear

Thanks  Guys,

Did anyone notice the mistake ?

I got a nasty surprise when flying with it , when I found 31 next to between S & 24  :eek:

Quickly fixed that one ;)

The next thing I would like is a raspberry pi based moving map , X-Mapper-Lite is quite good , but I'm not embedding my IPad.


Dave

RayS

That is awesome work!

I'm very curious in your work on this. Is it your OpenGL project  java or C++ based? (Or possibly something else?)

A close friend and I have written an Avidyne Entegra system (Actually he wrote it, I just add things here and there) with dreams one day of porting it to rPII, but life intervenes too often to keep the project going smoothly. It only gets updated in fits and starts.

Ray Sotkiewicz

mikeybear

Ray,

This is C/C++ based,  I'm a professional C++  developer, and wanted quick results.

I've used  the new Experimental OpenGL driver, which supports OpenGL 2.1 , a lot older than I'm used to, but more than adequate for this job.

I've used  glfw as the framework ,

The shapes are drawn as precalculated  triangles , 3D coordinates and UV values   in vertex buffers (glVertexAttribPointer)  drawn with glDrawArrays .

The textures are all from a single texture , 2048 pixels square( maximum size for the RPi ), stored  as a single png . The objects are then rotated or the texture coordinates are rotated in the case of the altimeter pressure scale.

The UDP  comms  is based on PCSBSocketUDP (Ben Supnik and Chris Serio) running in a pthread .
so its not running at frame rate.

The different shapes are derived from a common base class,and are members of an Instrument class.
though all the create/draw functions are different.

Still to do , is the RMI, ( need to work out how to use that :)  )and the To/From & on/off indicators

The textures were drawn in a CAD package, and plotted to a png file,

If you'd like a go , let me know ( I'll have to separate the plugin as It has all of my experiments in it , which would mess up any other aircraft) I've only built Win x64 at the moment, though my side views are linux boxes. ( I also got this running on a linux box last night )

a low res of the texture file is attached

Regards

Dave

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate