I am new to Objective-C and would like some help with converting MPS to KPH.
Below is my current string for speed. Can someone please point out what else is needed?
speed.text = newLocation.speed < 0 ? @"N/A": [NSString stringWithFormat:@"%d", (int)newLocation.speed];
m/s to km/h = (m/s) * (60*60)/1000
Or 1m/s = 3.6km/h
float speedInKilometersPerHour = newLocation.speed*3.6;
if (speedInKilometersPerHour!=0) {speed.text = [NSString stringWithFormat:@"%f", speedInKilometersPerHour];}
else speed.text = [NSString stringWithFormat:@"No Data Available"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With