<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Augmented Reality: OrientationSensor to camara's transformation matrix in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244453#M2855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you considered using AR Toolkit? It will handle control of the scene view camera using the device's sensors and AR Core.&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-toolkit-dotnet"&gt;.NET Toolkit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to support devices that aren't capable of using AR Core, you&amp;nbsp;should&amp;nbsp;consider using the AR Toolkit as a reference. AR Toolkit is open source and includes&amp;nbsp;a lot of code you may be able to repurpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Nathan C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2020 21:11:45 GMT</pubDate>
    <dc:creator>NathanCastle1</dc:creator>
    <dc:date>2020-04-02T21:11:45Z</dc:date>
    <item>
      <title>Augmented Reality: OrientationSensor to camara's transformation matrix</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244452#M2854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to update the SceneView Camera using Androids OrientationSensor in Xamarin to do an AR app with no success. I get the quaternions (x,y,z,w) from the sensor and use them to create the transformation matrix but the resulting orientation does not correspond to the mobile's orientation. I have tried different combination of axes (changing order and sign in the quaternion components) assuming it was a problem with the axes definition but still with no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Anybody knows how to use Android's OrientationSensor to create the correct transformation matrix?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PD: I know I can use the magnetomer and accelerometer to obtain the AR effect&amp;nbsp; but prefer to use the OrientationSensor as I think it will lead to a better solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 20:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244452#M2854</guid>
      <dc:creator>santiagomonedero</dc:creator>
      <dc:date>2020-04-02T20:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Augmented Reality: OrientationSensor to camara's transformation matrix</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244453#M2855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you considered using AR Toolkit? It will handle control of the scene view camera using the device's sensors and AR Core.&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-toolkit-dotnet"&gt;.NET Toolkit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to support devices that aren't capable of using AR Core, you&amp;nbsp;should&amp;nbsp;consider using the AR Toolkit as a reference. AR Toolkit is open source and includes&amp;nbsp;a lot of code you may be able to repurpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Nathan C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 21:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244453#M2855</guid>
      <dc:creator>NathanCastle1</dc:creator>
      <dc:date>2020-04-02T21:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Augmented Reality: OrientationSensor to camara's transformation matrix</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244454#M2856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Specifically you're probably looking for this:&amp;nbsp;&lt;BR /&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/ARToolkit/ARSceneView.Android.cs#L313-L324" title="https://github.com/Esri/arcgis-toolkit-dotnet/blob/master/src/ARToolkit/ARSceneView.Android.cs#L313-L324"&gt;arcgis-toolkit-dotnet/ARSceneView.Android.cs at master · Esri/arcgis-toolkit-dotnet · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 22:06:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244454#M2856</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-04-02T22:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Augmented Reality: OrientationSensor to camara's transformation matrix</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244455#M2857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thank you both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I am also considering using the ARKit but wanted to have a simple solution using the orientation sensor. I was doing basically the same as your code. Anyway I just found out the problem so I write it here in case anybody is facing the same issue.&amp;nbsp; To update the camera viewpoint do not set the rotation and translation at the same time, but rather 1) Use quaternions with NO translation to create the transformation matrix and a new rotated camera&amp;nbsp; 2) translate the resulting camera and update viewpoint&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that I assumed that translation would not affect the quaternions but apparently it does as you can see executing the snippet in the attached image.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/487359_quaternions.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2020 01:45:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/augmented-reality-orientationsensor-to-camara-s/m-p/244455#M2857</guid>
      <dc:creator>santiagomonedero</dc:creator>
      <dc:date>2020-04-03T01:45:29Z</dc:date>
    </item>
  </channel>
</rss>

