模拟低精度和高精度Gps

模拟低精度和高精度Gps,gps,ios-simulator,emulation,gpx,Gps,Ios Simulator,Emulation,Gpx,我在IOS模拟器上做了一个.gpx文件来模拟一条路径,现在我想模拟水平精度,我该怎么做 下面是我的.gpx文件的摘录: <?xml version="1.0"?> <gpx> <wpt lat="-23.772830" lon="-46.689820"/> //how add horizontal accuracy 7 meters for example <wpt lat="-23.774450" lon="-46.692570"/&g

我在IOS模拟器上做了一个.gpx文件来模拟一条路径,现在我想模拟水平精度,我该怎么做

下面是我的.gpx文件的摘录:

<?xml version="1.0"?>
<gpx>
    <wpt lat="-23.772830" lon="-46.689820"/> //how add horizontal accuracy 7 meters for example
    <wpt lat="-23.774450" lon="-46.692570"/> //and here horizontal accuracy of 2 metters for example
    <wpt lat="-23.773450" lon="-46.693530"/> //and here 19 meters
</gpx> 

//例如,如何增加水平精度7米
//例如,这里的水平精度为2米
//这里是19米

如果我运行所有gps点返回5米的水平精度,我可以改变这一点。

我通过viewController的方法调用实现了这一点(我的是一个按钮,但显然你可以使用手势识别器或任何东西)

我已将我的viewController设置为LocationManagerDelegate,但您可以将正在使用的代理而不是“self”


没有模拟精度这样的事情——你从GPS上获得读数,你的程序有责任知道精度的“圆圈”以draw@KevinDTimm是的,我知道,因为这个责任,我想尝试我的代码低和高精度,真的没有办法模拟水平精度吗?不,因为不管怎样,你收到的数据都是一样的。@KevinDTimm我理解,为我难过,但非常感谢Kevin!同样需要…智能解决方案!尽管在代码中,我们仍然可以编写一个类来读取文件gpx“或json”,并以这种方式发送信息!
- (IBAction)simulateAccuracy:(id)sender {
    CLLocationCoordinate2D newCoor = CLLocationCoordinate2DMake(someLat, someLng);
    CLLocation *newLoc = [[CLLocation alloc]    initWithCoordinate:newCoor altitude:someAlt
    horizontalAccuracy:TheAccuracyYouWantToTest verticalAccuracy:ditto timestamp:nil];
    NSArray *newLocation = [[NSArray alloc] initWithObjects:newLoc,nil];
    [self locationManager:myLocationManager didUpdateLocations:newLocation];
}