| | | 1 | | namespace Itinero.MapMatching.Model; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// The model builder settings. |
| | | 5 | | /// </summary> |
| | | 6 | | // ReSharper disable once ClassNeverInstantiated.Global |
| | | 7 | | public class ModelBuilderSettings |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// GPS noise standard deviation in meters. Controls the emission probability (Gaussian). |
| | | 11 | | /// Lower values make the matcher prefer candidates closer to the GPS point. |
| | | 12 | | /// </summary> |
| | | 13 | | /// <remarks> |
| | | 14 | | /// Newson & Krumm (2009) use 4.07m (high quality GPS). |
| | | 15 | | /// GraphHopper uses 50m (very permissive). |
| | | 16 | | /// OSRM uses 5m. A value of 10m is a reasonable middle ground for consumer GPS. |
| | | 17 | | /// </remarks> |
| | 94 | 18 | | public double SigmaZ { get; set; } = 10.0; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Transition probability parameter in meters. Controls the exponential distribution |
| | | 22 | | /// over the absolute difference between great-circle distance and route distance. |
| | | 23 | | /// Higher values are more tolerant of indirect routes. |
| | | 24 | | /// </summary> |
| | | 25 | | /// <remarks> |
| | | 26 | | /// GraphHopper uses 2.0, Valhalla uses 3.0. |
| | | 27 | | /// </remarks> |
| | 92 | 28 | | public double Beta { get; set; } = 5.0; |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// The search radius in meters for finding snap point candidates. |
| | | 32 | | /// </summary> |
| | 98 | 33 | | public double SearchRadius { get; set; } = 50; |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Minimum distance in meters between consecutive track points. |
| | | 37 | | /// Points closer than this are skipped to avoid noise-induced issues. |
| | | 38 | | /// </summary> |
| | | 39 | | /// <remarks> |
| | | 40 | | /// Valhalla uses 10m. GraphHopper filters points closer than 2 * sigma. |
| | | 41 | | /// </remarks> |
| | 91 | 42 | | public double MinPointDistance { get; set; } = 10; |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// Maximum number of consecutive unmatched track points to skip before breaking the model. |
| | | 46 | | /// </summary> |
| | 91 | 47 | | public int MaxPointSkip { get; set; } = 3; |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Maximum great-circle distance in meters between consecutive track points |
| | | 51 | | /// before the trace is split into separate models. |
| | | 52 | | /// </summary> |
| | | 53 | | /// <remarks> |
| | | 54 | | /// Valhalla uses 2000m. |
| | | 55 | | /// </remarks> |
| | 91 | 56 | | public double BreakageDistance { get; set; } = 2000; |
| | | 57 | | |
| | | 58 | | /// <summary> |
| | | 59 | | /// Maximum factor applied to the great-circle distance between consecutive points |
| | | 60 | | /// to limit routing search distance. |
| | | 61 | | /// </summary> |
| | 90 | 62 | | public double MaxRouteDistanceFactor { get; set; } = 5.0; |
| | | 63 | | } |