Android.Location.toString() 对 `et` 的解释
Android.Location.toString() interpretation of `et`
当我在 Location
对象上使用 .toString() 方法时,我得到如下结果:
Location[gps 01.234567,12.234567
acc=14
et=+2d23h36m34s870ms
alt=123.0
vel=0.0
{Bundle[mParcelledData.dataSize=40]}
]
(我添加了换行符以提高可读性)
我猜(经过这里的一些研究:link):
acc=14
是以米为单位的精度
vel=0
是 meters/second 中的速度
alt=123
是高于 WGS 参考椭球的高度(以米为单位)
但是et=+2d23h36m34s870ms
是什么?
根据 javadocs:
/**
* Return the time of this fix, in elapsed real-time since system boot.
*
*
This value can be reliably compared to
* {@link android.os.SystemClock#elapsedRealtimeNanos},
* to calculate the age of a fix and to compare Location fixes. This
* is reliable because elapsed real-time is guaranteed monotonic for
* each system boot and continues to increment even when the system
* is in deep sleep (unlike {@link #getTime}.
*
*
All locations generated by the {@link LocationManager}
* are guaranteed to have a valid elapsed real-time.
*
* @return elapsed real-time of fix, in nanoseconds since system boot.
*/
public long getElapsedRealtimeNanos() {
return mElapsedRealtimeNanos;
}
toString
与 et
相关的代码
if (mElapsedRealtimeNanos == 0) {
s.append(" et=?!?");
} else {
s.append(" et=");
TimeUtils.formatDuration(mElapsedRealtimeNanos / 1000000L, s);
}
顺便说一句,它的意思可能是距离上次更新位置已经过去了多长时间
当我在 Location
对象上使用 .toString() 方法时,我得到如下结果:
Location[gps 01.234567,12.234567
acc=14
et=+2d23h36m34s870ms
alt=123.0
vel=0.0
{Bundle[mParcelledData.dataSize=40]}
]
(我添加了换行符以提高可读性)
我猜(经过这里的一些研究:link):
acc=14
是以米为单位的精度vel=0
是 meters/second 中的速度
alt=123
是高于 WGS 参考椭球的高度(以米为单位)
但是et=+2d23h36m34s870ms
是什么?
根据 javadocs:
/** * Return the time of this fix, in elapsed real-time since system boot. * *
This value can be reliably compared to * {@link android.os.SystemClock#elapsedRealtimeNanos}, * to calculate the age of a fix and to compare Location fixes. This * is reliable because elapsed real-time is guaranteed monotonic for * each system boot and continues to increment even when the system * is in deep sleep (unlike {@link #getTime}. * *
All locations generated by the {@link LocationManager} * are guaranteed to have a valid elapsed real-time. * * @return elapsed real-time of fix, in nanoseconds since system boot. */
public long getElapsedRealtimeNanos() {
return mElapsedRealtimeNanos;
}
toString
与 et
if (mElapsedRealtimeNanos == 0) {
s.append(" et=?!?");
} else {
s.append(" et=");
TimeUtils.formatDuration(mElapsedRealtimeNanos / 1000000L, s);
}
顺便说一句,它的意思可能是距离上次更新位置已经过去了多长时间