Open usman427 opened 9 years ago
You need to send latitude and longitude in degrees.
Can you tell me how to do it ? I have this string now stringWithFormat:@"$TRCCR,%02d%02d%02d%02d%02d%02d.000,A,%02d%08.4f,%03d%08.4f,%.2f,%.2f,%.2f,%03d,*00\r\n",
can you tell me what will be the format for sending in degrees ?
Thanks for the help :)
Hi Traccar, Why there is no extended protocol ($TRCCR) for iPhone app ? I have implemented it but not working correctly, also it fetch the wrong longitude and latitude. For example if the long and lat is 54.34234, 25.3434. but in my extended format it fetch 5434.234 and 2534.34.
Can you please tell me where I am doing mistake?
return [NSString stringWithFormat:@"$TRCCR,%02d%02d%02d%02d%02d%02d.000,A,%02d%07.4f,%03d%07.4f,%.2f,%.2f,%.2f,%03d,00\r\n", (int) components.year, (int) components.month, (int) components.day, (int) components.hour, (int) components.minute, (int) components.second, (int) trunc(fabs(lat)), fmod(fabs(lat), 1.0) * 60.0, (int) trunc(fabs(lon)), fmod(fabs(lon), 1.0) * 60.0, (location.speed > 0) ? location.speed \ 1.943844 : 0.0, (location.course > 0) ? location.course : 0.0, 0.0,100]; //where 100 is for battery value
Can anyone tell me Is the string format is correct or not ?