+ Post New Thread
Results 1 to 9 of 9

25th April 2018, 16:26 #1
 Join Date
 Jun 2016
 Posts
 47
 Helped
 0 / 0
 Points
 694
 Level
 5
VHDL code for line rotation with angle from gyro and accelerometer from VGA
Dear Gurus or/and just good guys , is there any code in vhdl for rotate lines with data from MPU6050 ? I successfully connect MPU6050 with I2C and can filter with Kalman filter now i want to show rotated line accourding to gyro and accelerometer from VGA monitor .. Pls help to find it searched 2 days in internet. but no luck..(

25th April 2018, 16:31 #2
 Join Date
 Sep 2013
 Location
 USA
 Posts
 6,843
 Helped
 1628 / 1628
 Points
 29,664
 Level
 42
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA
Elaborate on what you mean by "rotate lines". Maybe you should give an example of what you are attempting to do.

Advertisment

25th April 2018, 17:04 #3
 Join Date
 Jun 2016
 Posts
 47
 Helped
 0 / 0
 Points
 694
 Level
 5
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA
it is like airplane pilot monitor to keep horizon , like in video https://www.youtube.com/watch?v=XIpf7qZDQ

Advertisment

26th April 2018, 17:37 #4
 Join Date
 Dec 2017
 Location
 Bydgoszcz  Poland
 Posts
 80
 Helped
 16 / 16
 Points
 650
 Level
 5
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA
Hi,
it is just Math in 3D space. See for example these links:
https://en.wikipedia.org/wiki/Rotation_matrix
http://mathworld.wolfram.com/RotationMatrix.html
http://www.mathpages.com/home/kmath593/kmath593.htm
http://www.euclideanspace.com/maths/...tion/index.htm
For trigonometric function you can use "CORDIC" algorithm (code on GitHub also as free IP cores).
Then you must write these math rules (for rotations) in VHDL or Verilog (or just look for existing code).
Regards

Advertisment

27th April 2018, 07:00 #5
 Join Date
 Jun 2016
 Posts
 47
 Helped
 0 / 0
 Points
 694
 Level
 5
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA
Find one way , in a book "Learning by examples using VHDL" Richard E. Haskel and Darrin M. Hanna

27th April 2018, 09:58 #6
 Join Date
 Dec 2017
 Location
 Bydgoszcz  Poland
 Posts
 80
 Helped
 16 / 16
 Points
 650
 Level
 5

27th April 2018, 11:22 #7
 Join Date
 Jun 2010
 Posts
 6,730
 Helped
 1963 / 1963
 Points
 36,886
 Level
 46
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA

27th April 2018, 12:07 #8
 Join Date
 Dec 2017
 Location
 Bydgoszcz  Poland
 Posts
 80
 Helped
 16 / 16
 Points
 650
 Level
 5
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA
Hello,
I read all the "Table of contents" for this book (from link given by TricyDicky), but I wasn;t able to find any topic or example related to your problem.
For solution of problem "rotation plane or line in 3D space" you need to solve few issues:
1) Find solution of calculating trigonometric functions (this may be solved by CORDIC algorithm)
2) Find way of doing basic 4 arithmetic operations on float/or double numbers (DSP blocks or IP cores for FPU)
3) Write equotations of rotation in any HDL language and solve them (data for rotation parametres are taken from gyro and accelometer)
4) Make visualisation of rotated planes/lines comparing to the "frame of reference" (i mean x,y,z axies)  VGA or HDMI image generator
I didn't find any of these subjects in reffered by you book?
Regards

Advertisment

30th April 2018, 13:28 #9
 Join Date
 Jun 2016
 Posts
 47
 Helped
 0 / 0
 Points
 694
 Level
 5
Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA
Not that.. Learning By Example Using VHDL Advanced Digital Design With a NEXUS 2tm FPGA Board. Autors: Richard E. Haskell Darrin M. Hanna .. page number #228.. Plotting a line.. Here is needed to make case operator ..
+ Post New Thread
Please login