locationSensor & BTclient Interfering?

good morning,
ive used the locationSensor function to track speed and the BT client for BT communications in separate applications with relatively good success.
now, when I put them together into the same thing, it "seems" like once I connect BT, my location sensor speed quits working - once BT is connected, speed quits updating. now oddly enough - if I open google maps and set a target destination, if i go back to my own app while maps is running in the background my speed is working again.
super weird.

does the backend of BT client and location sensor conflict in some way?

I don't think so

do you use gps and lock the location provider?
my guess is, the location provider changed from gps to fused... then after using google maps, gps is used again...
what about providing a screenshot of your relevant blocks?


I sure can here when im back at my computer.

forgive my naivety on the locationSensor stuff, but I was curious if you or someone could give me the quick 3 second explanation on "gps vs fused"

The following is an oversimplification

  • gps uses the device GPS receiver hardware exclusively to determine location coordinates
  • fused use a combination of WIFI and/or cell tower information or the gps hardware to determine location coordinates

The complicated explanation


Here is my Location sensor and BT stuff - I'm sure its something im missing on speed setup.
(ive pushed and pulled my accuracy interlock around with no change also - unrelated to that)

also, I modified a few things in here while testing the locationSensor function - everything seems to work here. ill probably add BT to this test app to see if it alters the function - just havent yet.
LocationSensorTest.aia (982.4 KB)

thats also my understanding - figured fused would be better? "better"

Better for what?

Regarding the use of the Location speed value, you may find this useful

I remember reading through that some time ago - in the case of this project, the attached and modified example file works, but when grafted into my other app, it doesnt as soon as i connect bt (works otherwise which is weird). the only code associated with the speed sensor in my app im trying to get to work is attached. so perhaps theres something i have missing from one app to the other in locationsensor setup causing me issues.

theres an aia file attached of the functional test app.

as suggested earlier set the provider to gps (after it is available) and then lock the provider


List of available service providers, such as gps or network. This information is provided as a list and in text form.


The device will not change the service provider.

It is possible for a device to switch service providers when the current provider is unable to provide adequate location information. ProviderLocked is a Boolean value: true/false. Set to true to prevent providers from changing. Set to false to allow for automatic switching when necessary.


The current service provider. The provider will most likely be either GPS or network.

forgive my ignorance, the further explanation helped here.
im a PLC, fanuc robotic programmer, and controller scripter by day - very much a physical world scenario but on a screen.
with the web and connectivity stuff I'm like on an infant knowledge base level, where it has to be spelled out for me.
appreciate everyones patience.

lock provider
so this is where i have gotten to here. unaltered, available providers reads as (fused passive network fused gps)
if i dont drive it to anything and call provider name, its listed as "fused"
not sure what fused means.

if i drive it to GPS, it says gps (the code blocks).
am i doing the right thing or no?

Dear @Reality_Bytes,
why Speed Accuracy = 0 ?

in my apps I use a different approach

In other words: when the location has changed with a meaningful accuracy, I consider also the speed.
Otherwise I skip an input not accurate enough.

1 Like

honestly Im sure I had a reason, like its some sort of workaround for something, but its been so long since I attempted this that i cannot remember.
if i could get it working correctly on this app, im sure it will reveal itself - probably something due to something I experienced on the AIA file I posted above.

could also be a mistake, but being an or function it shouldnt be a hard telemetry block like im experiencing

Sorry but whenever your location sensor accuracy, that you have named GPSSpeed (I guess), is less then 20, also the value = 0 is comprised, therefore is useless to test this equality.
Moreover when the location sensor accuracy is = 0 this means that the location sensor is not giving a right value. With your test ("or") whenever the accuracy is = 0 you consider Lat and Lon valid, when on the contrary, they aren't !

but thats not my issue as it would still show something albiet inaccurate at times. ill say it again - it works until i connect BT, then I get nothing. im sure it was an accident on my part there but after changing it to "and" and "not equal", it didnt fix the issue.
good catch on that one, as its something i should fix, but its not the issue im dealing with

can we address the rest of this though - specifically the (fused passive network fused gps) part and what specifically I should set the provider name to

It does not look like you read @SteveJG 's beautiful explanation?

your blocks to lock the provider look fine... iprobably t takes some time until gps shows up in the AvailableProvider property...
what about doing a test?


are you working in battery saving mode ? Sometimes this mode avoids the contemporary use of GPS (at least its high accuracy mode) and the BT, while Google maps raises the power (though it's working in background) by disabling the battery saving mode.

I guess i still dont understand - seems like "fused passive network" and "fused gps" are the options?
I understand what fused means, for sure - previously and as per steve's explanation.
its confusing because "fused" appears twice in the list?

Im worried that me telling it to connect to "gps" is not a correct target since its not an option as per the list?

im not, but I could see that being very much so related in some way.