Auto-gps implementation on ODK Collect

odk-collect
#10

@Neil_Penman Thanks Neil, for the clarification. I will look at the code for TimerLogger.java.

@LN Let me explain:

  • The way this whole thing works is that there is a GPS question with binding name "auto_gps". Since I am talking about binding name and every question has a unique binding name, there can only be one question with auto-gps capability.
  • When the form is opened with auto-gps question, then the FormEntryActivity.java will immediately fire a GPS Task to look for GPS reading and fill this reading to the auto-gps question in the background.
  • It is recommended that this question should be hidden, but it depends on the form designer. Typically, you would like to keep this question visible if you are testing auto-gps and will always hide this question when you are using this form in deployment.

My answers to your questions, in the same order:

  • No, we haven not tested this is rural areas. Our funder is planning to deploy this in relatively remote areas, but until they do that, I have no idea how well this will work in rural areas.
  • Again, I haven't tested this scenario. My guess is that it will be left blank. I will try to test this scenario sometime soon and report back.
  • Since I am talking about using binding name which is unique, there can't be more than 1 question of this type. Even otherwise, suppose we decide to implement this in another way - like putting it as an attribute, then having multiple questions of auto-gps type makes no sense. There is only one GPS reading recorded and having multiple questions will not be of any use.
  • "auto_gps", as I already mentioned, is binding name.
  • I will share a form with auto-gps question soon.

Thanks for your questions and suggestions.

1 Like

#11

Thanks, @Raghu_Mittal, that clears the mechanism up for me, no need for a form!

I don't believe there is any existing feature where the node name is meaningful. Perhaps this could be added as a new preload.

0 Likes

#12

@LN Just need a clarification, what you mean is that you want me to populate the metadata with the GPS coordinates instead of filling up a GPS question, OR you want both - i.e. the metadata as well as a question within the form. I am personally OK with both ideas.

1 Like

#13

Good evening,
if you allow me to get into your discussion I think Both would be very interesting ! For example, metadata to collect the prospection effort and data to locate the observation.

0 Likes

ODK 1 TSC Call - 2018-10-17
#14

For those interested in the technical details of this conversation, Spec addition proposal: location preload has a proposal for the addition needed to the form specification.

If you have other comments about how it should work or the user experience, please comment here!

1 Like

#15

+1 for the specs

3 Likes

#16

+1 for the preload specs.

1 Like

#17

Hello, sorry for the lack of activity on this feature, I have been very busy over the last 1.5 months because of change of jobs. Now, I am able to dedicate some time to finish this feature.

As of now, I have implemented the feature in the same way I described in my top post. I want to give the community something to test and give feedback on. Of course, I will change it later in accordance with what is decided for implementation. Hence, I have created an apk file and a sample form and uploaded it here for users to test auto-gps feature.

Instructions:
Please read the top post first. Download the attachment (.zip file) which contains the apk file and a sample form. Install the given apk and put in the sample form within the odk forms directory.

You can create your own form with question binding as "auto_gps" (make the question hidden) and use the same feature.

For Auto-gps settings, goto:
General Settings->Form management
At the bottom, you will have auto-gps settings, please change them according to need.

Please give feedback on the implementation here.
collect-auto-gps.zip (1.1 MB)

1 Like

#18

I apologize for missing this message when you first posted it, @Raghu_Mittal! There is agreement for adding a new action to the XForms spec to support the feature. The behavior I'm imagining is that when the action is first triggered, the device will start a location request. Every time it gets a location update it will write the latest update to the node specified by ref. Once either a certain accuracy is reached (5m?) or a certain amount of time passes (20s?) the updates will stop. This could be configured at the device level which it looks like is what you've done @Raghu_Mittal.

The APK crashes on launch so I haven't been able to try your implementation, @Raghu_Mittal. Did you use a similar approach for writing the point out?

On the XLSForm side, we can start by only allowing a single GPS point collected this way and do it with a fixed type and name in the same way as other metadata: http://xlsform.org/#metadata.

0 Likes

#19

@LN, it's strange that my apk crashes on launch. Can you try my code then? My fork of ODK Collect is on this link:
git@github.com:rkmittal/collect.git
and the branch that contains my code is on "auto_gps_impl_demo1".
Using the code you should be able to generate the apk and test it. Let me know if you have any queries on my code/implementation.

1 Like

#20

excellent, waiting for this feature.
i have read that this feature is available in surveyCTO and hope to see it in ODK

0 Likes

#21

Super excited for this feature!

1 Like

#22

Was looking for something like this.

0 Likes

#23

Hi @AlexKaranja

it's not ready yet but it should be added in v1.19 which we want to release at the end of this month.

1 Like

#24

Hi and thanks for the update. Looking forward to.

0 Likes

#25

How much will we have to wait this feature?

0 Likes

#26

The implementation itself is ready but we are waiting for xforms-spec. @yanokwa will we be able to do that in the upcoming release?

0 Likes

#27

There are different ways to take on this auto-gps problem: in the audit log and in the form itself.

Background GPS in the audit log feature is finished and we are now waiting for changes in pyxform to be merged and released. I'm expecting we'll finish that and the docs for the next release of Collect (ETA Feb 24th).

Background GPS in the form is something we are going to do, but it takes time to do well. I'll update this issue when we have all the pieces in place.

0 Likes

#28

With ODK Collect v1.20 Beta, you can now you track enumerator locations in the audit log. Please try it and offer your feedback in the beta topic.

2 Likes

#29

Collecting the GPS coordinates in the background would be a fantastic feature added to ODK. Thanks for the work on adding the GPS capture to the audit log. Looking forward to the next release!

2 Likes