Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
    def test200_002_ShouldReturnTrueGetLHA(self):
        expectedString = '170d16.9'
        inputString = {'op':'correct', 'lat':'16d32.3', 'long':'95d41.6', 'altitude':'13d42.3',
                        'assumedLat':'-53d38.4', 'assumedLong': '74d35.3'}
        stringAnsw = OH.getLHA(inputString)

        self.assertAlmostEqual(CH.convertDegMinStrToNumber(expectedString),
                               CH.convertDegMinStrToNumber(stringAnsw),
                               delta=0.0035)
Ejemplo n.º 4
0
    def test200_001_ShouldReturnTrueGetLHA(self):
        expectedString = '228d40.7'
        inputString = {'op':'correct', 'lat':'89d20.1', 'long':'154d5.4', 'altitude':'37d17.4',
                       'assumedLat':'35d59.7', 'assumedLong': '74d35.3'}
        stringAnsw = OH.getLHA(inputString)

        self.assertAlmostEqual(CH.convertDegMinStrToNumber(expectedString),
                               CH.convertDegMinStrToNumber(stringAnsw),
                               delta=0.0035)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
    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)
Ejemplo n.º 8
0
    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)