Ejemplo n.º 1
0
def SI(json_simulated, position_simulated):
    """
    Generate a the list of coordinatesfor each agent mentionned 
    in the standardised JSON file filled with measured information
    
    Args:
        json_simulated : JSON file in the standardised format of the 
        main program, filled with simulated measured information
        position_simulated : list of measured coordinates of each agent 
                
    Output:
        listeposbis : list of coordinates for each agent deduced thanks 
        to SI fusion
    """

    listepos = []
    SI_list = soft_information.parse_scenario(
        'soft_information\data\data_simulated.json')
    positions, _ = soft_information.compute_positions(SI_list,
                                                      len(position_simulated),
                                                      listepos)
    listeposbis = []
    for pos in positions:
        listeposbis.append([int(pos[0]), int(pos[1])])
    return (listeposbis)
Ejemplo n.º 2
0
import soft_information
import time
pas_temps = 10

listepos = []
listepos_temps = []
while (1):
    SI_list = soft_information.parse_scenario(
        'soft_information/data/si1_2.json')
    positions, _ = soft_information.compute_positions(SI_list, 2, listepos)
    T = soft_information.get_time()
    #    print(positions.round(3))
    listepos += [positions.round(3)]
    listepos_temps.append([T[-1], positions.round(3)])
    print(listepos_temps[-1])
    time.sleep(pas_temps)
Ejemplo n.º 3
0
import soft_information
pas_temps = 1

listepos = []  #initialisation de la liste des positions
listepos_temps = []  #initialisation de la liste des temps
SI_list = soft_information.parse_scenario(
    'data_simulated.json')  #extraction des données
positions, _ = soft_information.compute_positions(
    SI_list, 4, listepos
)  #Utilisation de la fonction compute_positions dans le init avec 4 points
print(positions.round(3))