This is my first time posting here so I would greatly appreciate the help. I have searched Google as well as this site for help and have not found anything quite like what I am looking for. I am trying to take the altitude
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
altitudeField.text = [NSString stringWithFormat: @"%.2f ft", newLocation.altitude * 3.2808399];
}
-(void)locationManager:(CLLocationManager *)manager
didFailWithError:(NSError *)error
{
altitudeField.text = @"0.00 ft";
}
Which gives me something like "500.00 ft" for instance. I have another textfield that I would like to fill in based on the altitude value in altitudeField.text. Where if the altitude is <1000 ft it equals 1.08 in textField6, from 1000 to 2000 ft it equals 1.04 in textField6, and so on in 1000 ft increments...
The original altitude is in meters, but I just multiply it to get it into feet, so must I look at the original value in meters? Or can I look at the actual value in the altitudeField?
I have been trying to manipulate some standard if-else statements I have found but I get nothing but errors. Any help or direction would be greatly appreciated.