6 Replies Latest reply on May 30, 2013 3:35 PM by mark.stuller

    Getting Location data with External GPS

    mark.stuller

      Hi all

       

      We have been using Go with the older, FileMakerGo 11 technique to get GPS data (http://www.supportgroup.com/explore/geolocation-with-filemaker-go/ thanks Chad!) but with the Geo functions of Go12 we've switched. Well, we want to switch even if the old technique still works - it likely does I haven't tried it yet.

       

      But...we are struggling with one issue. The users in our case have been carrying an external, bluetooth GPS http://gps.dualav.com/explore-by-product/xgps150a/ because of it's higher accuracy. But the Go12 Locations functions do not SEEM to access these readings. They seem to only use the iPhone's internal GPS readings and so we end up with much less accuracy lat/long/accuracy readings. We know this because the external GPS has an app that returns a different reading as well as reporting high accuracy while the Go12 Location function report crazy (like 5000m!) accuracy.

       

      Thoughts from the community? from Filemaker?

       

      Thanks, Mark

        • 1. Re: Getting Location data with External GPS
          mikebeargie

          I believe that any of the new FMGO functions are based off of existing functions out of the iOS developers toolkit, so I don't think that there's a way to change what the software itself uses for GPS location services.

           

          However, it would be *theoretically* possible by developing a custom helper app (IE FMNotify) that launches out of filemaker and returns coordinates to filemaker via your app, but that requires all the trouble of getting an app made for the app store.

           

          Not sure of any other method.

          • 2. Re: Getting Location data with External GPS
            mark.stuller

            Thanks Mike. I thought that was the case too, but if so the difference between what FMGo gets and other apps apps shouldn't exist.

             

            i.e. Chad's technique uses a webviewer (the iOS webkit browser) and obtains the GPS readings from the external GPS unit. Navigation apps, like Maps get their GPS reading from the External GPS as well. I'd think FMGo would but it doesn't seem to...

             

            An example; in a poor cell coverage area, accuracy of 5000m (~3 miles!) in FMGo. Switching to Navigon (it has on-board maps) the location is spot-on.

            • 3. Re: Getting Location data with External GPS
              Malcolm

              Thanks Mike. I thought that was the case too, but if so the difference between what FMGo gets and other apps apps shouldn't exist.

               

               

              i.e. Chad's technique uses a webviewer (the iOS webkit browser) and obtains the GPS readings from the external GPS unit. Navigation apps, like Maps get their GPS reading from the External GPS as well. I'd think FMGo would but it doesn't seem to...

               

               

              An example; in a poor cell coverage area, accuracy of 5000m (~3 miles!) in FMGo. Switching to Navigon (it has on-board maps) the location is spot-on.

               

              FMGo accepts what it is given, according to the instructions that you pass to it.

               

              There are two variables that make a difference:

              1. time required to obtain a response and

              2. degree of error allowed

               

              The satellites return information which includes the degree of error. If you create an script that says I will only accept a low degree of error, ie, 50m and the longest I will wait for a result is 30 seconds then it will keep trying until the desired accuracy is achieved or give up after that time has elapsed.

               

              malcolm

              • 4. Re: Getting Location data with External GPS
                mikebeargie

                After looking at the function descriptions, malcolm is right, you can specify accuracy in Location() and LocationValues()

                 

                http://www.filemaker.com/12help/html/func_ref3.33.21.html

                 

                http://www.filemaker.com/12help/html/func_ref3.33.22.html#1067545

                 

                So Location(1;60) would return lat/long accurate within one meter, with a 60 second timeout.

                • 5. Re: Getting Location data with External GPS
                  mark.stuller

                  Yes, I'm using LocationValues (100 ; 60 ).

                   

                  The issue is that it will timeout and then return whatever value it (the iPhone?) has cached (with a crazy accuracy) even tho the External GPS has a reading NOW that is accurate.

                   

                  So the question is why doesn't FMGo's Location ( Accuracy ; TimeOut ) and LocationValues ( Accuracy ; TimeOut ) get these same numbers available to the iPhone?

                   

                  StatusTool.jpgTrapMan.jpg

                  • 6. Re: Getting Location data with External GPS
                    mark.stuller

                    I wanted to give folks an update on this since I HAVE been able to resolve this issue.

                     

                    I was;

                    - storing the results of the LocationValues ( 100 ; 60 ) into a global variable named $$LocationValues

                    - then parsing that out with Set Field xxx GetValue ( $$LocationValues ; 1 ) (and 2, and 4) for Lat/Lon/Accuracy

                     

                    I am now;

                    - Set Field [ "Latitude"; GetValue ( Substitute ( Location ( 100 ; 10 ) ; "," ; "¶" ) ; 1 ) ]

                    - Set Field [ "Longitude"; GetValue ( Substitute ( Location ( 100 ; 10 ) ; "," ; "¶" ) ; 2 ) ]

                    - Set Field [ "Accuracy"; Round ( GetAsNumber ( GetValue ( Substitute ( Location ( 100 ; 10 ) ; "," ; "¶" ) ; 3 ) ) ; 0 ) ]

                     

                    So I'm calling a location function 3 times rather than once :-(

                     

                    I'm not sure why this works, but it does. Perhaps because the global Variable is named too similarly to the LocationValues function...

                     

                    Just hoping if others stumble they may find this information of use. Mark