I’m no GIS specialist, but my interpretation of the code is that a fairly coarse approach is taken to calculating areas (and distances, for that matter), modelling the Earth as a perfect sphere with a radius of 6,378.1 km [I dont know what CRS that corresponds to, eg WGS84, but it probably doesn’t get any simpler than that!].
If you wish to analyze the calculation used it is defined here. Essentially, the formula is:
// calculate segment x and y in degrees for each point
final double latitudeRef = latLongs.get(0).latitude;
final double longitudeRef = latLongs.get(0).longitude;
for (int i = 1; i < latLongs.size(); i++) {
double latitude = latLongs.get(i).latitude;
double longitude = latLongs.get(i).longitude;
listY.add(calculateYSegment(latitudeRef, latitude));
listX.add(calculateXSegment(longitudeRef, longitude, latitude));
}
// sum areas of all triangle segments
double areasSum = 0;
for (int i = 1; i < listX.size(); i++) {
areasSum += calculateAreaInSquareMeters(listX.get(i - 1), listX.get(i), listY.get(i - 1), listY.get(i));
}
where
private static Double calculateAreaInSquareMeters(double x1, double x2, double y1, double y2) {
return (y1 * x2 - x1 * y2) / 2;
}
So it does not surprise me that QGIS provides a more accurate result. Please note, from the documentation:
The distance
[and area] function takes into account the circumference of the Earth around the equator but does not take altitude into account. The longer the line segments are, the less accurate the computed distance will be. Additionally, distance calculations closer to the equator are more accurate than ones close to the poles.
To answer your other question…
is there a way to change KoBo’s CRS
No. As you can see above, KoboCollect uses javarosa to perform these geo calculations. If you wish to use a more accurate CRS to obtain a more precise area/distance result then you would need to rebuild a KoboCollect against a customized javarosa.
If this will be a serious problem for you, then I might suggest considering writing a PR for javarosa with a more sophisticated (and precise) calculation.