private void OnTrueNorthHeadingUpdated(object sender, pLab_NorthHeadingUpdatedEventArgs e) { if (headingDifferenceText != null) { headingDifferenceText.text = string.Format("Comp-Cam Dif {0} deg", e.heading); } }
private void OnNorthHeadingUpdated(object sender, pLab_NorthHeadingUpdatedEventArgs e) { if (e.isPriority || TimeSpan.FromMilliseconds(e.timestamp - previousUpdateTimestamp).TotalSeconds > 5f) { RotatePOIsRelativeToNorth(e.heading, e.isPriority); } }
/// <summary> /// Trigger the NorthHeadingUpdatedEvent /// </summary> private void TriggerNorthHeadingUpdatedEvent(bool isPriority = false) { if (OnHeadingUpdated != null) { pLab_NorthHeadingUpdatedEventArgs args = new pLab_NorthHeadingUpdatedEventArgs() { heading = heading, timestamp = headingTimestamp, isPriority = isPriority }; OnHeadingUpdated(this, args); } }