CSEntry GPS coordinates

Discussions about CSEntry
Post Reply
R.is
Posts: 14
Joined: February 7th, 2015, 4:54 am
Location: Tajikistan, Dushanbe

CSEntry GPS coordinates

Post by R.is »

Hello dear users CSPro please help me to solve the problem to give the GPS coordinates on android I use other programs for the control of interviewers is very uncomfortable and I can`t get the coordinates and I need only the coordinates
how to get the GPS coordinates of CSPro very urgently need help please
(translated into Google translator)
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: CSEntry GPS coordinates

Post by josh »

Please see the following for how to capture GPS coordinates in CSPro: http://www.csprousers.org/help/html/gps_function.htm
R.is
Posts: 14
Joined: February 7th, 2015, 4:54 am
Location: Tajikistan, Dushanbe

Re: CSEntry GPS coordinates

Post by R.is »

josh wrote:Please see the following for how to capture GPS coordinates in CSPro: http://www.csprousers.org/help/html/gps_function.htm




Thanks I have already seen but I do not understand where the coordinates are stored in what file and how to get then?
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: CSEntry GPS coordinates

Post by josh »

The gps function just returns the latitude and longitude. You must write code to store them where you want. Usually this is done by assigning them to dictionary variables so that they are stored in the data file generated by your application. For example you could define the variables LATITUDE and LONGITUDE in your dictionary. You should make them length 13, numeric, with 9 decimal places so that they have enough precision to hold a GPS reading. Then in your CSPro logic you would do something like:

Code: Select all

   if gps(open) and gps(read,120) then
        LATITUDE = gps(latitude); // assign to variables in the dictionary
        LONGITUDE = gps(longitude);    
    else
        errmsg("There was an error reading the GPS coordinates.");
    endif;
    
    gps(close);
This will read the GPS and store the results in those variables. Then once you save the case, those values will be in your data file and you can use the Export Data tool to export your data to SPSS, Excel or whatever format you use for analysis.
Post Reply