Please add Speed property to GPS

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Please add Speed property to GPS

Post by BarrySumpter » Sun Mar 25, 2012 11:13 pm

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
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.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Please add Speed property to GPS

Post by BarrySumpter » Wed Apr 04, 2012 3:02 am

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.

mtimmerm
Posts: 14
Joined: Tue Nov 15, 2011 12:56 pm

Re: Please add Speed property to GPS

Post by mtimmerm » Tue Apr 24, 2012 3:16 pm

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

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Please add Speed property to GPS

Post by BarrySumpter » Tue Apr 24, 2012 9:19 pm

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.
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.

mtimmerm
Posts: 14
Joined: Tue Nov 15, 2011 12:56 pm

Re: Please add Speed property to GPS

Post by mtimmerm » Wed Apr 25, 2012 1:35 pm

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 :twisted: 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. :x

If you find a work arround please let me know! I will do the same!

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: Please add Speed property to GPS

Post by seaniepie » Fri May 04, 2012 2:34 pm

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.

mtalluto
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 128
Joined: Tue Apr 11, 2006 7:02 pm
Contact:

Re: Please add Speed property to GPS

Post by mtalluto » Mon Apr 20, 2020 10:22 pm

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
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10089
Joined: Fri Feb 19, 2010 10:17 am

Re: Please add Speed property to GPS

Post by richmond62 » Sun Jun 01, 2025 9:12 am

That last posting smells like hot sauce.

Post Reply