Recent

Author Topic: Airplane attitude display component?  (Read 1624 times)

ccrause

  • Hero Member
  • *****
  • Posts: 845
Airplane attitude display component?
« on: August 24, 2020, 10:23:34 pm »
I'm playing with a motion sensor (MPU 6050) and would like to visualize the coordinates in a compact and fast way for visualization.  One display option I thought of is an attitude indicator which is designed to compactly convey orientation of three axes.

Does anyone know of such a graphic component (or something similar that can be adapted) in Lazarus that can take three coordinates and render the attitude indicator display in near real time (lets say less than 10 ms rendering time as a rough guide)?

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Airplane attitude display component?
« Reply #1 on: August 24, 2020, 11:00:48 pm »
I don't know such component. This will need some graphic library (BGRABitmap) because it has needed features and is faster than Lazarus built in graphics.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Airplane attitude display component?
« Reply #2 on: August 25, 2020, 12:39:52 am »
Hi!

I also don't know such an component.

But for speed reasons I can also recommand the BGRA Libraries and the BGRA components.

I know that I made once a test with the a BGRAVirtualScreen 450 x 450.
Then I let the timer draw Rectangles with random size and origin and also random color.
I measured the whole procedure with getTickCount64.
Most time it was 1 ms. Sometimes 0. Never 2.

So the BGRA components are at an astonishing speed.

But for your cockpit instrument I have no idea where to get it.

Winni

PS.: Ask Toyota. They had it in the 80s in their 4-Wheel-Drive cars.
« Last Edit: August 25, 2020, 12:48:46 am by winni »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Airplane attitude display component?
« Reply #3 on: August 25, 2020, 12:51:12 am »
Does anyone know of such a graphic component (or something similar that can be adapted) in Lazarus that can take three coordinates and render the attitude indicator display in near real time (lets say less than 10 ms rendering time as a rough guide)?
I am only aware of commercial Abakus VCL components for Delphi. Look at TAbCompass and TAbVCInd.

EDIT: Forgot to add the link:
https://www.abaecker.biz/abkcomponents.html
https://www.abaecker.biz/images/abakus/images/TAbVCInd.png

You might also be interested to take a look at this:
http://www.cabiatl.com/mricro/obsolete/graphics/3d.html
https://github.com/omarreis/BoatAttitude
https://onlineconversion.vbulletin.net/forum/main-forums/convert-and-calculate/3249-euler-angle-quaternion?t=5408

or search for 'yaw' in sources of these OPM packages:
GLScene, pl_pappe, pl_directx, pl_directx11, pl_directxUT

and also in PXL package:
http://asphyre.net/products/pxl

« Last Edit: August 25, 2020, 10:08:07 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Airplane attitude display component?
« Reply #4 on: August 25, 2020, 01:52:46 am »
Try X-Plane 11. They have a plane building component where you build an aircraft which has an attitude indicator.

FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: Airplane attitude display component?
« Reply #5 on: August 25, 2020, 01:23:46 pm »
@Blaazen, @winni, thanks for the BGRABitmap tip.  If I cannot find a FPC/Lazarus component I'll have to go this route at some point.

EDIT: Forgot to add the link:
https://www.abaecker.biz/abkcomponents.html
https://www.abaecker.biz/images/abakus/images/TAbVCInd.png

You might also be interested to take a look at this:
http://www.cabiatl.com/mricro/obsolete/graphics/3d.html
https://github.com/omarreis/BoatAttitude
https://onlineconversion.vbulletin.net/forum/main-forums/convert-and-calculate/3249-euler-angle-quaternion?t=5408

or search for 'yaw' in sources of these OPM packages:
GLScene, pl_pappe, pl_directx, pl_directx11, pl_directxUT

and also in PXL package:
http://asphyre.net/products/pxl
Thank you @avra for these links.  The Windows Control3D from mricro seems like an alternative simple visualization that I can consider.  The other links appear to be too heavy for my needs, involving scene transformations.  I must say that Asphyre seems to have really fantastic graphics!

@JLWest, thanks for the X-Plane 11 reference.  This seems like another high quality graphics framework.  It however seems extremely feature rich, so I suspect there is quite a bit of a learning curve involved.

I've also found a project that does exactly what I thought of, but unfortunately it is written in C#, so I'm not sure whether I want to translate this code: https://www.codeproject.com/Articles/879500/Animated-Controls-using-graphic-layers.

At the moment I'm leaning towards Windows Control3D from mricro, it appears to be the quickest way for me to get some 3D visualization up and running.

Thank you again for all the responses!

 

TinyPortal © 2005-2018