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?
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?
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)
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.
List of available service providers, such as gps or network. This information is provided as a list and in text form.
ProviderLocked
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.
ProviderName
The current service provider. The provider will most likely be either GPS or network.
Taifun
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.
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?
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?