Closed gianpieroc closed 7 years ago
Logs please.
2017-09-12 23:13:32.855 [info][tid:com.facebook.react.JavaScript] { coords:
{ heading: 267.89,
accuracy: 5,
altitude_accuracy: -1,
longitude: -122.03611286,
altitude: 0,
latitude: 37.33454847,
speed: 24.59 },
sample: true,
battery: { is_charging: false, level: -1 },
extras: {},
is_moving: true,
activity: { confidence: 100, type: 'unknown' },
odometer: 826723.7,
uuid: '3BDB2EA5-D033-48A3-9C3F-497769253A56',
timestamp: '2017-09-13T03:13:32.854Z' }
2017-09-12 23:13:32.897 [info][tid:com.facebook.react.JavaScript] { coords:
{ heading: 267.89,
accuracy: 5,
altitude_accuracy: -1,
longitude: -122.03611286,
altitude: 0,
latitude: 37.33454847,
speed: 24.59 },
extras: {},
is_moving: true,
activity: { confidence: 100, type: 'unknown' },
event: 'motionchange',
odometer: 826971.4,
uuid: '851A7C44-DFCF-429D-B70B-7DCA92CD6BD0',
battery: { is_charging: false, level: -1 },
timestamp: '2017-09-13T03:13:32.867Z' }
2017-09-12 23:13:33.788 [info][tid:com.facebook.react.JavaScript] { coords:
{ heading: 268.95,
accuracy: 5,
altitude_accuracy: -1,
longitude: -122.03638578,
altitude: 0,
latitude: 37.33454218,
speed: 25.1 },
extras: {},
is_moving: true,
activity: { confidence: 100, type: 'unknown' },
odometer: 826995.6,
uuid: '9AF6AE44-1E30-4576-9126-FDFF15687905',
battery: { is_charging: false, level: -1 },
timestamp: '2017-09-13T03:13:33.761Z' }
2017-09-12 23:13:34.150343-0400 RevdApp[20212:1387612] [] nw_connection_get_connected_socket_block_invoke 12 Connection has no connected handler
2017-09-12 23:13:34.773 [info][tid:com.facebook.react.JavaScript] { coords:
{ heading: 269.3,
accuracy: 5,
altitude_accuracy: -1,
longitude: -122.03666775,
altitude: 0,
latitude: 37.33454235,
speed: 25.15 },
extras: {},
is_moving: true,
activity: { confidence: 100, type: 'unknown' },
odometer: 827020.6,
uuid: '3D562CBF-4D04-4C95-9402-993D2ED819CB',
battery: { is_charging: false, level: -1 },
timestamp: '2017-09-13T03:13:34.764Z' }
2017-09-12 23:13:35.679 [info][tid:com.facebook.react.JavaScript] { id: '762fabff-1ae8-49b5-aaaa-a66ffd7b0acb', steps: {} }
2017-09-12 23:13:35.683 RevdApp[20212:1387608]
When I say "Logs", I mean plugin logs.
See Debugging
The reported speed here is ~25 m/s (90 km/h). What was the real speed?
Anyway, there's nothing the plugin can do -- it's only the messenger.
It's like getting mail from the government saying you owe $5000 in taxes -- the mailman has no control over your tax bill.
πΎ-[TSLocationManager startUpdatingLocation] Location-services: ON
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
π΅-[Settings incrementOdometer:] 149187.6
βΉοΈ-[TSLocationManager locationManager:didUpdateLocations:] <IGNORED> Ξt since last: -0.0s
β
-[TSLocationManager persistLocation:]_block_invoke INSERT: A3D7CBD9-05A1-4715-B50C-A56339407113
β
-[BackgroundTaskManager createBackgroundTask] 5
β
-[TSHttpService schedulePost:] LOCKED: 455DE922-43D2-4447-8D60-F93552D6DB55
β οΈ-[TSHttpService doPost:] HTTP ERROR: 0
***
* The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
*
{
NSErrorFailingURLKey = "http://server.com/locations";
NSErrorFailingURLStringKey = "http://server.com/locations";
NSLocalizedDescription = "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1022 \"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.\" UserInfo={NSErrorFailingURLStringKey=http://server.com/locations, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLKey=http://server.com/locations}";
}
β
-[TSHttpService post:error:] UNLOCKED: 455DE922-43D2-4447-8D60-F93552D6DB55
βΉοΈ+[LocationAuthorization run:] status: 3
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 4 OF (
4,
5
)
βΉοΈ-[TSLocationManager locationManager:didUpdateLocations:] <IGNORED> Ξt since last: 0.0s
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 5 OF (
5
)
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
π΅-[Settings incrementOdometer:] 149218.0
β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 88D0F856-BDEC-4326-AA10-26FD20256D9F
β
-[BackgroundTaskManager createBackgroundTask] 6
β
-[TSHttpService schedulePost:] LOCKED: 455DE922-43D2-4447-8D60-F93552D6DB55
β οΈ-[TSHttpService doPost:] HTTP ERROR: 0
***
* The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
*
{
NSErrorFailingURLKey = "http://server.com/locations";
NSErrorFailingURLStringKey = "http://server.com/locations";
NSLocalizedDescription = "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1022 \"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.\" UserInfo={NSErrorFailingURLStringKey=http://server.com/locations, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLKey=http://server.com/locations}";
}
β
-[TSHttpService post:error:] UNLOCKED: 455DE922-43D2-4447-8D60-F93552D6DB55
2017-09-13 11:22:49.611492-0400 RevdApp[29529:1561746] [] nw_connection_get_connected_socket_block_invoke 13 Connection has no connected handler
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 6 OF (
6
)
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
π΅-[Settings incrementOdometer:] 149249.4
β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 78397732-DB4B-422D-92B7-2C355AD0CC09
β
-[BackgroundTaskManager createBackgroundTask] 7
β
-[TSHttpService schedulePost:] LOCKED: 455DE922-43D2-4447-8D60-F93552D6DB55
You've shown me about 10 seconds of logs. There's nothing interesting to see here.
Please don't post long logs to the thread. Attach them as a file.
Are you not setting LOG_LEVEL_VERBOSE
? You should see raw location being logged, which is primarily what I'm interested in, like this:
π<+37.33451917,-122.03813827> +/- 5.00m (speed 27.07 mps / course 268.95) @ 9/13/17, 11:25:29 AM GMT-04:00
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 50.0m | age: 0.0s
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
I'm not concerned with these lines.
β οΈ-[TSHttpService doPost:] HTTP ERROR: 0
I will remove unnecessary logs commented before.
π<+37.33446146,-122.04380955> +/- 5.00m (speed 34.77 mps / course 270.35) @ 9/13/17, 12:06:02 PM Venezuela Time
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.1s
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βΉοΈ-[TSLocationManager locationManager:didUpdateLocations:] <IGNORED> Ξt since last: 0.0s
βΉοΈ+[LocationAuthorization run:] status: 3
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 5 OF (
5,
6
)
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 6 OF (
6
)
2017-09-13 12:06:03.680946-0400 RevdApp[29759:1578741] [] nw_connection_get_connected_socket_block_invoke 12 Connection has no connected handler
π<+37.33445832,-122.04420408> +/- 5.00m (speed 34.56 mps / course 270.35) @ 9/13/17, 12:06:03 PM Venezuela Time
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.0s
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
π΅-[Settings incrementOdometer:] 153697.6
β
-[TSLocationManager persistLocation:]_block_invoke INSERT: F402CA6D-D4B7-46C4-B5FD-2D7E77766E2D
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:error:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
-[BackgroundTaskManager createBackgroundTask] 7
β
-[TSHttpService schedulePost:] LOCKED: 6A622977-F57D-4D22-95CF-87C1BA302B79
β
-[TSHttpService post:error:] UNLOCKED: 6A622977-F57D-4D22-95CF-87C1BA302B79
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 7 OF (
7
)
π<+37.33445442,-122.04458579> +/- 5.00m (speed 34.06 mps / course 269.65) @ 9/13/17, 12:06:04 PM Venezuela Time
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.0s
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
π΅-[Settings incrementOdometer:] 153731.4
β
-[TSLocationManager persistLocation:]_block_invoke INSERT: 06637788-3FB4-41CE-93A9-B2E6B6100CEB
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:error:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
-[BackgroundTaskManager createBackgroundTask] 8
β
-[TSHttpService schedulePost:] LOCKED: 6A622977-F57D-4D22-95CF-87C1BA302B79
β
-[TSHttpService post:error:] UNLOCKED: 6A622977-F57D-4D22-95CF-87C1BA302B79
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService finish:error:] Success: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 8 OF (
8
)
π<+37.33444763,-122.04496063> +/- 5.00m (speed 33.54 mps / course 269.65) @ 9/13/17, 12:06:05 PM Venezuela Time
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.0s
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
π΅-[Settings incrementOdometer:] 153764.6
β
-[TSLocationManager persistLocation:]_block_invoke INSERT: A472EBB8-7FA3-40CC-99F8-985026595889
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSHttpService flush:error:]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
-[BackgroundTaskManager createBackgroundTask] 9
β
-[TSHttpService schedulePost:] LOCKED: 6A622977-F57D-4D22-95CF-87C1BA302B79
This is your speed as reported directly from the iOS location api CLLocationManager
(whose data comes directly from GPS satellites): 34.77 meters/second (~122 km/h)
π<+37.33446146,-122.04380955> +/- 5.00m (speed 34.77 mps / course 270.35) @ 9/13/17, 12:06:02 PM Venezuela Time
My bad converting distance/time units
can you please let me know your SI unit of speed
What else could it possible be, but "meters / second"?
Your Environment
react-native -v
): 0.47.2Expected Behavior
Show the real speed when I take a Ride
Actual Behavior
It's not showing the real speed (always less than real speed)
Steps to Reproduce
BackgroundGeolocation.un('location', this.onLocation);
onLocation = location => { return this.addCoords(location); };
addCoords = location => { this.setState({ coordinates: [ ...this.state.coordinates, { latitude: location.coords.latitude, accuracy: location.coords.accuracy, heading: location.coords.heading, longitude: location.coords.longitude, speed: location.coords.speed } ], currentSpeed: location.coords.speed }); };
a simple console log of currentSpeed