Announcement

Collapse
No announcement yet.

Smart Widgets alter image in X, Y and rotate simultaneously

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Smart Widgets alter image in X, Y and rotate simultaneously

    Hi,

    I am working on a instrument that would show the PITCH, ROLL and YAW. Much similar to how a flight Attitude indicator would work.

    To be able to do this I need to be able to move the picture in the X, Y and rotate the picture all at the same time.



    Looking at the Smart Widget editor and the Smart Widget manual I cant figure out how to do this.


    Any help here would be highly appriciated.

    Best regards
    Johan
    Attached Files

  • #2
    Hi Johan,

    Yes this can be quite tricky to achieve. When doing an attidude indicator there needs to be an image for every roll angle times every pitch angle which isn't easily possible as one single SmartGuage. Also the pitch angle needs to take a +ve and -ve movement in the direction of the roll angle. To explain it better take a look at this video

    https://www.dropbox.com/s/q6ea5t1kz0...11730.mp4?dl=0

    So the scale part would always pass through the top marker image correctly.

    One way you can do this, but it does involve a bit of manual work, is to make a set of SmartGauges for every pitch angle.

    It might be possible for me to create a single image set using your images, it will take some time to do and I would need a pitch and roll range that you want it to move. I would guess that it is -30 to + 30 roll and -30 to + 30 pitch. The Images you sent are 121 x 121, is this the actual size you require ?

    Best regards

    Paul

    Comment


    • #3
      Many thanks for the quick reply Paul.

      Sounds great that it is possible to accomplish.

      I would rather understand how to accomplish this myself. The images are not complete yet and I might end up using the same solution on different screen sizes. And who knows, the same solution might be reusable for other instrument.

      One thing that I also was considering was the YAW but perhaps that would make it to complicated. The YAW is the offset from the direction of the vessel compared to where the vessel is pointing.
      https://en.wikipedia.org/wiki/Ship_motions

      It is not possible to get the DIABLO16 processor to manipulate the display of the image on the fly?

      Comment


      • #4
        Hi Johan,

        I have managed to do this on the fly in code without images, just using primitives but it was specifically for a 4.3 screen taking advantage of the page swapping feature of the 4.3 display. I will look into seeing if it is possible without page swapping.

        If you want to use an image from the SD then it wouldn't be possible to manipulate it on the fly, the individual frames would have to be created.

        The YAW might be best as a seperate object.

        I will continue to give this some thought today and update you if I come up with an easy way of creating your type of instrument.

        Best regards

        Paul

        Comment


        • #5
          Thanks. Much appreciated.

          This other technique that you mentioned to make multiple images. Are there any documentation/example on how that is done that I can take a look at or could you explain how to do it?


          Best regards
          Johan

          Comment


          • #6
            I will try to do it now and then give you an explanation on how I did it. Please bear with me a short while. I may have to modify your images slightly.

            Paul

            Comment

            Working...
            X