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; }
public abstract Task<float> GetHeading(NorthType type);
public abstract float GetHeading(NorthType type);
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; }
public abstract Task <float> GetHeading(NorthType type);
public override float GetHeading(NorthType type) { throw new NotImplementedException(); }