Commit eabe914e authored by filatov's avatar filatov
Browse files

ITS STF449 branch merged into trunk

parents f4e05738 fc3f08f4
...@@ -7,7 +7,7 @@ DEFINITIONS AUTOMATIC TAGS ::= ...@@ -7,7 +7,7 @@ DEFINITIONS AUTOMATIC TAGS ::=
BEGIN BEGIN
IMPORTS IMPORTS
ItsPduHeader, CauseCode, StationID, Speed, InformationQuality, ReferencePosition, ClosedLanes, DangerousGoodsExtended, Heading, LaneNumber, LightBarSirenInUse, PathHistory, RoadClass, HeightLonCarr, PosLonCarr, PosPillar, PosCentMass, PositioningSolutionType, RequestResponseIndication, StationType, SpeedLimit, StationarySince, TimestampIts, WheelBaseVehicle, TurningRadius, PosFrontAx, PositionOfOccupants, Temperature, VehicleMass, VehicleIdentification, EnergyStorageType FROM ITS-Container { ItsPduHeader, CauseCode, StationID, Speed, InformationQuality, ReferencePosition, ClosedLanes, DangerousGoodsExtended, Heading, LaneNumber, LightBarSirenInUse, PathHistory, RoadType, HeightLonCarr, PosLonCarr, PosPillar, PosCentMass, PositioningSolutionType, RequestResponseIndication, StationType, SpeedLimit, StationarySince, TimestampIts, WheelBaseVehicle, TurningRadius, PosFrontAx, PositionOfOccupants, Temperature, VehicleMass, VehicleIdentification, EnergyStorageType FROM ITS-Container {
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (1) itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (1)
}; };
...@@ -49,7 +49,7 @@ LocationContainer ::= SEQUENCE { ...@@ -49,7 +49,7 @@ LocationContainer ::= SEQUENCE {
eventSpeed Speed OPTIONAL, eventSpeed Speed OPTIONAL,
eventPositionHeading Heading OPTIONAL, eventPositionHeading Heading OPTIONAL,
traces Traces, traces Traces,
roadClass RoadClass OPTIONAL roadType RoadType OPTIONAL
} }
ImpactReductionContainer ::= SEQUENCE { ImpactReductionContainer ::= SEQUENCE {
......
...@@ -8,7 +8,7 @@ BEGIN ...@@ -8,7 +8,7 @@ BEGIN
ItsPduHeader ::= SEQUENCE { ItsPduHeader ::= SEQUENCE {
protocolVersion INTEGER{ currentVersion(1) } (0..255), protocolVersion INTEGER{ currentVersion(1) } (0..255),
messageID INTEGER{ denm(1),cam(2), poi(3) } (0..255), messageID INTEGER{ denm(1),cam(2), poi(3), spat(4), map(5), ivi(6), ivs(7), ev-rsr(8) } (0..255),
stationID StationID stationID StationID
} }
...@@ -18,33 +18,50 @@ ReferencePosition ::= SEQUENCE { ...@@ -18,33 +18,50 @@ ReferencePosition ::= SEQUENCE {
latitude Latitude, latitude Latitude,
longitude Longitude, longitude Longitude,
positionConfidenceEllipse PosConfidenceEllipse , positionConfidenceEllipse PosConfidenceEllipse ,
elevation Elevation altitude Altitude
} }
DeltaReferencePosition ::= SEQUENCE { DeltaReferencePosition ::= SEQUENCE {
deltaLatitude DeltaLatitude, deltaLatitude DeltaLatitude,
deltaLongitude DeltaLongitude, deltaLongitude DeltaLongitude,
deltaElevation DeltaElevation deltaAltitude DeltaAltitude
} }
Longitude ::= INTEGER { oneMicrodegreeEast (10), oneMicrodegreeWest (-10), unavailable(1800000001) } (-1799999999..1800000001) -- multiples of 0.1 microdegree Longitude ::= INTEGER { oneMicrodegreeEast (10), oneMicrodegreeWest (-10), unavailable(1800000001) } (-1799999999..1800000001) -- multiples of 0.1 microdegree
Latitude ::= INTEGER { oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10), unavailable(900000001) } (-900000000..900000001) -- multiples of 0.1 microdegree Latitude ::= INTEGER { oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10), unavailable(900000001) } (-900000000..900000001) -- multiples of 0.1 microdegree
Elevation ::= SEQUENCE { Altitude ::= SEQUENCE {
elevationValue ElevationValue, altitudeValue AltitudeValue,
elevationConfidence ElevationConfidence altitudeConfidence AltitudeConfidence
} }
ElevationValue ::= INTEGER { seaLevel(0), oneMeter(1), unavailable(7191) } (-1000..7191) AltitudeValue ::= INTEGER { seaLevel(0), oneCentimeter(1), unavailable(800001) } (-100000..800001)
ElevationConfidence ::= INTEGER { withinOneMeter(1), outOfRange(126), unavailable(127) } (1..127) AltitudeConfidence ::= ENUMERATED {
alt-000-01 (0),
alt-000-02 (1),
alt-000-05 (2),
alt-000-10 (3),
alt-000-20 (4),
alt-000-50 (5),
alt-001-00 (6),
alt-002-00 (7),
alt-005-00 (8),
alt-010-00 (9),
alt-020-00 (10),
alt-050-00 (11),
alt-100-00 (12),
alt-200-00 (13),
outOfRange (14),
unavailable (15)
}
DeltaLongitude ::= INTEGER { oneMicrodegreeEast (10), oneMicrodegreeWest (-10) } (-131072..131071) -- multiples of 0.1 microdegree DeltaLongitude ::= INTEGER { oneMicrodegreeEast (10), oneMicrodegreeWest (-10) } (-131072..131071) -- multiples of 0.1 microdegree
DeltaLatitude ::= INTEGER { oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10) } (-131072..131071) -- multiples of 0.1 microdegree DeltaLatitude ::= INTEGER { oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10) } (-131072..131071) -- multiples of 0.1 microdegree
DeltaElevation ::= INTEGER { oneMeterUp (1), oneMeterDown (-1), unavailable(128) } (-127..128) DeltaAltitude ::= INTEGER { oneCentimeterUp (1), oneCentimeterDown (-1), unavailable(12800) } (-12700..12800)
PosConfidenceEllipse ::= SEQUENCE { PosConfidenceEllipse ::= SEQUENCE {
...@@ -70,13 +87,13 @@ PtActivationType ::= INTEGER { undefinedCodingType(0), r09-16CodingType(1), vdv- ...@@ -70,13 +87,13 @@ PtActivationType ::= INTEGER { undefinedCodingType(0), r09-16CodingType(1), vdv-
PtActivationData ::= OCTET STRING (SIZE(1..20)) PtActivationData ::= OCTET STRING (SIZE(1..20))
AccelerationControl ::= BIT STRING { AccelerationControl ::= BIT STRING {
brakePedalActive (0), brakePedalEngaged (0),
gasPedalActive (1), gasPedalEngaged (1),
emergencyBrakeActive (2), emergencyBrakeEngaged (2),
collisionWarningActive (3), collisionWarningEngaged (3),
accActive (4), accEngaged (4),
cruiseControl (5), cruiseControlEngaged (5),
speedLimiterActive (6) speedLimiterEngaged (6)
} (SIZE(7)) } (SIZE(7))
...@@ -159,7 +176,7 @@ SemiAxisLength ::= INTEGER{ oneCentimeter(1), outOfRange(4094), unavailable(4095 ...@@ -159,7 +176,7 @@ SemiAxisLength ::= INTEGER{ oneCentimeter(1), outOfRange(4094), unavailable(4095
DangerousEndOfQueueSubCauseCode ::= INTEGER {unavailable(0), suddenEndOfQueue(1), queueOverHill(2), queueAroundBend(3), queueInTunnel(4) } (0..255) DangerousEndOfQueueSubCauseCode ::= INTEGER {unavailable(0), suddenEndOfQueue(1), queueOverHill(2), queueAroundBend(3), queueInTunnel(4) } (0..255)
DangerousSituationSubCauseCode ::= INTEGER {unavailable(0), emergencyElectronicBrake(1), preCrashSystemActivated(2), espActivated(3), absActivated(4), aebActivated(5), brakeWarningActivated(6), collisionRiskWarningActivated(7) } (0..255) DangerousSituationSubCauseCode ::= INTEGER {unavailable(0), emergencyElectronicBrakeEngaged(1), preCrashSystemEngaged(2), espEngaged(3), absEngaged(4), aebEngaged(5), brakeWarningEngaged(6), collisionRiskWarningEngaged(7) } (0..255)
VehicleBreakdownSubCauseCode ::= INTEGER {unavailable(0), lackOfFuel (1), lackOfBatteryPower (2), engineProblem(3), transmissionProblem(4), engineCoolingProblem(5), brakingSystemProblem(6), steeringProblem(7), tyrePuncture(8)} (0..255) VehicleBreakdownSubCauseCode ::= INTEGER {unavailable(0), lackOfFuel (1), lackOfBatteryPower (2), engineProblem(3), transmissionProblem(4), engineCoolingProblem(5), brakingSystemProblem(6), steeringProblem(7), tyrePuncture(8)} (0..255)
...@@ -316,7 +333,7 @@ PosCentMass ::= INTEGER { tenCentimeters(1), unavailable(63) } (0..63) ...@@ -316,7 +333,7 @@ PosCentMass ::= INTEGER { tenCentimeters(1), unavailable(63) } (0..63)
RequestResponseIndication ::= ENUMERATED { request(0), response(1) } RequestResponseIndication ::= ENUMERATED { request(0), response(1) }
SpeedLimit ::= INTEGER { oneKmPerHour(1) } (0..150) SpeedLimit ::= INTEGER { oneKmPerHour(1) } (0..255)
StationarySince ::= ENUMERATED { lessThan1Minute(0), lessThan2Minutes(1), lessThan15Minutes(2), over15Minutes(3) } StationarySince ::= ENUMERATED { lessThan1Minute(0), lessThan2Minutes(1), lessThan15Minutes(2), over15Minutes(3) }
...@@ -371,8 +388,6 @@ VehicleLength ::= SEQUENCE { ...@@ -371,8 +388,6 @@ VehicleLength ::= SEQUENCE {
vehicleLengthValue VehicleLengthValue, vehicleLengthValue VehicleLengthValue,
vehicleLengthConfidenceIndication VehicleLengthConfidenceIndication vehicleLengthConfidenceIndication VehicleLengthConfidenceIndication
} }
WMInumber ::= IA5String (SIZE(1..3))
VehicleLengthValue ::= INTEGER { tenCentimeters(1), outOfRange(1022), unavailable(1023) } (1..1023) VehicleLengthValue ::= INTEGER { tenCentimeters(1), outOfRange(1022), unavailable(1023) } (1..1023)
...@@ -383,11 +398,11 @@ VehicleWidth ::= INTEGER { tenCentimeters(1), outOfRange(61), unavailable(62) } ...@@ -383,11 +398,11 @@ VehicleWidth ::= INTEGER { tenCentimeters(1), outOfRange(61), unavailable(62) }
PathHistory::= SEQUENCE (SIZE(0..23)) OF PathPoint PathHistory::= SEQUENCE (SIZE(0..23)) OF PathPoint
EmergencyPriority ::= INTEGER { requestForRightOfWay(0), requestForFreeCrossingAtATrafficLight(1) } (0..1) EmergencyPriority ::= BIT STRING { requestForRightOfWay(0), requestForFreeCrossingAtATrafficLight(1) } (SIZE(2))
InformationQuality ::= INTEGER { unavailable(0), lowest(1), highest(7) } (0..7) InformationQuality ::= INTEGER { unavailable(0), lowest(1), highest(7) } (0..7)
RoadClass ::= ENUMERATED { RoadType ::= ENUMERATED {
urban-NoStructuralSeparationToOppositeLanes(0), urban-NoStructuralSeparationToOppositeLanes(0),
urban-WithStructuralSeparationToOppositeLanes(1), urban-WithStructuralSeparationToOppositeLanes(1),
nonUrban-NoStructuralSeparationToOppositeLanes(2), nonUrban-NoStructuralSeparationToOppositeLanes(2),
...@@ -415,16 +430,17 @@ YawRateValue ::= INTEGER { straight(0), degSec-000-01ToRight(-1), degSec-000-01T ...@@ -415,16 +430,17 @@ YawRateValue ::= INTEGER { straight(0), degSec-000-01ToRight(-1), degSec-000-01T
-- LSB units of 0.01 degrees per second -- LSB units of 0.01 degrees per second
YawRateConfidence ::= ENUMERATED { YawRateConfidence ::= ENUMERATED {
unavailable (0), degSec-000-01 (0),
degSec-100-00 (1), -- within 100 deg/sec degSec-000-05 (1),
degSec-010-00 (2), -- within 10 deg/sec degSec-000-10 (2),
degSec-005-00 (3), -- within 5 deg/sec degSec-001-00 (3),
degSec-001-00 (4), -- within 1 deg/sec degSec-005-00 (4),
degSec-000-10 (5), -- within 0.1 deg/sec degSec-010-00 (5),
degSec-000-05 (6), -- within 0.05 deg/sec degSec-100-00 (6),
degSec-000-01 (7), -- within 0.01 deg/sec outOfRange (7),
outOfRange (8) unavailable (8)
} }
END END
...@@ -12,10 +12,10 @@ module LibItsBtp_TypesAndValues { ...@@ -12,10 +12,10 @@ module LibItsBtp_TypesAndValues {
// LibIts // LibIts
import from CAM_PDU_Descriptions language "ASN.1:1997" { import from CAM_PDU_Descriptions language "ASN.1:1997" {
type CamPdu type CAM
}; };
import from DENM_PDU_Descriptions language "ASN.1:1997" { import from DENM_PDU_Descriptions language "ASN.1:1997" {
type DenmPdu type DENM
}; };
group btpPdus { group btpPdus {
...@@ -84,6 +84,8 @@ module LibItsBtp_TypesAndValues { ...@@ -84,6 +84,8 @@ module LibItsBtp_TypesAndValues {
group btpPayload { group btpPayload {
type octetstring BtpRawPayload;
/** /**
* @desc The payload of the BTP packet * @desc The payload of the BTP packet
* @member decodedPayload The decoded payload * @member decodedPayload The decoded payload
...@@ -91,7 +93,7 @@ module LibItsBtp_TypesAndValues { ...@@ -91,7 +93,7 @@ module LibItsBtp_TypesAndValues {
*/ */
type record BtpPayload { type record BtpPayload {
DecodedBtpPayload decodedPayload optional, DecodedBtpPayload decodedPayload optional,
octetstring rawPayload BtpRawPayload rawPayload
} }
/** /**
...@@ -101,8 +103,8 @@ module LibItsBtp_TypesAndValues { ...@@ -101,8 +103,8 @@ module LibItsBtp_TypesAndValues {
* @member * @member
*/ */
type union DecodedBtpPayload { type union DecodedBtpPayload {
CamPdu camPacket, CAM camPacket,
DenmPdu denmPacket DENM denmPacket
} with { } with {
encode (camPacket) "LibItsCam_asn1"; encode (camPacket) "LibItsCam_asn1";
encode (denmPacket) "LibItsDenm_asn1" encode (denmPacket) "LibItsDenm_asn1"
...@@ -148,7 +150,7 @@ module LibItsBtp_TypesAndValues { ...@@ -148,7 +150,7 @@ module LibItsBtp_TypesAndValues {
type boolean UtResult; type boolean UtResult;
} }
with { with {
encode "LibItsCommon_TypesAndValues" encode "LibItsCommon"
} }
/** /**
...@@ -170,5 +172,5 @@ module LibItsBtp_TypesAndValues { ...@@ -170,5 +172,5 @@ module LibItsBtp_TypesAndValues {
} }
with { with {
encode "LibItsBtp_TypesAndValues" encode "LibItsBtp"
} }
/** /**
* @author ETSI / STF405 * @author ETSI / STF405 / STF449
* @version $URL$ * @version $URL$
* $Id$ * $Id$
* @desc Module containing common functions for ITS CAM * @desc Module containing common functions for ITS CAM
* *
*/ */
module LibItsCam_Functions { module LibItsCam_Functions {
...@@ -14,9 +14,10 @@ module LibItsCam_Functions { ...@@ -14,9 +14,10 @@ module LibItsCam_Functions {
// LibIts // LibIts
import from LibItsCam_TestSystem all; import from LibItsCam_TestSystem all;
import from LibItsCam_Templates all; import from LibItsCam_Templates all;
import from LibItsCam_Pixits all;
import from LibItsCam_TypesAndValues all; import from LibItsCam_TypesAndValues all;
import from LibItsCommon_Functions all; import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all; import from CAM_PDU_Descriptions language "ASN.1:1997" all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from DENM_PDU_Descriptions language "ASN.1:1997" all;
...@@ -31,7 +32,7 @@ module LibItsCam_Functions { ...@@ -31,7 +32,7 @@ module LibItsCam_Functions {
utPort.send(p_init); utPort.send(p_init);
tc_wait.start; tc_wait.start;
alt { alt {
[] utPort.receive(UtResult:true) { [] utPort.receive(UtInitializeResult:true) {
tc_wait.stop; tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***"); log("*** f_utInitializeIut: INFO: IUT initialized ***");
} }
...@@ -55,12 +56,12 @@ module LibItsCam_Functions { ...@@ -55,12 +56,12 @@ module LibItsCam_Functions {
* @desc Triggers event from the application layer * @desc Triggers event from the application layer
* @param p_event The event to trigger. * @param p_event The event to trigger.
*/ */
function f_utTriggerEvent(template (value) UtEvent p_event) runs on ItsCam { function f_utTriggerEvent(template (value) UtCamTrigger p_event) runs on ItsCam {
var template (value) UtTrigger v_utMsg := { p_event };
utPort.send(p_event);
utPort.send(v_utMsg); tc_wait.start;
alt { alt {
[] utPort.receive(UtResult:true) { [] utPort.receive(UtCamTriggerResult:true) {
tc_wait.stop; tc_wait.stop;
} }
[] utPort.receive { [] utPort.receive {
...@@ -79,13 +80,13 @@ module LibItsCam_Functions { ...@@ -79,13 +80,13 @@ module LibItsCam_Functions {
* @param p_event The event to check. * @param p_event The event to check.
* @param p_discard The event should not appear. Default value: FALSE. * @param p_discard The event should not appear. Default value: FALSE.
*/ */
function f_utCheckEvent(template (value) UtEvent p_event, boolean p_discard) runs on ItsCam { function f_utCheckEvent(template (value) UtCamTrigger p_event, boolean p_discard := false) runs on ItsCam {
var template (value) UtCheck v_utMsg := { p_event }; var template (value) UtCheck v_utMsg := { p_event };
utPort.send(v_utMsg); utPort.send(v_utMsg);
tc_wait.start; tc_wait.start;
alt { alt {
[] utPort.receive(UtResult:true) { [] utPort.receive(UtCamTriggerResult:true) {
tc_wait.stop; tc_wait.stop;
if (p_discard == false) { if (p_discard == false) {
log("*** f_utCheckEvent: INFO: Event correctly indicated at application layer ***"); log("*** f_utCheckEvent: INFO: Event correctly indicated at application layer ***");
...@@ -95,7 +96,7 @@ module LibItsCam_Functions { ...@@ -95,7 +96,7 @@ module LibItsCam_Functions {
f_selfOrClientSyncAndVerdict("error", e_error); f_selfOrClientSyncAndVerdict("error", e_error);
} }
} }
[] utPort.receive(UtResult:false) { [] utPort.receive(UtCamTriggerResult:false) {
tc_wait.stop; tc_wait.stop;
if (p_discard == false) { if (p_discard == false) {
log("*** f_utCheckEvent: ERROR: Event not correctly indicated at application layer ***"); log("*** f_utCheckEvent: ERROR: Event not correctly indicated at application layer ***");
...@@ -107,7 +108,7 @@ module LibItsCam_Functions { ...@@ -107,7 +108,7 @@ module LibItsCam_Functions {
} }
[] tc_wait.timeout { [] tc_wait.timeout {
log("*** f_utCheckEvent: ERROR: Timeout while waiting for event check result ***"); log("*** f_utCheckEvent: ERROR: Timeout while waiting for event check result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout); f_selfOrClientSyncAndVerdict("error", e_timeout);
} }
[else] { // Shortcut defaults [else] { // Shortcut defaults
repeat; repeat;
...@@ -149,7 +150,7 @@ module LibItsCam_Functions { ...@@ -149,7 +150,7 @@ module LibItsCam_Functions {
* @desc basic default behaviour handling * @desc basic default behaviour handling
*/ */
altstep a_default() runs on ItsCam { altstep a_default() runs on ItsCam {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){ [] camPort.receive(mw_camInd ( mw_camMsg_any )){
log("*** a_default: INFO: CAM message received in default ***"); log("*** a_default: INFO: CAM message received in default ***");
vc_camReceived := true; vc_camReceived := true;
...@@ -185,9 +186,22 @@ module LibItsCam_Functions { ...@@ -185,9 +186,22 @@ module LibItsCam_Functions {
f_utInitializeIut(m_camInitialize); f_utInitializeIut(m_camInitialize);
// basic default altstep // basic default altstep
activate(a_default()); activate(a_default());
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Received initial CAM ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial CAM not received ***");
f_selfOrClientSyncAndVerdictPreamble("error", e_timeout);
}
}
} // end f_prInitialState } // end f_prInitialState
} // end of preambles } // end of preambles
...@@ -202,100 +216,33 @@ module LibItsCam_Functions { ...@@ -202,100 +216,33 @@ module LibItsCam_Functions {
} }
} // end group postambles } // end group postambles
group otherFunctions {
/** @desc function to generate a random bitstring value
* corresponding to 1 bit position set to 1 (eg '00010000', '01000000', ...)
* @see f_random
* @param p_length bitstring length - max 15
* @return bitstring
*
*/
function f_bitPositionRandom( in integer p_length )
return bitstring {
//Variables
var bitstring v_random := '1'B;
var integer i := 0;
for(i:=0; i < (p_length - 1); i:=i+1) {
v_random := '0'B & v_random;
}
v_random := v_random << f_random(0, (p_length - 1));
log("*** f_bitPositionRandom: INFO: OK - random value = " & bit2str(v_random) & " ***");
return v_random;
} // end function f_bitPositionRandom
} // end group otherFunctions group camPositionFunctions {
group getIutFunctions {
/**
* @desc Function to get the PT Line Description
* @see PX_PTLINE_COURSE, PX_PTLINE_REF, PX_PTLINE_ROUTE
*/
function f_getIutPtLineDescription()
return PTLineDescription {
var PTLineDescription v_ptLineDescription := {"", "", ""};
v_ptLineDescription := {PX_PTLINE_COURSE, PX_PTLINE_REF, PX_PTLINE_ROUTE};
return v_ptLineDescription ;
} // end function f_getIutPtLineDescription
} // end getIutFunctions
group getTesterFunctions {
/**
* @desc Gets tester's station characteristics
* @return Station characteristics
* @see PX_TESTER_IS_MOBILE, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT
*/
function f_getTesterStationCharacteristics()
return CoopAwareness.stationCharacteristics {
var CoopAwareness.stationCharacteristics v_stationCharacteristics := { true, true, true };
v_stationCharacteristics := {PX_TESTER_IS_MOBILE, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT};
return v_stationCharacteristics ;
} // end f_getTesterStationCharacteristics
/** /**
* @desc Creates a valid CAM for tester * @desc Compute a position using a reference position, a distance
* and an orientation
*
* @param p_referencePosition The base reference position.
* @param p_offSet Distance to the reference position (in meter).
*
* @return The new reference position.
*/ */
function f_getTesterValidCam() function f_computePositionUsingDistance(in ReferencePosition p_referencePosition, in integer p_offSet) return ReferencePosition {
return template (value) CamPdu { var ReferencePosition v_referencePosition := p_referencePosition;
var CoopAwareness.stationCharacteristics v_stationCharacteristics; log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***");
fx_computePositionUsingDistance(
if(PX_TESTER_IS_MOBILE == false) { p_referencePosition.latitude,
// basic IRS p_referencePosition.longitude,
v_stationCharacteristics := {false, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; p_offSet,
return m_camMsg_irs( p_referencePosition.positionConfidenceEllipse.semiMajorOrientation.headingValue,
f_getCurrentTime(), v_referencePosition.latitude,
f_getTsStationId(), v_referencePosition.longitude
v_stationCharacteristics, );
m_tsPosition return v_referencePosition;
); }
}
else {
// Vehicle
v_stationCharacteristics := {true, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT};
return m_camMsg_vehicle(
f_getCurrentTime(),
f_getTsStationId(),
v_stationCharacteristics,
m_tsPosition
);
}
} // end f_getTesterValidCam
} // end getTesterFunctions } // end group camPositionFunctions
} // end LibItsCam_Functions } // end LibItsCam_Functions
\ No newline at end of file
/** /**
* @author ETSI / STF405 * @author ETSI / STF405 / STF449
* @version $URL$ * @version $URL$
* $Id$ * $Id$
* @desc CAM PICS * @desc CAM PICS
* *
*/ */
module LibItsCam_Pics { module LibItsCam_Pics {
...@@ -13,110 +13,82 @@ module LibItsCam_Pics { ...@@ -13,110 +13,82 @@ module LibItsCam_Pics {
group camPics {