TPM: check OBU heading vs TPI angle

This commit is contained in:
emanuel 2022-10-13 18:05:57 +01:00
parent 3d8a851263
commit 56e00f2cc5
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}