ipad iphone開發_如何在iPad或iPhone上使用外部GPS設備

ipad iphone開發

ipad iphone開發

Untitled-7

If you bought a Wi-Fi only iPad and now you wish you could use GPS with it, this is the guide for you. Follow along to hook your iPad up to an external GPS unit and/or GPS-enabled smartphone phone.

如果您購買了僅支持Wi-Fi的iPad,現在希望與它一起使用GPS,這就是您的指南。 繼續將iPad連接到外部GPS單元和/或啓用GPS的智能手機。

There are a few reasons why you may want to undertake this quick project. Among those reasons: you have a GPS device with a long battery life and more accurate results than your iPhone or you have a Wi-Fi only iPad and want to add in mapping capabilities using GPS instead of coarse Wi-Fi location data.

有幾個原因使您可能想要進行此快速項目。 這些原因包括:您的GPS設備具有比iPhone更長的電池壽命和更準確的結果,或者您擁有僅支持Wi-Fi的iPad,並且希望使用GPS代替粗略的Wi-Fi位置數據來添加地圖功能。

你需要什麼 (What You’ll Need)

For this tutorial you’ll need the following:

對於本教程,您需要以下內容:

  • An jailbroken iOS device (we’ll be using an iPad)

    越獄的iOS設備(我們將使用iPad)
  • BTstack GPS (Available in the Cydia store from the Big Boss repository, $5)

    BTstack GPS (在Big Boss倉庫的Cydia商店有售,售價5美元)

  • A GPS receiver capable of sending coordinates via Bluetooth (we’ll be using an Android phone)

    GPS接收器能夠通過藍牙發送座標(我們將使用Android手機)

Our instructions are specifically geared towards pairing an Android phone to an iPad but this technique can also be used to pair a TomTom GPS unit to an iPhone or an iPad, or any other number of combinations of external GPS devices and iOS devices.

我們的說明專門用於將Android手機與iPad配對,但是該技術也可以用於將TomTom GPS單元與iPhone或iPad配對,或將其他任意數量的外部GPS設備和iOS設備組合在一起。

Before we proceed, we’re going to stress again that you need a jailbroken device. This hack specifically takes advantage of a the ability of a jailbroken device to turn off the default Apple Bluetooth stack and replace it with the BTstack.

在繼續之前,我們將再次強調您需要越獄的設備。 該黑客專門利用越獄設備關閉默認Apple藍牙堆棧並將其替換爲BTstack的功能。

安裝BTstack GPS (Installing BTstack GPS)

2011-08-09_171642

Launch Cydia on your iOS device and use the store search function to search for BTstack GPS. By default you should have the BigBoss repository active, if not you’ll need to activate it by navigating to the main Cydia screen and clicking 「More Package Sources」.

在iOS設備上啓動Cydia,然後使用商店搜索功能搜索BTstack GPS。 默認情況下,您應該**BigBoss存儲庫,否則,需要導航到Cydia主屏幕並單擊「更多軟件包源」來**它。

2011-08-09_172205

Once you’ve located BTstack GPS install it (the application is $5 and you can pay using PayPal or Amazon Payments). If you’re not sure if you want to shell out $5 for the application you can download it as a demo. In demo mode you’ll be able to see if your GPS device will connect properly but BTstack GPS will not share the GPS information outside of the primary application.

找到BTstack GPS後,安裝它(應用程序爲5美元,您可以使用PayPal或Amazon Payments進行付款)。 如果不確定是否要爲該應用程序支付5美元,可以作爲演示下載​​。 在演示模式下,您將能夠查看GPS設備是否可以正確連接,但BTstack GPS將不會在主要應用程序之外共享GPS信息。

After the application is installed hit up the Settings menu on your iOS device. You’ll want to do two things. First, look under the General Settings menu to make sure the native iOS Bluetooth is turned off. Second, look under the Extensions menu and click BTstack. BTstack, no iOS, should be checked.

安裝應用程序後,在iOS設備上點擊「設置」菜單。 您將需要做兩件事。 首先,在「常規設置」菜單下查看以確保本機iOS藍牙已關閉。 其次,在「擴展」菜單下查看,然後單擊「 BTstack」。 BTstack,沒有iOS,應進行檢查。

安裝Android藍牙轉發器 (Installing an Android Bluetooth Forwarder)

