Skip to main content
Version: Next

Test

warning

Before going live, implementation should be tested in simulation mode on the ground, and in the air.

Recording

Recording turbulence works only in the air, so SDK provides a simulation mode to test it on the ground.

Use it for DEV ENV only. It can be set by env: .dev(serverUrl: nil) in SkyPath.start(). By default when no env parameter is passed, the production server is used.

// Set SDK to use the simulated location that you provide instead of the real from the device
SkyPath.shared.enableSimulation(true)

// Enable SDK to send turbulence and events to the server. Otherwise simulated events will not be sent. The default is disabled.
SkyPath.shared.enablePushSimulated(true)

// Stop simulation when not needed
SkyPath.shared.enableSimulation(false)

Provide your own simulated location. The simplest way is to have an array of CLLocationCoordinate2D on the same in air altitude and pass it by a timer with 1-second time intervals.

Please note that a correct course value in CLLocation passed to simulate is required for testing turbulence notifications (alerts) in a beam mode. Otherwise, the beam will head north up and not heading the simulated flight direction.

SkyPath.shared.simulatedLocation(location)

You can have some hidden developer options to enable/disable simulation mode for QA testing. Simulation mode can be enabled/disabled at any time.

Trigger a turbulence event by using a timer at some time intervals, or randomly during some time, or just by having a test button or your own event to trigger. Turbulence will not be tracked on the ground, so need an air-simulated location.

SkyPath.shared.simulateTurbulence(sev: .moderate)

If turbulence was recorded the SkyPathDelegate method will be called.

func detectedTurbulence(_ turbulence: TurbulenceItem) { }