In addition to data collected by the GreenAnt app, the PostGIS database also contains additional data to calculate air quality exposure and estimate emissions. To calculate exposure we use background maps for each city and factors to adjust for day, week and month.
The system is built up of four different parts.
The GreenAnt web for administration, analysing and visualization of collected data, is developed using Nancyfx, a web framework for .net. Leaflet, java script library for maps, has been implemented for visualizing the data on a map in different layers according to activity or transport type in addition to a calculated NO2 map. Leaflet also offers a TimeDimension plugin for playing the data according to time. The bootstrap project provides simple and quick access to front end visual components.
GreenAnt is the name of the smartphone applications. The app has been developed using Xamarin from Microsoft, which provides tool for cross-platform development and code sharing among the iOS and the android version of the app.
GreenAnt requires some extra features to be able to detect transportation or activity type. In 2013 Apple started to implement a M7 coprocessor on their devices for better motion detection. GreenAnt requires this to be able to detect if the user is walking, running, driving etc. Therefore, GreenAnt works only on devices from iPhone 5 and up. For android GreenAnt make use of the google API for activity recognition and therefor requires Google Play service. GreenAnt has been tested for android version 6.0 and up. The user is prompted to select the most used vehicle type. The built in library used for android and iOS do not distinguish between the different transportation types. The user can select between electric, petrol or diesel car or public transport. This will be used when activity vehicle is detected.
In addition to the web tool and the app, the GreenAnt system consists of a web API (application programmer interface) and a PostGIS database to store data as spatial objects, making it easier for spatial queries.
Both the web tool GreenAnt and the web API ANTS-API offers password protection for accessing data on a zone.