ephem数据中的10f是什么意思?
What does 10f in ephem data mean?
>>> print('%.10f' % yh.earth_distance)
行中的 10f 是什么意思?
这是一个使用它的例子:
>>> line = "C/2002 Y1 (Juels-Holvorcem),e,103.7816,166.2194,128.8232,242.5695,0.0002609,0.99705756,0.0000,04/13.2508/2003,2000,g 6.5,4.0"
>>> yh = ephem.readdb(line)
>>> yh.compute('2007/10/1')
>>> print('%.10f' % yh.earth_distance)
14.8046731949
>>> print(yh.mag)
23.96
这与 ephem 无关,这是 python 字符串的格式。在这种特殊情况下——"use 10 digits after floating(decimal) point"
>>> print('%.10f' % yh.earth_distance)
行中的 10f 是什么意思?
这是一个使用它的例子:
>>> line = "C/2002 Y1 (Juels-Holvorcem),e,103.7816,166.2194,128.8232,242.5695,0.0002609,0.99705756,0.0000,04/13.2508/2003,2000,g 6.5,4.0"
>>> yh = ephem.readdb(line)
>>> yh.compute('2007/10/1')
>>> print('%.10f' % yh.earth_distance)
14.8046731949
>>> print(yh.mag)
23.96
这与 ephem 无关,这是 python 字符串的格式。在这种特殊情况下——"use 10 digits after floating(decimal) point"