2 部 iPhone 可以多快交换有关倾斜/位置的信息?

发布于 2024-07-18 10:59:42 字数 203 浏览 6 评论 0原文

我想知道需要多少时间才能将一部特定 iPhone 的倾斜和位置(而不是 GPS)信息传达给另一部。 2 部 iPhone 可以同时发送和接收此信息吗? 3部iphone呢? 我对能够同时发送和接收并根据在半秒左右收到的信息做出有条件决策的应用程序感兴趣。

任何镜头都可以吗? 如果可以的话,蓝牙好还是wifi好?

万分感谢, 杰克

I was wondering what amount of time is required to convey information regarding the tilt and position (not gps) of one particular iphone to another. Could 2 iphones send and receive this information simultaneously? What about 3 iphones? I'm interested in an application that is able to simultaneously send and receive and make conditional decisions based on this information received all within a half a second-ish.

Any shot this is possible? If so, is bluetooth or wifi better?

Thanks a ton,
Jake

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

dawn曙光 2024-07-25 10:59:42

如果没有中间服务器,目前这是不可能的。 (如果没有越狱,这将成为可能,但极其困难)

我假设您的目的是游戏,在这种情况下,与通过蜂窝数据网络访问服务器和返回相关的延迟可能也会花费太长时间渴望任何令人满意的游戏体验。 我不相信这会在半秒之内。

这将在即将推出的 3.0 iPhone 软件中通过蓝牙实现,但这仍处于 NDA 之下,因此在发布之前您不太可能获得任何可靠的性能数据。 如果我猜测的话,我肯定会猜测与直接蓝牙连接相关的延迟将远低于半秒。

This is currently not possible without an intermediate server. (Without a jailbreak, which would make it possible, but extremely difficult)

I'm assuming your purpose is gaming, in which case, the latency associated with a trip to a server and back over a cellular data network, is likely to take too long for any satisfactory gaming experience. I don't believe it would be within half a second.

This will be possible via Bluetooth in the upcoming 3.0 iPhone software, but that is still under NDA, so you are not likely to be able to get any reliable performance numbers until it is released. If I were guessing, I would certainly guess that the latency associated with a direct Bluetooth connection would be FAR under half a second.

山田美奈子 2024-07-25 10:59:42

您现在可以选择的只有 Wi-Fi 或蜂窝网络。 如果您通过 Wi-Fi 使用 Bonjour,则会出现毫秒级的延迟,但所有手机都必须连接到同一接入点。 看一下 WiTap 示例。

All you've got as an option right now is Wi-Fi or the Cell Network. If you use Bonjour over Wi-Fi, you'd have latencies in the milliseconds, but all the phones would have to be connected to the same access point. Take a look at the WiTap example.

驱逐舰岛风号 2024-07-25 10:59:42

这绝对是可能的,您希望通过 WiFi 连接您的对等点以获得最佳性能和可靠性,但只要您的数据包限制为小尺寸(< 1k),蓝牙也可以。 查看此文档和示例代码以了解如何访问 UIAccelerometer:

http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIAccelerometer_Class/Reference/UIAccelerometer.html

http://developer.apple.com/iphone/library/samplecode/AccelerometerGraph/index.html #//apple_ref/doc/uid/DTS40007410

诀窍是更新频率部分由系统需求控制,因此可能会有一个窗口(当系统尝试更新设备方向时),其中您的应用程序没有收到任何更新。

It is definitely possible, you'd want to connect your peers over WiFi for best performance and reliability, but Bluetooth would be ok as long as your data packets were constrained to small sizes (< 1k). Check out this documentation and sample code to see how to access UIAccelerometer:

http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIAccelerometer_Class/Reference/UIAccelerometer.html

http://developer.apple.com/iphone/library/samplecode/AccelerometerGraph/index.html#//apple_ref/doc/uid/DTS40007410

The trick is that the update frequency is controlled in part by the systems needs, so there may be a window (while the system is attempting to update device orientation) wherein your application receives no updates.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文