Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Coordination system
Forum Updated to NodeBB v4.3 + New Features

Coordination system

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Loc888

    @jsulm If i just add QT += charts, then i get the error, there is no module like that, i have Qt 5.23.

    One more thing, like i said, i don't have to show it, i just need to generate the data.

    jsulmJ Online
    jsulmJ Online
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #6

    @Loc888 Qt Charts is not part of a standard Qt set-up. You need to install it first (use Qt Maintenance Tool for that).

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    L 1 Reply Last reply
    0
    • jsulmJ jsulm

      @Loc888 Qt Charts is not part of a standard Qt set-up. You need to install it first (use Qt Maintenance Tool for that).

      L Offline
      L Offline
      Loc888
      wrote on last edited by
      #7

      @jsulm Ok, can i generate the data there, or it's it will just show it?

      jsulmJ 1 Reply Last reply
      0
      • L Loc888

        @jsulm Ok, can i generate the data there, or it's it will just show it?

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #8

        @Loc888 I'm not sure what you mean with "generate the data"?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • L Loc888

          @jsulm If i just add QT += charts, then i get the error, there is no module like that, i have Qt 5.23.

          One more thing, like i said, i don't have to show it, i just need to generate the data.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by J.Hilk
          #9

          @Loc888
          generate the data ? You mean to want to know of a convenient way to store a pair of varibales in a list?

          There are countless ways to do that.

          In this object specific case I would suggest using QVector2d as the container for the x/y pair and a simple QVector<QVector2d> as the "list"


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          L 1 Reply Last reply
          1
          • J.HilkJ J.Hilk

            @Loc888
            generate the data ? You mean to want to know of a convenient way to store a pair of varibales in a list?

            There are countless ways to do that.

            In this object specific case I would suggest using QVector2d as the container for the x/y pair and a simple QVector<QVector2d> as the "list"

            L Offline
            L Offline
            Loc888
            wrote on last edited by Loc888
            #10

            @J.Hilk You don't understand what i mean, i explain, if i put into a vector (10,20), (20,40), (40,60), then they are just 6 values in total, in any coordination, when the object moves, there are infinitive combinations.

            If i have a line, the length is 50units ok?
            The problem is, if someone will point somewhere in the middle, then where it is? It's something close to 25unit of 50, because the total length is 50, but there are a lot of combinations, and if i wanna use any decimal points, then i just can't add to the vector 500000 values, i need something to "generate it".

            What i want is, somebody points in the middle of the line, middle is 25, half of that distance is 12.5, beginning is 0 and the end is 50, and keep going, wherever somebody points, i get the coordination, i don't want a fixed size vector.

            mrjjM 1 Reply Last reply
            0
            • L Loc888

              @J.Hilk You don't understand what i mean, i explain, if i put into a vector (10,20), (20,40), (40,60), then they are just 6 values in total, in any coordination, when the object moves, there are infinitive combinations.

              If i have a line, the length is 50units ok?
              The problem is, if someone will point somewhere in the middle, then where it is? It's something close to 25unit of 50, because the total length is 50, but there are a lot of combinations, and if i wanna use any decimal points, then i just can't add to the vector 500000 values, i need something to "generate it".

              What i want is, somebody points in the middle of the line, middle is 25, half of that distance is 12.5, beginning is 0 and the end is 50, and keep going, wherever somebody points, i get the coordination, i don't want a fixed size vector.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #11

              @Loc888
              Hi
              The chart you have shown does not have straight lines between the points.
              Is that really the case or will it be straight lines ?

              L 1 Reply Last reply
              0
              • mrjjM mrjj

                @Loc888
                Hi
                The chart you have shown does not have straight lines between the points.
                Is that really the case or will it be straight lines ?

                L Offline
                L Offline
                Loc888
                wrote on last edited by
                #12

                @mrjj Idk what you mean, and it doesn't matter, because like i said, i am not gonna do any chart, before i have the data.

                mrjjM 1 Reply Last reply
                0
                • L Loc888

                  @mrjj Idk what you mean, and it doesn't matter, because like i said, i am not gonna do any chart, before i have the data.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #13

                  @Loc888
                  Hi
                  Ok.
                  If the lines are indeed straight between the point you can use
                  a formula to calculate the any Y from a given x.

                  L 1 Reply Last reply
                  0
                  • mrjjM mrjj

                    @Loc888
                    Hi
                    Ok.
                    If the lines are indeed straight between the point you can use
                    a formula to calculate the any Y from a given x.

                    L Offline
                    L Offline
                    Loc888
                    wrote on last edited by Loc888
                    #14

                    @mrjj Doesn't matter, i did +/- what i want. I wanted something like this:

                    Object is at 25000, speed of movement is 30u/s, if the speed is > 50, the deceleration will be -0,50u for example.

                    Then move it, that's what i get:

                    New deceleration: -0.00734294 for: 33.1444
                    New deceleration: -0.00734131 for: 33.1371
                    New deceleration: -0.00733968 for: 33.1297
                    New deceleration: -0.00733806 for: 33.1224
                    New deceleration: -0.00733643 for: 33.1151
                    New deceleration: -0.00733481 for: 33.1077
                    New deceleration: -0.00733318 for: 33.1004
                    New deceleration: -0.00733156 for: 33.0931
                    New deceleration: -0.00732993 for: 33.0857
                    New deceleration: -0.00732831 for: 33.0784
                    New deceleration: -0.00732668 for: 33.0711
                    New deceleration: -0.00732506 for: 33.0637
                    New deceleration: -0.00732344 for: 33.0564
                    New deceleration: -0.00732182 for: 33.0491
                    New deceleration: -0.00732019 for: 33.0418
                    New deceleration: -0.00731857 for: 33.0344
                    New deceleration: -0.00731695 for: 33.0271
                    New deceleration: -0.00731533 for: 33.0198
                    New deceleration: -0.00731371 for: 33.0125
                    New deceleration: -0.00731209 for: 33.0052

                    I have only few values, starting speed, starting speed loss, and the destination, and all the others, are calculated, that's what i wanted.

                    mrjjM 1 Reply Last reply
                    0
                    • L Loc888

                      @mrjj Doesn't matter, i did +/- what i want. I wanted something like this:

                      Object is at 25000, speed of movement is 30u/s, if the speed is > 50, the deceleration will be -0,50u for example.

                      Then move it, that's what i get:

                      New deceleration: -0.00734294 for: 33.1444
                      New deceleration: -0.00734131 for: 33.1371
                      New deceleration: -0.00733968 for: 33.1297
                      New deceleration: -0.00733806 for: 33.1224
                      New deceleration: -0.00733643 for: 33.1151
                      New deceleration: -0.00733481 for: 33.1077
                      New deceleration: -0.00733318 for: 33.1004
                      New deceleration: -0.00733156 for: 33.0931
                      New deceleration: -0.00732993 for: 33.0857
                      New deceleration: -0.00732831 for: 33.0784
                      New deceleration: -0.00732668 for: 33.0711
                      New deceleration: -0.00732506 for: 33.0637
                      New deceleration: -0.00732344 for: 33.0564
                      New deceleration: -0.00732182 for: 33.0491
                      New deceleration: -0.00732019 for: 33.0418
                      New deceleration: -0.00731857 for: 33.0344
                      New deceleration: -0.00731695 for: 33.0271
                      New deceleration: -0.00731533 for: 33.0198
                      New deceleration: -0.00731371 for: 33.0125
                      New deceleration: -0.00731209 for: 33.0052

                      I have only few values, starting speed, starting speed loss, and the destination, and all the others, are calculated, that's what i wanted.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #15

                      @Loc888
                      ok, so it was some form of speed calculation. :)

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved