title: Adding elevation to the pARk sample code
body: <p>I'm trying to add the altitude the pARk sample code, so the label appears near the top of the place of interest. </p>
  
  <p>The first thing I did was adding a <code>altitude</code> property to <code>PlaceOfInterest.h</code> and filling it on the ViewController, with the altitude for each poi being in meters.</p>
  
  <p>Then, on ARView, did the following changes:</p>
  
  <ul>
  <li>Adding the altitude to the LLA to ECEF conversion of the device's location: <code>latLonToEcef(location.coordinate.latitude, location.coordinate.longitude, location.altitude, &amp;myX, &amp;myY, &amp;myZ);</code></li>
  <li>same for the poi's location <code>latLonToEcef(poi.location.coordinate.latitude, poi.location.coordinate.longitude, poi.location.altitude, &amp;poiX, &amp;poiY, &amp;poiZ);</code></li>
  <li>Added the Upwardness direction to the placesOfInterestCoordinates 4D vector <code>placesOfInterestCoordinates[i][2] = (float)u;</code></li>
  </ul>
  
  <p>I thought that was it, pretty easy. Run the project and... labels laying dead on the floor. Comparing the label location of a poi on the app with and without my changes above, they are pretty much in the same places, even though adding the altitude the values from the conversions to ECEF and ENU should change a bit.</p>
  
  <p>I had little knowledge before looking at the code about <a href="http://en.wikipedia.org/wiki/3D_projection#Perspective_projection" rel="nofollow noreferrer">Perspective projection</a>, all the matrixes used, ECEF, ENU, etc. And I've been reading about all these concepts in Wikipedia to be able to understand the code, plus reading other questions related to this sample code here in SO like
  <a href="https://stackoverflow.com/questions/9681298/use-of-maths-in-the-apple-park-sample-code">Use of maths in the Apple pARk sample code</a>
   and also similar questions for Android... but still can't figure out why the altitude doesn't show on screen.</p>
  
  <p>I tried multiplying the poi's altitude by 5 <code>latLonToEcef(location.coordinate.latitude, location.coordinate.longitude, 5*location.altitude, &amp;myX, &amp;myY, &amp;myZ);</code> to see if there was a noticeable change on the <code>y</code>position of the poi. And, while there was some, it was very small, the label still being far from the real altitude.</p>
  
  <p>So if somebody could give me some hints about what am I missing, why the altitude isn't showing on screen, I'll appreciate it very much.</p>
  
  <p>I uploaded my try to a repository here <a href="https://github.com/Tovkal/pARk-with-altitude" rel="nofollow noreferrer">https://github.com/Tovkal/pARk-with-altitude</a>, in case you want to see the code with the changes. If you run it, you should change the places of interest from the ViewController to some near you.</p>
  
  <p>Thank you!</p>