+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Member level 1
    Points: 519, Level: 4

    Join Date
    Jun 2016
    Posts
    33
    Helped
    0 / 0
    Points
    519
    Level
    4

    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..(

    •   Alt25th April 2018, 16:26

      advertising

        
       

  2. #2
    Super Moderator
    Points: 28,836, Level: 41
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,603
    Helped
    1596 / 1596
    Points
    28,836
    Level
    41

    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.



  3. #3
    Member level 1
    Points: 519, Level: 4

    Join Date
    Jun 2016
    Posts
    33
    Helped
    0 / 0
    Points
    519
    Level
    4

    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=XIpf-7q-ZDQ



    •   Alt25th April 2018, 17:04

      advertising

        
       

  4. #4
    Member level 1
    Points: 266, Level: 3

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    32
    Helped
    6 / 6
    Points
    266
    Level
    3

    Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA

    Quote Originally Posted by abimann View Post
    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..(
    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



    •   Alt26th April 2018, 17:37

      advertising

        
       

  5. #5
    Member level 1
    Points: 519, Level: 4

    Join Date
    Jun 2016
    Posts
    33
    Helped
    0 / 0
    Points
    519
    Level
    4

    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



  6. #6
    Member level 1
    Points: 266, Level: 3

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    32
    Helped
    6 / 6
    Points
    266
    Level
    3

    Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA

    Quote Originally Posted by abimann View Post
    Find one way , in a book "Learning by examples using VHDL" Richard E. Haskel and Darrin M. Hanna
    Hello,

    could you give an URL to this book (I don't know this publication), it seems to be interesting for me?

    Kind Regards.



  7. #7
    Advanced Member level 5
    Points: 35,989, Level: 46
    Achievements:
    7 years registered

    Join Date
    Jun 2010
    Posts
    6,581
    Helped
    1920 / 1920
    Points
    35,989
    Level
    46

    Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA




    •   Alt27th April 2018, 11:22

      advertising

        
       

  8. #8
    Member level 1
    Points: 266, Level: 3

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    32
    Helped
    6 / 6
    Points
    266
    Level
    3

    Re: VHDL code for line rotation with angle from gyro and accelerometer from VGA

    Quote Originally Posted by abimann View Post
    Find one way , in a book "Learning by examples using VHDL" Richard E. Haskel and Darrin M. Hanna
    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



  9. #9
    Member level 1
    Points: 519, Level: 4

    Join Date
    Jun 2016
    Posts
    33
    Helped
    0 / 0
    Points
    519
    Level
    4

    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 ..



--[[ ]]--