Menu

Python set entity Orientation

2018-01-26
2018-02-12
  • robert spriggs

    robert spriggs - 2018-01-26

    Hi all. Im very thankfull for all the hard work that has been put into this.

    Ive created a python script that takes aircraft feed from ASDB and feeds it into DIS to give users a real air picture to work with. this is all working perfectly apart from the orientation.

    the options to set the orientation dont seem to make sense to me

                pdu.entityOrientation.psi = 0
                pdu.entityOrientation.phi = 90.0
                pdu.entityOrientation.theta = 0
    

    What do these values need? are they radians/degrees? for Roll Pitch Yaw? hows the best way to calculate them in python?

    Many thanks

    Spriggsy

     
    • Don McGregor

      Don McGregor - 2018-02-12

      BTW, I'm trying to move to github, and doing some work on a DIS wiki. That's available, but a long way from being finished.

      https://github.com/open-dis/DISTutorial/wiki

      with a link to "wiki" in a small, faint text near the top.

      [https://avatars2.githubusercontent.com/u/16751953?s=400&v=4]https://github.com/open-dis/DISTutorial/wiki

      Home · open-dis/DISTutorial Wiki · GitHubhttps://github.com/open-dis/DISTutorial/wiki
      github.com
      DISTutorial - DIS: The Missing Handbook. An introduction to the concepts and practice of DIS applications.

      DIS uses a coordinate system with the earth's center as the origin, in meters. The coordinate system uses the same earth shape as GPS. There are some fairly easy source code segments floating out there to convert to lat/lon/alt.


      From: robert spriggs spriggsy@users.sourceforge.net
      Sent: Friday, January 26, 2018 11:41:47 AM
      To: [open-dis:discussion]
      Subject: [open-dis:discussion] Python set entity Orientation

      Hi all. Im very thankfull for all the hard work that has been put into this.

      Ive created a python script that takes aircraft feed from ASDB and feeds it into DIS to give users a real air picture to work with. this is all working perfectly apart from the orientation.

      the options to set the orientation dont seem to make sense to me

                  pdu.entityOrientation.psi = 0
                  pdu.entityOrientation.phi = 90.0
                  pdu.entityOrientation.theta = 0
      

      What do these values need? are they radians/degrees? for Roll Pitch Yaw? hows the best way to calculate them in python?

      Many thanks

      Spriggsy


      Python set entity Orientation


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/open-dis/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • robert spriggs

    robert spriggs - 2018-02-07

    OK, think ive solved it. the angles are in radians.

    pdu.entityOrientation.psi = (pi * 90 / 180)

    sets the heading of my DIS aircraft to 90 degrees. im not sure the order of phi and theta.
    but guessing that they are pitch and roll?

     
    • Don McGregor

      Don McGregor - 2018-02-12

      In a horrible, complex way. (Two screen caps in reversed order for some reason.)

      From the ieee-1278.1 standard:

      [cid:232c92cc-d3b8-49a1-8d86-3ec6dc663ece]

      [cid:a85afc8f-df4f-402e-8c49-eda962d851fc]


      From: robert spriggs spriggsy@users.sourceforge.net
      Sent: Wednesday, February 7, 2018 11:49:29 AM
      To: [open-dis:discussion]
      Subject: [open-dis:discussion] Python set entity Orientation

      OK, think ive solved it. the angles are in radians.

      pdu.entityOrientation.psi = (pi * 90 / 180)

      sets the heading of my DIS aircraft to 90 degrees. im not sure the order of phi and theta.
      but guessing that they are pitch and roll?


      Python set entity Orientation


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/open-dis/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.