def getAltitude(dictInput): dip = getDip(dictInput) refraction = getRefraction(dictInput) degInt = CH.getObservationDegToInt(dictInput['observation']) minFloat = CH.getObservationMinToFloat(dictInput['observation']) degMinNum = CH.convertDegMinToNumber(degInt, minFloat) degMinNum = degMinNum + dip + refraction print("degMinNum= {0}".format(degMinNum)) return CH.convertNumToDegMinString(degMinNum)
def getGHAStarLong(GHAAries, starName): starDict = createStarDict() currentStar = starDict[starName.title()] GHAstarDeg = CH.convertDegMinStrToNumber(currentStar['SHA']) \ + CH.convertDegMinStrToNumber(GHAAries) return CH.convertNumToDegMinString(GHAstarDeg)
def getTotalAdjustedGHA(primeMeriRotat, yearRotat): return CH.convertNumToDegMinString(CH.convertDegMinStrToNumber(primeMeriRotat) + CH.convertDegMinStrToNumber(yearRotat))
def getEarthRotatSinceYearStart(viewingDateTime): yearStartDateTimeObj = datetime.datetime.strptime(str(viewingDateTime.year) + '-01-01 00:00:00', '%Y-%m-%d %H:%M:%S') totalSec = viewingDateTime - yearStartDateTimeObj print('totalSec={0}'.format(totalSec.total_seconds())) return CH.convertNumToDegMinString(totalSec.total_seconds()/ 86164.1 * 360)
def getPrimeMeriRotation(GHAADeg, CumProg, LeapProg): answer = CH.convertDegMinStrToNumber(GHAADeg) + CH.convertDegMinStrToNumber(CumProg)\ + CH.convertDegMinStrToNumber(LeapProg) return CH.convertNumToDegMinString(answer)
def getTotalProgression(numOfLeapYears): return CH.convertNumToDegMinString(numOfLeapYears * CH.convertDegMinStrToNumber('0d59.0'))
def getCumProg(yearDiff): return CH.convertNumToDegMinString(yearDiff * CH.convertDegMinStrToNumber( '-0d14.31667'))