Skip to main content

When using GPX in Xcode to simulate location changes, is there a way to control the speed?



I'm using the following GPX file in Xcode 4.2 to simulate a location change. It works well, but I can't control the speed of the location change. stamp seems to be not working. Does anyone have a solution for this?







<?xml version="1.0"?>

<gpx version="1.1" creator="Xcode">

<wpt lat="37.331705" lon="-122.030237"></wpt>

<wpt lat="37.331705" lon="-122.030337"></wpt>

<wpt lat="37.331705" lon="-122.030437"></wpt>

<wpt lat="37.331705" lon="-122.030537"></wpt>

</gpx>




Comments

  1. I don't think (know) that this is possible in the GPX directly, but you can test location change with Instruments/Automation.

    You'd use a script like:

    var target = UIATarget.localTarget();
    target.setLocation(<location);
    target.delay(5);
    target.setLocation(...);


    And so on. I took this example from the WWDC11 video https://deimos.apple.com/WebObjects/Core.woa/BrowsePrivately/adc.apple.com.8266314619.08266314625.8367850271 (Testing your location-aware applications)

    I'm aware that this doesn't actually let you define the speed, but the delays somehow account for that I hope. Maybe that'll help you.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?