public SCANsatCoverage(double coverage, string scanName, CelestialBody targetBody, string title) : base(title) { this.coverage = coverage; this.scanName = scanName; this.scanType = SCANsatUtil.GetSCANtype(scanName); this.targetBody = targetBody; }
public override bool RequirementMet(ConfiguredContract contract) { // Perform another validation of the target body to catch late validation issues due to expressions if (!ValidateTargetBody()) { return(false); } double coverageInPercentage = SCANsatUtil.GetCoverage(SCANsatUtil.GetSCANtype(scanType), targetBody); return(coverageInPercentage >= minCoverage && coverageInPercentage <= maxCoverage); }
public override bool RequirementMet(ConfiguredContract contract) { // Perform another validation of the target body to catch late validation issues due to expressions if (!ValidateTargetBody()) { return(false); } if (pqsCity != null) { latitude = targetBody.GetLatitude(pqsCity.transform.position); longitude = targetBody.GetLongitude(pqsCity.transform.position); pqsCity = null; } return(SCANsatUtil.IsCovered(latitude, longitude, SCANsatUtil.GetSCANtype(scanType), targetBody)); }