GPS

Any possibility of getting access to the GPS values?

We have access to the accelerometer and gravity meter, but the compass and GPS are still out of our reach. I’ve been using Codea (very successfully) as an internal development tool to kick out little apps for use at my employer. This allows me to work with users on prototypes in a way that Objective-C just can’t match. I can literally sit in someone’s office an knock something together while they watch.

But GPS values are critical to several of the projects in progress. So much so, that their lack is the first thing that may force me to look to another tool.

Sounds like a good feature to add. I’ve added it to our list for 1.5 — though I can’t guarantee it will make it.

Cool :slight_smile:

It just appeared on CodeaCommits! Looks like we’re getting it!

Any idea of a timeline on this? I’m at a point where there’s a strong need.

@Simeon - I’m actually starting to need to know where the player is to fetch weather. If it’s not coming anytime soon, please let me know so I know if to write my own or not.
Thanks!

You should probably include a fallback method anyway. After all, not everyone has a GPS on their iPad, and you can’t count on your users being outside when they run your app.

@tomxp411 - You can also find your location on any Wifi, so if you’re on Wifi, I can know your location. And it is my plan to keep a backup.
Thanks!

@Mark - There are some other aspect that would be good to add like a range for when to update the location. I didn’t bother with it in my app, though.

Just a note on how Mobile Basic handles GPS. They strip it down to

getLatitude()

getLongitude()

getAltitude()

getSpeed()

getCourse()

getMagneticHeading()

getTrueHeading()

getHeadingAccuracy()

getHorizontalAccuracy()

getVerticalAccuracy()

There doesn’t seem to be any support for approaching it with significant change, or fixed intervals. It just returns values when requested. It also handles the permissions request and calibration without requiring code — which is handy.

I think this would fit well in Codea using the previously discussed idea if keeping implementation close to that of other sensors.

GPS.latitude

GPS.longitude

GPS.altitude

GPS.horizontalAccuracy

GPS.verticalAccuracy

compass.true

compass.magnetic

compass.accuracy