Commit 66e081e8 authored by tepelmann's avatar tepelmann
Browse files

Moved external functions fx_computeDistance and...

Moved external functions fx_computeDistance and fx_computePositionUsingDistance from GeoNetworking to Common to be used by other modules (like Cam) as well.
parent 5b527e56
Loading
Loading
Loading
Loading
+33 −1
Original line number Diff line number Diff line
/**
 *    @author     ETSI / STF449
 *    @author     ETSI / STF405 / STF449
 *    @version    $URL$
 *                $Id$
 *    @desc       Module containing common functions for ITS
@@ -11,6 +11,7 @@ module LibItsCommon_Functions {
    // LibCommon
    import from LibCommon_Sync all;
    import from LibCommon_VerdictControl all;
    import from LibCommon_BasicTypesAndValues all;
    
    // LibIts
    import from LibItsCommon_Pixits all;
@@ -156,6 +157,37 @@ module LibItsCommon_Functions {
         */
        external function fx_getCurrentTime() return TimestampIts;
        
        /**
         * @desc    External function to compute distance between two points
         * @param   p_latitudeA   Latitude of first point
         * @param   p_longitudeA  Longitude of first point
         * @param   p_latitudeB   Latitude of second point
         * @param   p_longitudeB  Longitude of second point
         * @return  Computed distance in meters
         */
        external function fx_computeDistance(
            in Int32 p_latitudeA, in Int32 p_longitudeA, 
            in Int32 p_latitudeB, in Int32 p_longitudeB
        ) return float;
        
        /**
         * @desc    External function to compute a position using a reference position, a distance and an orientation 
         * @param   p_iutLongPosVector  Reference position
         * @param   p_distance          Distance to the reference position (in meter)
         * @param   p_orientation       Direction of the computed position (0 to 359; 0 means North)
         * @param   p_latitude          Computed position's latitude
         * @param   p_longitude         Computed position's longitude
         * @return  LongPosVector
         */        
        external function fx_computePositionUsingDistance(
            in Int32 p_refLatitude, 
            in Int32 p_refLongitude, 
            in integer p_distance, 
            in integer p_orientation,
            out Int32 p_latitude,
            out Int32 p_longitude
        );
        
    } // end externalFunctions


+1 −32
Original line number Diff line number Diff line
/**
 *  @author     ETSI / STF405
 *  @author     ETSI / STF405 / STF449
 *  @version    $URL$
 *              $Id$
 *  @desc       Module containing functions for GeoNetworking
@@ -1815,37 +1815,6 @@ module LibItsGeoNetworking_Functions {
    
    group externalFunctions {

        /**
         * @desc    External function to compute distance between two points
         * @param   p_latitudeA   Latitude of first point
         * @param   p_longitudeA  Longitude of first point
         * @param   p_latitudeB   Latitude of second point
         * @param   p_longitudeB  Longitude of second point
         * @return  Computed distance in meters
         */
        external function fx_computeDistance(
            in Int32 p_latitudeA, in Int32 p_longitudeA, 
            in Int32 p_latitudeB, in Int32 p_longitudeB
        ) return float;
        
        /**
         * @desc    External function to compute a position using a reference position, a distance and an orientation 
         * @param   p_iutLongPosVector  Reference position
         * @param   p_distance          Distance to the reference position (in meter)
         * @param   p_orientation       Direction of the computed position (0 to 359; 0 means North)
         * @param   p_latitude          Computed position's latitude
         * @param   p_longitude         Computed position's longitude
         * @return  LongPosVector
         */        
        external function fx_computePositionUsingDistance(
            in Int32 p_refLatitude, 
            in Int32 p_refLongitude, 
            in integer p_distance, 
            in integer p_orientation,
            out Int32 p_latitude,
            out Int32 p_longitude
        );
        
        /**
         * @desc    External function to compute timestamp based on current time
         * @return  Unix-Epoch-Time mod 2^32