public override async Task<float> GetHeading(NorthType type)
 {
     if (_lastCompassReading == null) return 0;
     float returnHeading = 0;
     switch (type)
     {
         case NorthType.MagneticNorth:
             returnHeading = (float)_lastCompassReading.HeadingMagneticNorth;
             break;
         case NorthType.TrueNorth:
             returnHeading = (float)(_lastCompassReading.HeadingTrueNorth ?? 0);
             break;
     }
     return returnHeading;
 }
Beispiel #2
0
 public abstract Task<float> GetHeading(NorthType type);
Beispiel #3
0
 public abstract float GetHeading(NorthType type);
Beispiel #4
0
        public override float GetHeading(NorthType type)
        {
            double heading = 0;
            if ( (CLLocationManager.HeadingAvailable) && (unityHeading != null) ){
                if (type == NorthType.TrueNorth) {
                    heading = unityHeading.TrueHeading;
                }
                if (type == NorthType.MagneticNorth) {
                    heading = unityHeading.MagneticHeading;
                }
            } else {
                #if DEBUG
                SystemLogger.Log (SystemLogger.Module.PLATFORM, "getGeoHeadingAttributes(): HeadingAvailable = false");
                #endif
            }
            #if DEBUG
            SystemLogger.Log (SystemLogger.Module.PLATFORM, "GetHeading(): Heading:" + heading);
            #endif

            return (float)heading;
        }
Beispiel #5
0
 public abstract Task <float> GetHeading(NorthType type);
Beispiel #6
0
 public abstract float GetHeading(NorthType type);
Beispiel #7
0
 public override float GetHeading(NorthType type)
 {
     throw new NotImplementedException();
 }