Reading NMEA data from iPhone GPS receiver - iphone

I am looking for a way to get NMEA data from the builtin gps receiver of a iPhone.
Is there a way to access this data without using CLLocationFramework?

NO, apple does not allow you to acces the GPS in an other way then via the CoreLocation Framework.
This also means that device without an GRPS chip can support location (it will use triangulation via WiFi).

I don't see why you wouldn't be able to forge your own $GPGGA sentence based in information that can be retrieved from CLLocationFramework. Obviously you won't be able to set then number of satellites and HDOPs value will be approximated. If you must have NMEA0183 sentences, you could create them yourself.

Related

Connect Estimote Beacons to Database/cloud and featch the information From Database/cloud in IOS

I just got my pack of Estimote iBeacons and I have Fetch the Basic information like Major and Minor Values.
I know that the UUID for an Estimote beacon is always B9407F30-F5F8-466E-AFF9-25556B57FE6D. But how would i connect device to database/cloud and how can fetch the data from my local database/cloud.
Any assistance would be great!
Thanks!
How about this sample code.
https://github.com/AlohaYos/LocatedItems
This sample use major/minor number to select web urls.
You can modify this sample in order to access your own database.
If you don't want to build your own database and transport layer, Radius Networks (my company) offers a web service called ProximityKit that lets you set up your iBeacon uuid/major/minor values in the cloud and attach key/value pairs to them.
You first need to find out your iBeacon's identifiers. The easiest way to do this is to use one of our scanner tools like Locate for iBeacon (free) or ScanBeacon for Mac.
Once you have these identifiers, you can configure that iBeacon to ProximityKit, and you can then read the key/value pairs each time the iBeacon is detected. This way, you can change the data on the fly without baking it into your app and waiting for AppStore approval each time you need to make a change.
Below is an example of what a setup might look like:

Determine if device can simultaneously call and stream data

My iPhone application needs to dial a phone number and send some data to a remote server.
It's important that I:
Trigger the call, and then
set up a background task that will communicate with my server
I've been developing/testing with an AT&T phone, which has no problem sending the data in the background while a phone call is initiated.
However, Verizon customers don't have the ability to call and stream data, so for them, I'd like to reverse my order of operations.
What's the best way to determine which route I need to take? I've seen examples of looking at the iPhone's model number, and if it's 3.3, it means it's Verizon so I can proceed from there, but that doesn't seem robust or future proof. Is Verizon the only carrier that currently has this limitation? Seems like there should be some sort of property like -[UIDevice isMultiTaskingSupported].
There’s no great one-liner like the UIDevice method you mentioned, but there is the Core Telephony framework. I haven’t used it myself, but it seems like you could use the CTCarrier class to find this out, specifically the mobileNetworkCode property. This list should get you started. From the look of it, for some carriers, you can use this code to determine if you’re on EDGE or not. For CDMA or EDGE networks, the answer will be “no” for simultaneously streaming voice and data, but for GSM networks that aren’t EDGE, you’re good. You could also just use the carrierName property and look for “AT&T,” but that doesn’t account for EDGE.
Is there a good solution? Probably not.

Possible to Access iPhone GPS receiver data (not just Core Location Lat / Lon)

I'm fairly certain that this isn't possible but I thought I'd ask. The iPhone gets its location with Assisted GPS by means of giving the receiver the locations of the GPS satellites via the provider's data network but it still does processing to calculate your location. I'm interested in actually looking at the log data from the receiver in the phone. I'd really like to look at the carrier phase / doppler / C/No.. etc (or even the satellite ephemeris as it comes across the network). Is there any possible way to access that sort of thing or is it basically a private thing hidden from the rest of us?
All this is hidden from you, the system determines which location technique it uses depending on the accuracy you ask the location manager and the services available so as to optimize battery use and protect private user data (the user will have to confirm that your app is allowed to access location before you can get it).
This is everything you have access to without Jailbreaking.
http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CoreLocation_Framework/_index.html#//apple_ref/doc/uid/TP40007123

current location without using gps

