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;
 }
Esempio n. 2
0
 public abstract Task<float> GetHeading(NorthType type);
Esempio n. 3
0
 public abstract float GetHeading(NorthType type);
Esempio n. 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;
        }
Esempio n. 5
0
 public abstract Task <float> GetHeading(NorthType type);
Esempio n. 6
0
 public abstract float GetHeading(NorthType type);
Esempio n. 7
0
 public override float GetHeading(NorthType type)
 {
     throw new NotImplementedException();
 }