TPM: check OBU heading vs TPI angle
This commit is contained in:
parent
3d8a851263
commit
56e00f2cc5
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue