Commit c2877a8e authored by garciay's avatar garciay
Browse files

Validation of TD_AUTO_IOT_DENM_RWW_BV_01 done

parent a8efb6a6
......@@ -311,7 +311,6 @@ module ItsAutoInterop_Functions {
) runs on ItsAutoInteropGeonetworking /* TITAN TODO: mtc ItsMtc system ItsAutoInteropGeoNetworkingSystem */ {
// Wait components done
p_eut.done;
deactivate;
......@@ -450,7 +449,8 @@ module ItsAutoInterop_Functions {
function f_check_payload_cam(
in GeoNetworkingInd v_gnInd,
template (present) CAM p_cam
template (present) CAM p_cam,
out ThreeDLocation p_position
) return boolean {
var bitstring v_btp_payload := oct2bit(substr(v_gnInd.msgIn.gnPacket.packet.payload, 0, 4)); // FIXMEM Skip BTP, check if it is acceptable in an ATS
var bitstring v_cam_payload := oct2bit(substr(v_gnInd.msgIn.gnPacket.packet.payload, 4, lengthof(v_gnInd.msgIn.gnPacket.packet.payload) - 4)); // FIXMEM Skip BTP, check if it is acceptable in an ATS
......@@ -460,11 +460,20 @@ module ItsAutoInterop_Functions {
// Check Btp paylod
if (decvalue(v_cam_payload, v_decoded_cam) == 0) {
if (match(valueof(v_decoded_cam), p_cam) == true) {
return true;
}
log("f_check_payload_cam: checking ", v_decoded_cam);
if (match(valueof(v_decoded_cam), p_cam) == true) {
p_position.latitude := v_decoded_cam.cam.camParameters.basicContainer.referencePosition.latitude;
p_position.longitude := v_decoded_cam.cam.camParameters.basicContainer.referencePosition.longitude;
p_position.elevation := 0;//v_decoded_cam.cam.camParameters.basicContainer.referencePosition.altitude;
log("<<< f_check_payload_cam: true");
return true;
}
} else {
log("f_check_payload_cam: decvalue failed: ", bit2oct(v_cam_payload));
}
log("<<< f_check_payload_cam: false");
return false;
} // End of function f_check_payload_cam
......@@ -482,10 +491,10 @@ module ItsAutoInterop_Functions {
log(">>> f_check_payload_denm");
if (decvalue(v_denm_payload, v_decoded_denm) == 0) {
log("f_check_payload_denm: checking ", v_decoded_denm);
if (match(valueof(v_decoded_denm), p_denm) == true) {
log("<<< f_check_payload_denm: true");
return true;
}
if (match(valueof(v_decoded_denm), p_denm) == true) {
log("<<< f_check_payload_denm: true");
return true;
}
} else {
log("f_check_payload_denm: decvalue failed: ", bit2oct(v_denm_payload));
}
......@@ -506,8 +515,8 @@ module ItsAutoInterop_Functions {
* @see fx_computeDistance
*/
function f_distance(
in LongPosVector p_pointA,
in LongPosVector p_pointB
in ThreeDLocation p_pointA,
in ThreeDLocation p_pointB
) return float {
log("*** f_distance: INFO: calling PointA: ", p_pointA);
log("*** f_distance: INFO: calling PointB: ", p_pointB);
......@@ -537,8 +546,24 @@ module ItsAutoInterop_Functions {
// v_gnInd
// ));
}
[vc_gnDefaultActive] eutGeoNetworkingPort.receive { // Unexpected EutGeoNetworking message ==> require refine filtering above
log("*** a_default: ERROR: Received an unexpected message ***");
[] eutGeoNetworkingPort.receive(
mw_eutGeoNwInd(
mw_geoNwPdu(
mw_geoNwBroadcastPacketWithNextHeaderAndPayload(?, ?, ?, ?)
))) {
log("*** a_default: INFO: Received a GeoBroadcast message ***");
repeat;
}
[] eutGeoNetworkingPort.receive(
mw_eutGeoNwInd(
mw_geoNwPdu(
mw_geoNwShbPacketWithNextHeaderAndPayload
))) {
log("*** a_default: INFO: Received a SHB message ***");
repeat;
}
[] eutGeoNetworkingPort.receive { // Unexpected EutGeoNetworking message ==> require refine filtering above
log("*** a_default: INFO: Received an unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] a_shutdown() {
......
......@@ -61,7 +61,12 @@ module ItsAutoInterop_Pixits {
/**
* @desc Pre-defined security distance
*/
modulepar float PX_PRE_DEFINED_SECURITY_DISTANCE := 1.0;
modulepar float PX_PRE_DEFINED_SECURITY_DISTANCE := 10.0;
/**
* @desc Pre-defined security distance
*/
modulepar float PX_PRE_DEFINED_SECURITY_DISTANCE_EPSILON := 1.0;
/**
* @desc Pre-defined security distance for forward collision risk condition
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment