def getSimulatedScenario(self, seed, simList, lambda_phi, P_d, **kwargs): sim.seed_simulator(seed) scanList = sim.simulateScans(simList, self.radarPeriod, pv_model.C_RADAR, pv_model.R_RADAR( pv_model.sigmaR_RADAR_true), lambda_phi, self.radarRange, self.p0, P_d=P_d, lambda_local=self.lambda_local, **kwargs) aisList = sim.simulateAIS(simList, ais_model, self.radarPeriod, self.initTime, **kwargs) return scanList, aisList
if __name__ == "__main__": import pymht.utils.simulator as sim import pymht.models.pv as model np.set_printoptions(precision=1, suppress=True) seed = 1254 nTargets = 2 p0 = np.array([0., 0.]) radarRange = 5500 # meters meanSpeed = 10 # gausian distribution P_d = 1.0 sigma_Q = pv.sigmaQ_true sim.seed_simulator(seed) initialTargets = sim.generateInitialTargets(nTargets, p0, radarRange, P_d, sigma_Q) nScans = 4 timeStep = 0.7 simTime = nScans * timeStep simList = sim.simulateTargets(initialTargets, simTime, timeStep, model) lambda_phi = 4e-6 scanList = sim.simulateScans(simList, timeStep, model.C_RADAR, model.R_RADAR(0), lambda_phi, radarRange, p0) N_checks = 4 M_required = 2
def getSimList(self, simTime=None): if simTime is None: simTime = self.simTime sim.seed_simulator(self.staticSeed) return sim.simulateTargets(self.initialTargets, simTime, self.simulationTimeStep, pv_model)