本文整理匯總了Python中metars.workers.decoders.default.MetarDecoderDefault.decode_rvr方法的典型用法代碼示例。如果您正苦於以下問題:Python MetarDecoderDefault.decode_rvr方法的具體用法?Python MetarDecoderDefault.decode_rvr怎麽用?Python MetarDecoderDefault.decode_rvr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類metars.workers.decoders.default.MetarDecoderDefault
的用法示例。
在下文中一共展示了MetarDecoderDefault.decode_rvr方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_decode_rvr_with_variation
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_variation(self):
val = "R25R/2000V4000FT"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "variable, from 2,000 to 4,000 feet " \
"(runway 25R)")
示例2: test_decode_rvr_with_no_change
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_no_change(self):
val = "R20/5500FT/N"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "5,500 feet, no change (runway 20)")
示例3: test_decode_rvr_with_upward_trend
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_upward_trend(self):
val = "R02C/1500FT/U"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "1,500 feet, trending upward (runway 02C)")
示例4: test_decode_rvr_with_downward_trend
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_downward_trend(self):
val = "R36/4000FT/D"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "4,000 feet, trending downward (runway 36)")
示例5: test_decode_rvr_with_more_than_modifier
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_more_than_modifier(self):
val = "R36/P6000FT"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "more than 6,000 feet (runway 36)")
示例6: test_decode_rvr_with_less_than_modifier
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_less_than_modifier(self):
val = "R10/M4000FT"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "less than 4,000 feet (runway 10)")
示例7: test_decode_rvr_with_parallel_runways
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr_with_parallel_runways(self):
val = "R32C/3500FT"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "3,500 feet (runway 32C)")
示例8: test_decode_rvr
# 需要導入模塊: from metars.workers.decoders.default import MetarDecoderDefault [as 別名]
# 或者: from metars.workers.decoders.default.MetarDecoderDefault import decode_rvr [as 別名]
def test_decode_rvr(self):
val = "R06/2000FT"
decoder = MetarDecoderDefault()
decoder.decode_rvr(val)
res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
assert_equals(res, "2,000 feet (runway 06)")