def limits(self): """FLIGHT ENVELPOE""" # summarize minimum speeds self.vmin = vmin(self.vmto, self.vmic, self.vmcr, self.vmap, self.vmld, self.phase) # maximum altitude: hmax/act = MIN[hmo, hmax+gt*(dtemp-ctc1)+gw*(mmax-mact)] # or hmo if hmx ==0 () # at the moment just ISA atmosphere, dtemp = 0 c1 = self.dtemp - self.ctct1 # if c1<0: c1 = 0 # values above 0 remain, values below are replaced through 0 c1m = np.array(c1<0)*0.00000000000001 c1def = np.maximum(c1, c1m) self.hact = self.hmax+self.gt*c1def+self.gw*(self.mmax-self.mass) # if hmax in OPF File ==0: hmaxact = hmo, else minimum(hmo, hmact) self.hmaxact = (self.hmax==0)*self.hmo +(self.hmax !=0)*np.minimum(self.hmo, self.hact) # forwarding to tools self.traf.lspd, self.traf.lalt, self.traf.lvs, self.traf.ama = \ limits(self.traf.desspd, self.traf.lspd, self.vmin, self.vmo, self.mmo,\ self.traf.M, self.traf.ama, self.traf.alt, self.hmaxact, self.traf.desalt, self.traf.lalt,\ self.maxthr, self.Thr,self.traf.lvs, self.D, self.traf.tas, self.mass, self.ESF) return
def limits(self): """Flight envelope""" # combine minimum speeds and flight phases. Phases initial climb, cruise # and approach use the same CLmax and thus the same function for Vmin self.vmto = self.vm_to*np.sqrt(self.mass/self.traf.rho) self.vmic = np.sqrt(2*self.mass*g0/(self.traf.rho*self.clmaxcr*self.Sref)) self.vmcr = self.vmic self.vmap = self.vmic self.vmld = self.vm_ld*np.sqrt(self.mass/self.traf.rho) # summarize and convert to cas # note: aircraft on ground may be pushed back self.vmin = (self.phase==1)*vtas2cas(self.vmto, self.traf.alt) + \ ((self.phase==2) + (self.phase==3) + (self.phase==4))*vtas2cas(self.vmcr, self.traf.alt) + \ (self.phase==5)*vtas2cas(self.vmld, self.traf.alt) + (self.phase==6)*-10.0 # forwarding to tools self.traf.limspd, \ self.traf.limspd_flag, \ self.traf.limalt, \ self.traf.limvs, \ self.traf.limvs_flag = limits(self.traf.desspd, \ self.traf.gs, \ self.vmto, \ self.vmin, \ self.vmo, \ self.mmo, \ self.traf.M, \ self.traf.alt, \ self.hmaxact, \ self.traf.desalt, \ self.traf.desvs, \ self.maxthr, \ self.Thr, \ self.D, \ self.traf.tas, \ self.mass, \ self.ESF) return
def limits(self): """Flight envelope""" # Connect this with function limits in performance.py # combine minimum speeds and flight phases. Phases initial climb, cruise # and approach use the same CLmax and thus the same function for Vmin self.vmto = self.vm_to*np.sqrt(self.mass/self.traf.rho) self.vmic = np.sqrt(2*self.mass*g0/(self.traf.rho*self.clmaxcr*self.Sref)) self.vmcr = self.vmic self.vmap = self.vmic self.vmld = self.vm_ld*np.sqrt(self.mass/self.traf.rho) # summarize and convert to cas # note: aircraft on ground may be pushed back self.vmin = (self.phase==1)*vtas2cas(self.vmto, self.traf.alt) + \ ((self.phase==2) + (self.phase==3) + (self.phase==4))*vtas2cas(self.vmcr, self.traf.alt) + \ (self.phase==5)*vtas2cas(self.vmld, self.traf.alt) + (self.phase==6)*-10.0 # forwarding to tools self.traf.limspd, \ self.traf.limspd_flag, \ self.traf.limalt, \ self.traf.limvs, \ self.traf.limvs_flag = limits(self.traf.pilot.spd, \ self.traf.limspd, \ self.traf.gs, \ self.vmto, \ self.vmin, \ self.vmo, \ self.mmo, \ self.traf.M, \ self.traf.alt, \ self.hmaxact, \ self.traf.pilot.alt, \ self.traf.limalt, \ self.maxthr, \ self.Thr, \ self.traf.limvs, \ self.D, \ self.traf.tas, \ self.mass, \ self.ESF) return
def limits(self): """Flight envelope""" # combine minimum speeds and flight phases. Phases initial climb, cruise # and approach use the same CLmax and thus the same function for Vmin self.vmto = vtas2cas(self.vm_to*np.sqrt(self.mass/self.traf.rho), self.traf.alt) self.vmic = vtas2cas(np.sqrt(2*self.mass*g0/(self.traf.rho*self.clmaxcr*self.Sref)), self.traf.alt) self.vmcr = self.vmic self.vmap = self.vmic self.vmld = vtas2cas(self.vm_ld*np.sqrt(self.mass/self.traf.rho), self.traf.alt) # summarize # note: aircraft on ground may be pushed back self.vmin = (self.phase==1)*self.vmto + ((self.phase==2) + (self.phase==3) + (self.phase==4))*self.vmcr + \ (self.phase==5)*self.vmld + (self.phase==6)*-10.0 # forwarding to tools self.traf.limspd, self.traf.limalt, self.traf.limvs, self.traf.ama = \ limits(self.traf.desspd, self.traf.limspd, self.vmin, self.vmo, self.mmo,\ self.traf.M, self.traf.ama, self.traf.alt, self.hmaxact, self.traf.desalt, self.traf.limalt,\ self.maxthr, self.Thr,self.traf.limvs, self.D, self.traf.tas, self.mass, self.ESF) return