AnnouncementUpdater
public class AnnouncementUpdater
The purpose of this object is to adjust the trigger points of the announcements to the FlaminGO requirements. The requirements are as follows:
Trigger points for motorways: * early - 2000 m * main - 700 m * confirmation - 100 m Trigger points for other roads: * early - 1000 m * main - 400 m * confirmation - 50 m
The algorithm tries to meet the requirements with a one exception. If previous instruction point is closer than the
required point the previous instruction point becomes the new trigger point.
For confirmation and main trigger points the algorithm also takes into account a threshold so that if an instruction
falls somewhere within 0.3 x distance between this and previous trigger point that instruction point becomes the
new trigger point.
AnnouncementUpdater
update announcement points to the instructions on the route.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes the
AnnouncementUpdater
with the trigger array.Declaration
Swift
public init(triggers: [AnnouncementTrigger] = AnnouncementUpdater.defaultTriggers)
Parameters
triggers
Custom triggers that define where to add the announcements. If no value is provided the updater will use the
defaultTriggers
.
-
Default triggers that define where to add the announcements.
Declaration
Swift
public static let defaultTriggers: [AnnouncementTrigger]