示例#1
0
        public static List <double> Calculate3DDistanceBetweenPositionOfDeclarationsAndGoalDeclared(List <DeclaredGoal> declaredGoals)
        {
            List <double> distance3DBetweenPositionOfDeclarationsAndGoalDeclared = new List <double>();

            foreach (DeclaredGoal declaredGoal in declaredGoals)
            {
                distance3DBetweenPositionOfDeclarationsAndGoalDeclared.Add(CoordinateHelpers.Calculate3DDistance(declaredGoal.PositionAtDeclaration, declaredGoal.GoalDeclared, true));
            }
            return(distance3DBetweenPositionOfDeclarationsAndGoalDeclared);
        }
示例#2
0
        public static List <(string identifier, double distance)> Calculate3DDistanceBetweenMarkerAndGoals(List <DeclaredGoal> declaredGoals, List <MarkerDrop> markerDrops)
        {
            List <(string identifier, double distance)> distance3DBetweenMarkerAndGoals = 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.Calculate3DDistance(declaredGoal.GoalDeclared, markerDrop.MarkerLocation, true);
                    distance3DBetweenMarkerAndGoals.Add((identifier, distance));
                }
            }
            return(distance3DBetweenMarkerAndGoals);
        }
示例#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)> Calculate3DDistanceBetweenDeclaredGoals(List <DeclaredGoal> declaredGoals)
        {
            List <(string identifier, double distance)> distance3DBetweenDeclaredGoals = 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.Calculate3DDistance(declaredGoals[index].GoalDeclared, declaredGoals[iterator].GoalDeclared, true);
                    distance3DBetweenDeclaredGoals.Add((identifier, distance));
                }
            }
            return(distance3DBetweenDeclaredGoals);
        }