예제 #1
0
파일: ose.py 프로젝트: dimcookies/ose-test
def getNextStation(station, speed, idx):
    # if train is stopped do not show next and previous station
    if float(speed.replace(",", ".")) > 0 and st.has_key(station):  # should exist in map to show prev/next
        return getStation(st[station][idx])
    return ""
예제 #2
0
파일: ose.py 프로젝트: dimcookies/ose-test
def distance_from_station(lat1, long1, stationId):
    if not st.has_key(stationId):
        return -1
    return round(distance_on_unit_sphere(lat1, long1, st_coords[stationId][0], st_coords[stationId][1]), 2)