Please add Speed property to GPS
Moderator: Klaus
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Please add Speed property to GPS
I've been using the GPS from Basic4Android.
It has a speed property.
Could we please add a speed property to the LiveCode GPS?
Many thanks
It has a speed property.
Could we please add a speed property to the LiveCode GPS?
Many thanks
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Please add Speed property to GPS
Does anyone know if the Acceleration from mobileSensorReading can be used as speed?
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Please add Speed property to GPS
This seems not possible. Becuase this is not detecting a constant movement. We need this one:
https://developer.apple.com/library/ios ... tion/speed
But I am affraid they forgot to implement this in LC
. I am not finding this anywhere!
Marcel
https://developer.apple.com/library/ios ... tion/speed
But I am affraid they forgot to implement this in LC

Marcel
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Please add Speed property to GPS
Yes, I am finding LC4A got the short end of the stick again.
Always, gotta leave something for the next release.
So can't have LC4iOS and LC4A at the same level.
Always leave em wanting more.
I have no doubt that no matter what the updates and enhancements I'll find the next limitation.
If we could just enhance LiveCode ourselves like b4a, Java and C++ developers can.
So much easier deving in LiveCode.
I prefer to dev in LiveCode so will always find its limitation first.
Then decide what to do next.
A work around or not so eligant solution.
Always, gotta leave something for the next release.
So can't have LC4iOS and LC4A at the same level.
Always leave em wanting more.
I have no doubt that no matter what the updates and enhancements I'll find the next limitation.
If we could just enhance LiveCode ourselves like b4a, Java and C++ developers can.
So much easier deving in LiveCode.
I prefer to dev in LiveCode so will always find its limitation first.
Then decide what to do next.
A work around or not so eligant solution.
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Please add Speed property to GPS
Hi,
I couldn't agree more. I am using the latest version of LC and it is not there and also background running is not included. I am a little bit frustrated
becuase they told me when I purchase this I could do the same as in XCOde and if not I could use externals. But this is not the case with background running. And speed?? Really, this should already be included way back.
If you find a work arround please let me know! I will do the same!
I couldn't agree more. I am using the latest version of LC and it is not there and also background running is not included. I am a little bit frustrated


If you find a work arround please let me know! I will do the same!
Re: Please add Speed property to GPS
You need to write an external (using the external SDK) that can implement the CLLocation. In Android there are no external SDKs yet. If you wanna fund RR some more maybe, with the extra resources, they can get done sooner.
Re: Please add Speed property to GPS
This is possible now. I do not know which version of LC getting the speed was released.
Sample code:
on openCard
if the platform is "iphone" then
mobileStartTrackingSensor "location", false
end if
end openCard
command locationChanged
local tSensorDataA, tSpeed
--RETURN A STRING WITH THE CURRENT LATITUDE, LONGITUDE AND ALTITUDE
put mobileSensorReading("location",true) into tSensorDataA
if tSensorDataA is empty then
put "No data" into fld "speed"
exit locationChanged
end if
put tSensorDataA["speed"] into tSpeed --output is in meters per second
if tSpeed is empty or tSpeed = "0.0" then
set numberFormat to "x"
put 0 into tSpeed
put "0" into fld "speed"
exit locationChanged
else
set numberFormat to "x.x"
end if
put tSpeed * 2.237 into tSpeed --convert meters per second to miles per hour
if tSpeed > sMaxSpeed then put tSpeed into sMaxSpeed
put "Max speed:" && max(tSpeed,sMaxSpeed) into fld "max speed"
put tSpeed into fld "speed"
end locationChanged
Sample code:
on openCard
if the platform is "iphone" then
mobileStartTrackingSensor "location", false
end if
end openCard
command locationChanged
local tSensorDataA, tSpeed
--RETURN A STRING WITH THE CURRENT LATITUDE, LONGITUDE AND ALTITUDE
put mobileSensorReading("location",true) into tSensorDataA
if tSensorDataA is empty then
put "No data" into fld "speed"
exit locationChanged
end if
put tSensorDataA["speed"] into tSpeed --output is in meters per second
if tSpeed is empty or tSpeed = "0.0" then
set numberFormat to "x"
put 0 into tSpeed
put "0" into fld "speed"
exit locationChanged
else
set numberFormat to "x.x"
end if
put tSpeed * 2.237 into tSpeed --convert meters per second to miles per hour
if tSpeed > sMaxSpeed then put tSpeed into sMaxSpeed
put "Max speed:" && max(tSpeed,sMaxSpeed) into fld "max speed"
put tSpeed into fld "speed"
end locationChanged
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com
-
- Livecode Opensource Backer
- Posts: 10089
- Joined: Fri Feb 19, 2010 10:17 am
Re: Please add Speed property to GPS
That last posting smells like hot sauce.