If you’re planning on using this technique with a stand-alone GPS device, you can skip right to pairing your devices—you may want to check your manual before jumping down to see the BTstack GPS pairing procedure. We’re using an Android phone as a GPS device and as such we need to get our Android phone to start broadcasting the GPS signal via Bluetooth.

如果您打算將此技術與獨立GPS設備一起使用,則可以跳過與設備配對的權限-您可能需要先閱讀手冊,然後再跳下來查看BTstack GPS配對過程。 我們正在將Android手機用作GPS設備,因此,我們需要使Android手機開始通過藍牙廣播GPS信號。

Currently there are about a half dozen applications on the market that meet the needs of someone who wants to link their Android GPS chip to an external source via Bluetooth. It is apparent from the comments on the apps that many of them work or don’t work on a model-by-model basis. Consider yourself forewarned and be willing to try two or three before you find a perfect fit. We had luck with Bluetooth GPS, alternatively you may want to try out ShareGPS, Network/Bluetooth GPS, or Bluetooth GPS Output. Start with Bluetooth GPS and if it doesn’t work move on to trying the next ones. We wish it was more straight forward than that but this whole procedure is a bit unorthodox and most phone companies didn’t design their handsets with the idea that you’d be using the GPS off the phone.

當前,市場上大約有六種應用程序可以滿足需要通過藍牙將其Android GPS芯片鏈接到外部源的人的需求。 從對應用程序的評論中可以明顯看出,它們中的許多功能在逐個模型的基礎上都起作用或不起作用。 考慮一下自己已經被警告,並願意嘗試兩到三個,然後再找到完美的匹配。 我們對藍牙GPS感到很幸運,或者,您可能想嘗試ShareGPS網絡/藍牙GPS藍牙GPS輸出。 從藍牙GPS開始,如果無法使用,請繼續嘗試下一個。 我們希望比這更直接,但是整個過程有點不合常規,並且大多數電話公司在設計手機時都不以爲您會在手機上使用GPS。

配對設備 (Pairing Your Devices)

2011-08-09_174404

At this point your iOS device is using the alternative Bluetooth stack. Now it’s time to check out the actual GPS application paired with the BTstack. There should be a new icon on your springboard, simply labeled GPS. Click on that and you’ll see a very Spartan interface that simply lists the devices. On first launch is should say 「Searching…」 and if you have your Bluetooth device in discovery mode it will appear shortly. In the screenshot above you see our Android device after we scanned for available Bluetooth devices and the pairing prompt we sent the the iPad. In the screenshot below you see the result of that pairing prompt:

此時,您的iOS設備正在使用備用藍牙堆棧。 現在是時候檢查與BTstack配對的實際GPS應用程序了。 跳板上應該有一個新圖標,簡單標記爲GPS。 單擊該按鈕,您將看到一個非常簡單的Spartan界面,其中列出了設備。 首次啓動時,應該說「正在搜索...」,如果您的藍牙設備處於發現模式,它將很快出現。 在上面的屏幕截圖中,我們在掃描可用的藍牙設備後看到了我們的Android設備,並且我們發送了iPad的配對提示。 在下面的屏幕截圖中,您會看到配對提示的結果:

2011-08-09_174904

Once you connect the two, BTstack should kick you over to the mapping screen. If it doesn’t just tap the name of the paired device in the device list. You should see something like the following:

將兩者連接後,BTstack應該將您踢到映射屏幕。 如果不是,請在設備列表中點擊已配對設備的名稱。 您應該看到類似以下的內容:

2011-08-09_175047

After a few seconds the GPS signal will fully resolve and you’ll see additional information. If the connection does not resolve then you need to try out a different GPS application on your Android device or double check that your stand-alone GPS is capable of transmitting the coordinates.

幾秒鐘後,GPS信號將完全解決,您將看到更多信息。 如果連接無法解析,則需要在Android設備上嘗試使用其他GPS應用程序,或者再次檢查獨立GPS是否能夠傳輸座標。

Once the resolution stage is finished can then fire up any application on your iOS device that is location-aware and it will use the new GPS coordinates provided by your external GPS unit. Success!

解析階段完成後,可以啓動iOS設備上所有可識別位置的應用程序,它將使用外部GPS單元提供的新GPS座標。 成功!

翻譯自: https://www.howtogeek.com/70134/how-to-use-an-external-gps-device-with-your-ipad-or-iphone/

ipad iphone開發