diff --git a/src/tpm.c b/src/tpm.c index a782ede..b5494a3 100644 --- a/src/tpm.c +++ b/src/tpm.c @@ -33,9 +33,13 @@ int tpm_is_inside_zone(tolling_info_t* ti) { itss_space_unlock(); if (itss_is_inside_polygon(point, ti->zone.polygon, ti->zone.polygon_len)) { - return 1; + uint16_t da = abs((int16_t)heading - (int16_t)ti->asn->angle); + if (da <= 900 || da >= 2700) { + return 1; + } } + return 0; }