Commit 739f1ca2 authored by garciay's avatar garciay
Browse files

Update RSU values after Kapsch feedbacks

parent ac8ed058
......@@ -202,6 +202,7 @@ module ItsRSUsSimulator_Functions {
));
// Update ivi status
v_ivim.ivi.mandatory.validFrom := f_getCurrentTime();
v_ivim.ivi.mandatory.validTo := valueof(v_ivim.ivi.mandatory.validFrom) + 43200000; // 12hours
} else {
vc_ivim := false;
}
......@@ -219,7 +220,7 @@ module ItsRSUsSimulator_Functions {
v_denmEventsParmsPerZone[v_counter].causeCodeType,
v_denmEventsParmsPerZone[v_counter].eventHistory,
v_denmEventsParmsPerZone[v_counter].traces,
-,
PICS_DENM_VALIDITY_DURATION,
PICS_DENM_RELEVANCE_DISTANCE,
PICS_DENM_RELEVANCE_TRAFFIC_DIRECTION
);
......@@ -235,7 +236,7 @@ module ItsRSUsSimulator_Functions {
v_denms[v_counter].denm.alacarte := m_alacarte(v_denmEventsParmsPerZone[v_counter].roadWorksContainerExtended);
}
} // End of 'for' statement
// Update referenceDenms field
// Update referenceDenms field, all except the current one
for (v_counter := 0; v_counter < lengthof(PICS_DENM_EVENTS_RSU[p_rsu_id][PX_ETSI_ZONE_ID - 1]); v_counter := v_counter + 1) {
if (ispresent(v_denms[v_counter].denm.alacarte.roadWorks)) {
var integer v_referenceDenms := 0;
......@@ -300,7 +301,16 @@ module ItsRSUsSimulator_Functions {
v_ssem
);
if (PICS_RSU_PARAMS[p_rsu_id].geoShape == e_geoCircle) {
vc_geoArea := f_computeCircularArea(vc_longPosVectorRsu, PICS_RSU_PARAMS[p_rsu_id].geoParms.radius);
vc_geoArea := {
shape := e_geoCircle,
area := {
geoAreaPosLatitude := vc_longPosVectorRsu.latitude,
geoAreaPosLongitude := vc_longPosVectorRsu.longitude,
distanceA := PICS_RSU_PARAMS[p_rsu_id].geoParms.radius,
distanceB := PICS_RSU_PARAMS[p_rsu_id].geoParms.radius,
angle := 0
}
}
} else {
log("*** " & testcasename() & ": INCONC: Wrong PICS_RSU_GEOAREA_FORM event initialisation ***");
setverdict(inconc);
......@@ -376,11 +386,15 @@ module ItsRSUsSimulator_Functions {
} // End of function f_prepare_cam
function f_prepare_denm(
out template (value) Payload p_payload
out template (value) Payload p_payload,
in boolean p_cancellation := false
) runs on ItsRSUsSimulator {
// Update dynamic parms
vc_rsuMessagesValueList[vc_rsu_id].denms[vc_denmEventCounter].denm.management.referenceTime := f_getCurrentTime();
if (p_cancellation == true) {
vc_rsuMessagesValueList[vc_rsu_id].denms[vc_denmEventCounter].denm.management.termination := isCancellation;
}
p_payload := valueof(
f_adaptPayload(
bit2oct(
......@@ -560,17 +574,17 @@ module ItsRSUsSimulator_Functions {
function f_send_vehicle_cam(
in template (value) CAM p_camSimu,
in template (value) CAM p_camVehicle
in CAM p_camVehicle
) runs on ItsRSUsSimulator {
// Local variables
var LongPosVector v_vehiclePosition := PICS_UC6_VEHICLE_POSITION;
var float v_distanceToCollision;
var SpeedValue v_vehicleSpeed := valueof(p_camVehicle.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue);
var SpeedValue v_vehicleSpeed := p_camVehicle.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue;
var template (value) Payload v_payload;
// Compute distance to collision point
v_vehiclePosition.latitude := valueof(p_camVehicle.cam.camParameters.basicContainer.referencePosition.latitude);
v_vehiclePosition.longitude := valueof(p_camVehicle.cam.camParameters.basicContainer.referencePosition.longitude);
v_vehiclePosition.latitude := p_camVehicle.cam.camParameters.basicContainer.referencePosition.latitude;
v_vehiclePosition.longitude := p_camVehicle.cam.camParameters.basicContainer.referencePosition.longitude;
v_distanceToCollision := LibItsGeoNetworking_Functions.f_distance(
v_vehiclePosition,
PICS_UC6_COLLISION_POINT
......@@ -595,13 +609,13 @@ module ItsRSUsSimulator_Functions {
PICS_CAM_BTP_SOURCE_PORT
)
);
// FIXME Update GN
/*vc_longPosVectorRsu := PICS_UC6_VEHICLE_POSITION;
vc_longPosVectorRsu.latitude := PICS_USECASE6_VEHICLE_POSITIONS[p_idx].latitude;
vc_longPosVectorRsu.longitude := PICS_USECASE6_VEHICLE_POSITIONS[p_idx].longitude;
// Update GN
vc_longPosVectorRsu := PICS_UC6_VEHICLE_POSITION;
vc_longPosVectorRsu.latitude := valueof(p_camSimu.cam.camParameters.basicContainer.referencePosition.latitude);
vc_longPosVectorRsu.longitude := valueof(p_camSimu.cam.camParameters.basicContainer.referencePosition.longitude);
vc_geoArea := PICS_UC6_VEHICLE_GEOAREA;
vc_geoArea.area.geoAreaPosLatitude := PICS_USECASE6_VEHICLE_POSITIONS[p_idx].latitude;
vc_geoArea.area.geoAreaPosLongitude := PICS_USECASE6_VEHICLE_POSITIONS[p_idx].longitude;*/
vc_geoArea.area.geoAreaPosLatitude := valueof(p_camSimu.cam.camParameters.basicContainer.referencePosition.latitude);
vc_geoArea.area.geoAreaPosLongitude := valueof(p_camSimu.cam.camParameters.basicContainer.referencePosition.longitude);
// And send it
f_send(v_payload, PICS_CAM_ITS_AID);
......@@ -635,7 +649,7 @@ module ItsRSUsSimulator_Functions {
valueof(p_payload)
),
m_defaultLifetime,
c_defaultHopLimit
c_hopLimit1
));
}
f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_geoNetworkingPdu, p_its_aid)));
......
......@@ -61,7 +61,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111101,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU1
} // End of PICS_RSU1
......@@ -103,7 +103,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111102,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU2
} // End of PICS_RSU2
......@@ -145,7 +145,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111103,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU3
} // End of PICS_RSU3
......@@ -187,7 +187,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111104,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU4
} // End of PICS_RSU4
......@@ -229,7 +229,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111105,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU5
} // End of PICS_RSU5
......@@ -271,7 +271,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111106,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU6
} // End of PICS_RSU6
......@@ -312,7 +312,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111107,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU7
} // End of PICS_RSU7
......@@ -353,7 +353,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111108,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU8
} // End of PICS_RSU8
......@@ -394,7 +394,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111109,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU9
} // End of PICS_RSU9
......@@ -435,7 +435,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111110,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU10
} // End of PICS_RSU10
......@@ -476,7 +476,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111111,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU11
} // End of PICS_RSU11
......@@ -517,7 +517,7 @@ module ItsRSUsSimulator_Pics {
stationID := 1111112,
geoShape := e_geoCircle,
geoParms := {
radius := 500
radius := 5000
},
pathHistory := PICS_RSU_PATH_HISTORY_RSU12
} // End of PICS_RSU12
......@@ -1210,9 +1210,9 @@ module ItsRSUsSimulator_Pics {
modulepar ProtectedCommunicationZone PICS_USECASE9_PCZ_1 := {
protectedZoneType := cenDsrcTolling,
expiryTime := omit,
protectedZoneLatitude := 435924080,
protectedZoneLongitude := 103374530,
protectedZoneRadius := 50,
protectedZoneLatitude := 435838400,
protectedZoneLongitude := 103249780,
protectedZoneRadius := 255,
protectedZoneID := 1
} // End of PICS_USECASE9_PCZ_1
......@@ -1241,8 +1241,8 @@ module ItsRSUsSimulator_Pics {
modulepar UInt32 PICS_DENM_ITS_AID := 37;
modulepar PosConfidenceEllipse PICS_DENM_POSITION_CONFIDENCE_ELLIPSE := {
semiMajorConfidence := SemiAxisLength_oneCentimeter_,
semiMinorConfidence := SemiAxisLength_oneCentimeter_,
semiMajorConfidence := 100,
semiMinorConfidence := 100,
semiMajorOrientation := HeadingValue_wgs84North_
} // End of PICS_DENM_POSITION_CONFIDENCE_ELLIPSE
......@@ -1261,6 +1261,11 @@ module ItsRSUsSimulator_Pics {
*/
modulepar RelevanceDistance PICS_DENM_RELEVANCE_DISTANCE := lessThan200m;
/**
* @desc DENM ValidityDuration
*/
modulepar ValidityDuration PICS_DENM_VALIDITY_DURATION := 90 * 60; // 90 minutes
/**
* @desc DENM RelevanceTrafficDirection
*/
......
......@@ -30,9 +30,9 @@ module ItsRSUsSimulator_Pixits {
* UC3 (TLM): PX_ETSI_USE_CASE_ID := 3
* UC5 (IVIM): PX_ETSI_USE_CASE_ID := 5
* UC6 (CAM): PX_ETSI_USE_CASE_ID := 6
* UC9 (CAM): PX_ETSI_USE_CASE_ID := 9
* UC9 (CAM): PX_ETSI_USE_CASE_ID := 9 !! PX_RSU_ID 5
*/
modulepar integer PX_ETSI_USE_CASE_ID := 1;
modulepar integer PX_ETSI_USE_CASE_ID := 6;
/**
* @desc Indicate which zone to simulate
......
......@@ -149,6 +149,12 @@ module ItsRSUsSimulator_TestCases {
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// Postamble
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].denms)) {
for (var integer v_i := 0; v_i < lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms); v_i := v_i + 1) {
f_prepare_denm(v_payload, true);
f_send(v_payload, PICS_DENM_ITS_AID);
} // End of 'for' statement
}
ItsRSUsSimulator_Functions.f_cf01Down();
} // End of TC_RSUSIMU_BV_01
......
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