예제 #1
0
        public static List <double> Calculate2DDistanceBetweenPositionOfDeclarationsAndGoalDeclared(List <DeclaredGoal> declaredGoals)
        {
            List <double> distance2DBetweenPositionOfDeclarationsAndGoalDeclared = new List <double>();

            foreach (DeclaredGoal declaredGoal in declaredGoals)
            {
                distance2DBetweenPositionOfDeclarationsAndGoalDeclared.Add(CoordinateHelpers.Calculate2DDistance(declaredGoal.PositionAtDeclaration, declaredGoal.GoalDeclared));
            }
            return(distance2DBetweenPositionOfDeclarationsAndGoalDeclared);
        }
예제 #2
0
        public static List <(string identifier, double distance)> Calculate2DDistanceBetweenMarkerAndGoals(List <DeclaredGoal> declaredGoals, List <MarkerDrop> markerDrops)
        {
            List <(string identifier, double distance)> distance2DBetweenMarkerAndGoals = new List <(string identifier, double distance)>();

            foreach (DeclaredGoal declaredGoal in declaredGoals)
            {
                foreach (MarkerDrop markerDrop in markerDrops)
                {
                    string identifier = $"Goal{declaredGoal.GoalNumber}_{declaredGoal.GoalDeclared.TimeStamp:HH:mm:ss}->Marker{markerDrop.MarkerNumber}_{markerDrop.MarkerLocation.TimeStamp:HH:mm:ss}";
                    double distance   = CoordinateHelpers.Calculate2DDistance(declaredGoal.GoalDeclared, markerDrop.MarkerLocation);
                    distance2DBetweenMarkerAndGoals.Add((identifier, distance));
                }
            }
            return(distance2DBetweenMarkerAndGoals);
        }
예제 #3
0
        public static List <(string identifier, double distance)> Calculate2DDistanceBetweenMarkers(List <MarkerDrop> markerDrops)
        {
            List <(string identifier, double distance)> distance2DBetweenMarkers = new List <(string identifier, double distance)>();

            for (int index = 0; index < markerDrops.Count; index++)
            {
                for (int iterator = index + 1; iterator < markerDrops.Count; iterator++)
                {
                    string identifier;
                    if (markerDrops[index].MarkerNumber == markerDrops[iterator].MarkerNumber)
                    {
                        identifier = $"Marker{markerDrops[index].MarkerNumber}_{markerDrops[index].MarkerLocation.TimeStamp:HH:mm:ss}->Marker{markerDrops[iterator].MarkerNumber}_{markerDrops[iterator].MarkerLocation.TimeStamp:HH:mm:ss}";
                    }
                    else
                    {
                        identifier = $"Marker{markerDrops[index].MarkerNumber}->Marker{markerDrops[iterator].MarkerNumber}";
                    }
                    double distance = CoordinateHelpers.Calculate2DDistance(markerDrops[index].MarkerLocation, markerDrops[iterator].MarkerLocation);
                    distance2DBetweenMarkers.Add((identifier, distance));
                }
            }
            return(distance2DBetweenMarkers);
        }
예제 #4
0
        public static List <(string identifier, double distance)> Calculate2DDistanceBetweenDeclaredGoals(List <DeclaredGoal> declaredGoals)
        {
            List <(string identifier, double distance)> distance2DBetweenDeclaredGoals = new List <(string identifier, double distance)>();

            for (int index = 0; index < declaredGoals.Count; index++)
            {
                for (int iterator = index + 1; iterator < declaredGoals.Count; iterator++)
                {
                    string identifier;
                    if (declaredGoals[index].GoalNumber == declaredGoals[iterator].GoalNumber)
                    {
                        identifier = $"Goal{declaredGoals[index].GoalNumber}_{declaredGoals[index].GoalDeclared.TimeStamp:HH:mm:ss}->Goal{declaredGoals[iterator].GoalNumber}_{declaredGoals[iterator].GoalDeclared.TimeStamp:HH:mm:ss}";
                    }
                    else
                    {
                        identifier = $"Goal{declaredGoals[index].GoalNumber}->Goal{declaredGoals[iterator].GoalNumber}";
                    }
                    double distance = CoordinateHelpers.Calculate2DDistance(declaredGoals[index].GoalDeclared, declaredGoals[iterator].GoalDeclared);
                    distance2DBetweenDeclaredGoals.Add((identifier, distance));
                }
            }
            return(distance2DBetweenDeclaredGoals);
        }