public XYCoordinates GetLocation(List <float> distancesFromSatellites)
        {
            XYCoordinates Kenobi    = new XYCoordinates(-500, -200);
            XYCoordinates Skywalker = new XYCoordinates(100, -100);
            XYCoordinates Sato      = new XYCoordinates(500, 100);

            return(BaseTools.TrilaterationSolver(Kenobi, distancesFromSatellites[0], Skywalker, distancesFromSatellites[1], Sato, distancesFromSatellites[2]));
        }
Beispiel #2
0
        /// <summary>
        /// This methods was taken from the exercice level 1 GetMessage. And use a BaseTool method.
        /// TODO: search for a best matrix value solver.
        /// </summary>
        /// <param name="receivedMessages"></param>
        /// <returns></returns>
        public string GetMessage(List <List <string> > receivedMessages)
        {
            string retVal = "";

            //first check consistency of the received Messages.
            CheckReceivedMessagesConsistency(receivedMessages);

            //Get the final Message from the Matrix of words
            retVal = BaseTools.GetStringFromStringMatrix(receivedMessages);

            return(retVal);
        }