/// <summary>
 /// Throws a new event to the altitude event.
 /// </summary>
 /// <param name="ae">Ae.</param>
 private void NotifyEvent(AltitudeEvent ae)
 {
     if (onAltitudeEvent != null)
     {
         onAltitudeEvent(this, ae);
     }
 }
 private void OnAltitudeEvent(GpsAltitudeProvider provider, AltitudeEvent e)
 {
     try {
         if (lastKnownLocation != null)
         {
             var loc = lastKnownLocation;
             lastKnownLocation = new SimpleLocation(true, e.location.Altitude, loc.longitude, loc.latitude);
         }
         else
         {
             lastKnownLocation = new SimpleLocation(true, e.location.Altitude, e.location.Longitude, e.location.Latitude);
         }
     } catch (Exception ex) {
         Log.E(this, "Failed to resolve altitude event", ex);
     }
 }