hai
Can we know current location without using gps? Is it possible?
The iPhone SDK has a framework that automatically utilizes the proper mechanism for determining location based on how accurate the result needs to be. Apple has a good article discussing these different methods of locating a device.
Also, here is a good starting point for learning about programming with Location Services.
Furthermore, you can dive right into the CoreLocation framework documentation and learn about everything you can do using Location Services on iOS.
Yes, CoreLocation can triangulate your position via nearby cell phone towers, but the position won't be as accurate as with GPS. Also, it can get your location via nearby WLANs, but this is even less reliable.
Core Location does what you want (by using Wi-Fi triangulation). Check out the documentation of CLLocationManager
Try this
map.showsUserLocation = YES;
map is my MKMapView Object.
Well thats kind of a very broad and very general question. If you are talking cell phones you can use three tower triangulation which is good when you are hitting three towers all at once, but if you are only hitting one the error can be up to a few kilometers.
Now if you are talking internet accessing devices (ie something with an IP address) again things get dicey. If you are using a stationary access point you will get a close approximation using nearest known Hubs with the IP range the device is in. Mobile devices with IPs are really hard to pinpoint.
More links
http://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial
http://www.icodeblog.com/2009/12/22/introduction-to-mapkit-in-iphone-os-3-0-part-2/
and step by step guide.
http://gigaom.com/apple/iphone-dev-sessions-finding-your-way-with-mapkit/
To add to #Jenifer's answer
showsUserLocation
Discussion
This property does not indicate
whether the user’s position is
actually visible on the map, only
whether the map view is allowed to
display it. To determine whether the
user’s position is visible, use the
userLocationVisible property. The
default value of this property is NO.
Setting this property to YES causes
the map view to use the Core Location
framework to find the current
location. As long as this property is
YES, the map view continues to track
the user’s location and update it
periodically.
Core Location Framework
The Core Location framework lets you
determine the current location or
heading associated with a device. The
framework uses the available hardware
to determine the user’s position and
heading. You use the classes and
protocols in this framework to
configure and schedule the delivery of
location and heading events. You can
also use it to define geographic
regions and monitor when the user
crosses the boundaries of those
regions.
If you want to know How does the Core Location do this
It actually uses several mechanisms.
GPS
Cell Tower Triangulation
Wifi Hotspot cataloging
Randomly assuming you are in Cupertino
There are tradeoffs based on speed, precision, and available hardware. A first Gen iPad will only have the 3 option available while the iPhone simulator makes use of the last mechanism.
You can observe the difference in these systems in the map application where it initially guesses based on the cell tower, then refines the guess via GPS.
Only options #3 requires a data connection.
And for the humor impaired including #4 was not totally serious although it is functionally correct. (I think they simulate the GPS reporting that location rather than just hard coding it, but I haven't checked.)
From How does CoreLocation locate the device?
The iPod Touch does something like this. It doesn't have a GPS chip, but instead uses the available WiFi networks in the area to get a rough idea of where you're located.

Request routing on iPhone/iPod without GPS

I want to build an iPhone App that should contact a server that is nearest to its location.
The app itself knows where the servers are located and it should find out which one to choose.
Because I expect many users with an iPod touch I can't use GPS to do this.
On StackOverflow and ServerFault I found this possible solutions:
Use Anycast technology to route users => I can't use this method because the device itself should route the requests and know where they are going.
Get country code and use the Google Directions API to determinate which server is nearest.
Get location by IP (GeoDNS etc.) and do the same (see above).
Method 2 seems good but I have three questions to that:
The API sends me the whole route from point x to point z. I just want to have distance. Is there a way to do that?
Google says they have a usage limit of 2,500 request per day. How do they control that? By IP? I ask this because they say you don't have to use an API key - how do they control then?
Is is a good idea to use Google without having any trouble later? My app itself will be free but I'll have In-App Purchases in it. Does that matter?
I hope somebody has experience in this. Thanks in advance!
Paul
In many cases, iOS will still return a location when requested on devices without GPS. Remember, the first generation iPhone didn't have GPS, but could still do location based services. iOS will use a number of techniques (IP geolocation, skyhook, etc) to find the location of a user, in addition to GPS.
Anyway, to answer some of your questions:
The 2,500 requests per day is per end user, or typically per IP address. So you shouldn't need to worry about getting capped. You should however be aware that you need to display a Google Map to use the API, so if you're using their API and not using a mapView you may have an issue.
I'm not entirely sure why you would need to use the Google directions API in the first place. If you can get lat/lon coordinates of both the user's current location and your servers you can just use iOS's built-in CoreLocation methods to get the distance between them, and decide accordingly ([CLLocation getDistanceFromLocation]).