Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

pozi/PoziMobile

Repository files navigation

PoziMobile

A mobile-optimised web app for collection of location-related data.

Build Status Code Climate

External dependencies

PoziMobile is a browser-based app that depends on a separate web service to handle server-side querying and persistence. RestfulGeof is that web service.

Deployment

This repository should be served as static files from the same webserver that hosts the web services.

At Groundtruth we can deploy the last version pushed to GitHub by running ./deploy.sh.

Configuration

This repository tracks the PoziMobile application in a generic form. As such it contains a single demonstration configuration file. Additional, application-specific configuration is expected to be found in a config/ subdirectory. This may be done by cloning a repository of configuration into that location, or by making config a link to a directory where configuration is maintained.

To do

  • Have data layer refreshed after change (can currently return just before).

  • Refactor Syncher and friends so that:

    • Syncher maintains its status info which is relevant to the interface.
    • Syncher does not know about the Main page.
    • the Main page can ask the Syncher for its status.
    • the Syncher can fire an event about a status change which the Main page may listen for.
  • Add coveralls.io to track coverage.

Run the unit tests

We are using Jasmine for unit testing, but have set it up to run from the command line so that we can have automated, continuous testing done on TravisCI.

Before running the tests locally, you'll need to install:

Now you're ready to run the tests:

grunt jasmine          # run the tests in the console
grunt jasmine -v       # with more verbose output

grunt jasmine::build   # this generates _SpecRunner.html

By opening the _SpecRunner.html file in the browser (it's important to do this via a web server), you can run the specs directly, without Grunt. This can be useful when debugging. Note that the _SpecRunner.html file will need to be regenerated if you change the name of any spec file.

Check code coverage

To check code coverage, follow the testing steps above, then install JSCoverage (e.g. brew update && brew install jscoverage) and run ./coverage.sh.

In the future it may be worth switching to JSCover (a updated version, rewritten in Java instead of C++), or Istanbul (a Node.js-based coverage tool).

Full stack testing with WebDriver and PhantomJS, in JavaScript

It's possible. See the tests for PoziExplorer to get started.

GPS troubleshooting

There are several resources that may be useful in troubleshooting GPS accuracy issues on iOS.

Documentation and discussion

Apple's advice about Location Services and related settings: iOS 6: Understanding Location Services.

Apple's CoreLocation API documentation shows that different levels of accuracy can be requested. There's a related discussion on YCominator. It's not clear exactly how different browers handle this, but one would assume that enableHighAccuracy would correspond to a higher level.

This blog post gives some background: HTML5 Geolocation API – how accurate is it, really?.

GPS diagnostic apps

There are several free iOS apps that provide information about location services and may be useful diagnostic tools:

  • GPS Info! shows various GPS status info, including location method (GPS, cell, wifi) and time since last update.

  • GPS Status shows some GPS fix information.

As well as paid apps:

  • GPS Info ($0.99) shows status information including signal strength (probably derived from accuracy).

  • GPS Data ($0.99) may show some relevant GPS details.

  • MotionX GPS ($0.99) shows accuracy in meters and signal strength (not number of satellites - probably derived from accuracy). It can be set to use GPS only (no WiFi/cellular).

  • GPS 2 IP ($6.99) serves GPS data from an iOS device in a raw format (NMEA) that can be easily read by an external computer (via netcat, telnet, etc.).

Devices for enhanced GPS performance

Bad Elf sells devices ($130-$180) for enhanced GPS performance on iOS. Their free app only shows status info when connected to one of their devices. The higher end device has its own display that shows detailed status information.

Local Dev

Access http://localhost/PoziMobile/?client=warrnambool&appName=linemarking http://localhost/PoziMobile/?client=bendigo&appName=slashing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published