def test200_012_ShouldReturnTrueGetInterDist(self): expectedString = -0.789410565 inputString = {'op':'correct', 'lat':'16d32.3', 'long':'95d41.6', 'altitude':'13d42.3', 'assumedLat':'-53d38.4', 'assumedLong': '74d35.3'} stringLHA = OH.getLHA(inputString) self.assertAlmostEqual(expectedString, OH.getInterDist(inputString, stringLHA), delta=0.0015)
def test200_011_ShouldReturnTrueGetInterDist(self): expectedString = 0.581474856 inputString = {'op':'correct', 'lat':'89d20.1', 'long':'154d5.4', 'altitude':'37d17.4', 'assumedLat':'35d59.7', 'assumedLong': '74d35.3'} stringLHA = OH.getLHA(inputString) self.assertAlmostEqual(expectedString, OH.getInterDist(inputString, stringLHA), delta=0.0015)
def test200_022_ShouldReturnTrueGetCorrectedAltitude(self): expectedString = '-52d7.8' inputString = {'op':'correct', 'lat':'16d32.3', 'long':'95d41.6', 'altitude':'13d42.3', 'assumedLat':'-53d38.4', 'assumedLong': '74d35.3'} stringLHA = OH.getLHA(inputString) interDist = OH.getInterDist(inputString, stringLHA) correctedAlt = OH.getCorrectedAltitude(interDist) self.assertAlmostEqual(CH.convertDegMinStrToNumber(expectedString), CH.convertDegMinStrToNumber(correctedAlt), delta=0.0025)
def test200_021_ShouldReturnTrueGetCorrectedAltitude(self): expectedString = '35d33.3' inputString = {'op':'correct', 'lat':'89d20.1', 'long':'154d5.4', 'altitude':'37d17.4', 'assumedLat':'35d59.7', 'assumedLong': '74d35.3'} stringLHA = OH.getLHA(inputString) interDist = OH.getInterDist(inputString, stringLHA) correctedAlt = OH.getCorrectedAltitude(interDist) self.assertAlmostEqual(CH.convertDegMinStrToNumber(expectedString), CH.convertDegMinStrToNumber(correctedAlt), delta=0.0025)
def test200_031_ShouldReturnTrueGetCorrectedDistance(self): expectedString = 3950 inputString = {'op':'correct', 'lat':'16d32.3', 'long':'95d41.6', 'altitude':'13d42.3', 'assumedLat':'-53d38.4', 'assumedLong': '74d35.3'} stringLHA = OH.getLHA(inputString) interDist = OH.getInterDist(inputString, stringLHA) correctedAlt = OH.getCorrectedAltitude(interDist) correctedDist = OH.getCorrectedDistance(inputString, correctedAlt) self.assertAlmostEqual(expectedString, int(correctedDist), delta=0.0025)
def test200_030_ShouldReturnTrueGetCorrectedDistance(self): expectedString = 104 inputString = {'op':'correct', 'lat':'89d20.1', 'long':'154d5.4', 'altitude':'37d17.4', 'assumedLat':'35d59.7', 'assumedLong': '74d35.3'} stringLHA = OH.getLHA(inputString) interDist = OH.getInterDist(inputString, stringLHA) correctedAlt = OH.getCorrectedAltitude(interDist) correctedDist = OH.getCorrectedDistance(inputString, correctedAlt) self.assertAlmostEqual(expectedString, int(correctedDist), delta=0.0025)