I have attempted creating a cllocation object using the tapmessage’s wheregeo and worldloc properties. however the lat and lon & x, y values that i get from them are not able to be used to create a cllocation object. Maybe i am formatting incorrectly?
Thanks in advances
logging this
GeoCoord coord = msg.whereGeo;
Point3f point = msg.worldLoc;
NSLog(@"x point is %f",point.x());
NSLog(@"y point is %f",point.y());
NSLog(@"from wheregeo %f",coord.lat());
NSLog(@"from wheregeo %f",coord.lon());
gives me this
2012-01-19 12:30:22.491 WhirlyGlobeApp[1068:4007] x point is -0.138646
2012-01-19 12:30:22.492 WhirlyGlobeApp[1068:4007] y point is 0.554229
2012-01-19 12:30:22.493 WhirlyGlobeApp[1068:4007] from wheregeo 0.962698
2012-01-19 12:30:22.494 WhirlyGlobeApp[1068:4007] from wheregeo 1.815925
I am using the cllocation default init with latittude and longitude method
That would be radians vs. degrees. The coordinates are in radians, but you probably need degrees for
CLLocation.Just use the
RadToDeg()template inGlobeMath.h. It looks weird, but just call it like a function.