Commit e607de0a authored by wattelet's avatar wattelet
Browse files

New function ChangePosition

parent 92a322b1
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -815,6 +815,26 @@ module LibItsGeoNetworking_Functions {
            }
            return v_return;
        }
        /**
         * @desc    Set the position vector corresponding to a ComponentNode
         * @param   p_compNode  Reference to the Component to be changed
         * @param   p_longPosVector - The new position vector
         */

        function f_changePositon(
            in charstring p_compNode,
            in LongPosVector p_longPosVector
        ) runs on ItsGeoNetworking {
            
            var integer i := 0;

             for (i:=0; i<lengthof(vc_positionTable); i:=i+1) {
                if (vc_positionTable[i].key == p_compNode) {
                    vc_positionTable[i].position := p_longPosVector;
                    break;
                }
            }
        }
        
        /**
         * @desc    Compute a position based on reference point and distance factors