vk4tec
Posts: 131
Joined: Thu Mar 07, 2013 9:05 am
Location: Brisbane QLD
Contact: Website

Avionics

Tue Jul 26, 2016 10:32 pm

Hello

It has been a long term dream of mine to be able to make "avionics" displays

But I don't know where to start

Can someone steer me towards a programming language that would help me draw graphics on an LCD please.

I have looked at perl GD::Image

Andrew
---------------------------------
Andrew Rich
email: [email protected]
http://www.tech-software.net/ ( hobby website )
http://59.167.159.165/ ( Raspberry Pi ADS-B server ) RTL SDR

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Avionics

Tue Jul 26, 2016 10:49 pm

vk4tec wrote:Can someone steer me towards a programming language that would help me draw graphics on an LCD please.
You could make a jpg, or some more accessible format, image and then overlay it with whatever the often modest updated aspects are.

User avatar
Gavinmc42
Posts: 3935
Joined: Wed Aug 28, 2013 3:31 am

Re: Avionics

Wed Jul 27, 2016 6:57 am

I have used povray to make the background gauges and JavaFX to overlay the 3D needles.
But you need a Pi3 for speed to run the Java.

For the traditional round gauges you could use these.
http://www.4dsystems.com.au/product/uLCD_220RD_AR/

For a full glass cockpit, a bunch of hdmi lcds driven by Pi Zeros.
Multiplex the sensors and you could make a redundancy capable system.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ghans
Posts: 7877
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Avionics

Wed Jul 27, 2016 7:12 am

All major programming languages are capable of GUIs or graphics (sometimes with the help of additional libraries).
Python has TkInter in its standard library , Java has Swing in its standard library etc.
Kivy is another option for Python. For C or C++ looking into 2D (and perhaps even 3D) game libraries with explicit Raspberry Pi support might also be worthwhile.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
Gavinmc42
Posts: 3935
Joined: Wed Aug 28, 2013 3:31 am

Re: Avionics

Wed Jul 27, 2016 8:02 am

Er, forgot to answer your question re languages, I have not found a good one yet.
Best one so far has been Java with JavaFX which replaced Swing, it's a very large install.
But it comes already on Raspbian.

I keep checking the Automotive Linux sites for clues, Tizen stuff etc.
Seems most are based on QT + $$$$ libraries and C++.

On Pi's it is best to look for a GPU acceleration which JavaFX does.
Waiting for Wayland/Weston/Mesa etc to come out, hoping it might help.

After trying lots of methods I am moving to bare metal with Ultibo, won't get me GPU accelerated yet but it will be faster as there is no OS. It use Pascal which compiles much faster than C/C++, which makes it quicker to test stuff and it is tiny.

Spent a lot of time with these guys stuff, reading manuals etc.
https://www.khronos.org/ OpenVG etc
Hope one day there will be a port of Vulkan to the Pi.

Best language would be one where the grunt stuff is done by the GPU and the Arm just runs simple scripts.
ie Arm reads the sensor data and passes the needle position to the GPU to render it.

May have to try the GPU compiler/assembler.
It is getting easier as more people reverse engineer the Videocore.
https://rpiplayground.wordpress.com/tag ... ry-pi-gpu/
https://petewarden.com/2014/08/07/how-t ... g-its-gpu/
https://github.com/mn416/QPULib

http://elinux.org/Raspberry_Pi_VideoCore_APIs
As most of the Pi's OpenMAX stuff is C/C++ that would a starting point too, but it is mostly for video etc.
A language that talks OpenGL ES?
https://jan.newmarch.name/LinuxSound/Di ... yPiOpenGL/
Lots of coding that is not that easy to understand :(

A script language that talks to the Pi's 3D/2D GPU stuff.
Pi3D may be another option, uses python.
https://github.com/tipam/pi3d

Some people have tried Kivy but I don't think with much success.

Yes TK/TCL has been around for ages, ok for GUI's?
Don't think it uses hardware acceleration.

Anything must run quick on the slower ones, don't want to use Pi3's just for this.
After all the GPU is the same from Zero to Pi3.
It would be nice if it can be themed, ie easy to change look and feel without recompiling.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
paddyg
Posts: 2395
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Avionics

Wed Jul 27, 2016 11:14 am

Matt Coleman did some pretty handy stuff for a Head Up Display for his model sailpane which looks pretty complicated but (IMHO) the basic display system using pi3d is reasonably straight forward.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

Return to “General discussion”