Commit 739b1273 authored by berge's avatar berge
Browse files

Working on Mantis #5894

parent 15c9c0e7
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -173,6 +173,36 @@ module LibItsCam_Functions {
    
        } // end f_getTesterStationCharacteristics

        /**
         * @desc    Creates a valid CAM for tester
         */
        function f_getTesterValidCam()
        return template (value) CamPdu {
            
            var CoopAwareness.stationCharacteristics v_stationCharacteristics;
            
            if(PX_TESTER_IS_MOBILE == false) {
                // basic IRS
                v_stationCharacteristics := {false, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT};
                return m_camMsg_irs(
                    f_getCurrentTime(),
                    f_getTsStationId(),
                    v_stationCharacteristics,
                    f_getTsCurrentPosition()
                );
            }
            else {
                // Vehicle
                v_stationCharacteristics := {true, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT};
                return m_camMsg_vehicle(
                    f_getCurrentTime(),
                    f_getTsStationId(),
                    v_stationCharacteristics,
                    f_getTsCurrentPosition()
                );
            }
        } // end f_getTesterValidCam
        
    } // end getTesterFunctions

} // end LibItsCam_Functions
 No newline at end of file
+63 −2
Original line number Diff line number Diff line
@@ -248,13 +248,13 @@ module LibItsCam_Templates {
    }

    /**
     * @desc    Send template for CAM PDU
     * @desc    Send template for IRS CAM PDU
     * @param   p_generationTime Timestamp of the generated message
     * @param   p_stationId Station ID of the source
     * @param   p_stationCharacteristics Characteristics of the sending station
     * @param   p_referencePosition Position of the sending station
     */
    template (value) CamPdu m_camMsg_valid(
    template (value) CamPdu m_camMsg_irs(
        TimeStamp p_generationTime, 
        StationID p_stationId,
        CoopAwareness.stationCharacteristics p_stationCharacteristics,
@@ -273,6 +273,67 @@ module LibItsCam_Templates {
        }
    };
    
        /**
     * @desc    Send template for Vehicle CAM PDU
     * @param   p_generationTime Timestamp of the generated message
     * @param   p_stationId Station ID of the source
     * @param   p_stationCharacteristics Characteristics of the sending station
     * @param   p_referencePosition Position of the sending station
     */
    template (value) CamPdu m_camMsg_vehicle(
        TimeStamp p_generationTime, 
        StationID p_stationId,
        CoopAwareness.stationCharacteristics p_stationCharacteristics,
        template (value) ReferencePosition p_referencePosition
    ) := {
        header := {
            protocolVersion := 0,
            messageID := 0,
            generationTime := p_generationTime
        },
        cam := {
            stationID := p_stationId,
            stationCharacteristics := p_stationCharacteristics,
            referencePosition := p_referencePosition,
            camParameters := {
                vehicleCommonParameters := {
                    vehicleType := 0,
                    stationLength := 0,
                    stationLengthConfidence := 0,
                    stationWidth := 0,
                    stationWidthConfidence := 0,
                    vehicleSpeed := 0,
                    vehicleSpeedConfidence := 0,
                    longAcceleration := 0,
                    longAccelerationConfidence := 0,
                    accelerationControl := '000000'B,
                    yawRate := {
                    	yawDirection := right,
                    	yawRateValue := 0
                    },
                    yawRateConfidence := 0,
                    exteriorLights := '00000000'B,
                    turnAdvice := omit,
                    distanceToStopLine := omit,
                    occupancy := omit,
                    doorOpen := omit,
                    posConfidenceEllipse := {
                    	semiMajorConfidence := 0,
                        semiMinorConfidence := 0,
                        semiMajorOrientation := 0
                    },
                    curvature := 0,
                    curvatureChange := omit,
                    curvatureConfidence := 0,
                    crashStatus := omit,
                    headingConfidence := 0,
                    dangerousGoods := omit
                },
                profileDependent := omit
            }
        }
    };
    
    group camAnyVehicle {
        
        /**
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ module LibItsCommon_Pixits {
        longitude := {hemisphere := east, degree := 0},
        latitude := {hemisphere := north, degree := 0},
        elevation := 0,
        heading := omit,
        heading := 0,
        streetName := omit,
        positionConfidence := omit,
        elevationConfidence := omit,