Fix stats tests by summarizing integer distances
This commit is contained in:
parent
7c8c71a3de
commit
025eb02a6a
4 changed files with 14 additions and 4 deletions
|
|
@ -10,6 +10,7 @@ require('../../js/format/Gpx.js');
|
|||
|
||||
const fs = require('fs');
|
||||
|
||||
// lonlats=8.467712,49.488117;8.470598,49.488849 + turnInstructionMode = 5 (gpsies-style)
|
||||
const geoJson = require('./data/track.json');
|
||||
// lonlats=8.467712,49.488117;8.469354,49.488394;8.470556,49.488946;8.469982,49.489176 + turnInstructionMode = 5
|
||||
// console log in Export._formatTrack
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ test('total distance', () => {
|
|||
const [ilon1, ilat1] = btools.util.CheapRuler.toIntegerLngLat(coord1);
|
||||
const [ilon2, ilat2] = btools.util.CheapRuler.toIntegerLngLat(coord2);
|
||||
|
||||
const distance = btools.util.CheapRuler.distance(ilon1, ilat1, ilon2, ilat2);
|
||||
const distance = btools.util.CheapRuler.calcDistance(ilon1, ilat1, ilon2, ilat2);
|
||||
totalDistance += distance;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ test('simple track', () => {
|
|||
const [ilon1, ilat1] = btools.util.CheapRuler.toIntegerLngLat(coord1);
|
||||
const [ilon2, ilat2] = btools.util.CheapRuler.toIntegerLngLat(coord2);
|
||||
|
||||
const distance = btools.util.CheapRuler.distance(ilon1, ilat1, ilon2, ilat2);
|
||||
const distance = btools.util.CheapRuler.calcDistance(ilon1, ilat1, ilon2, ilat2);
|
||||
const deltaHeight = coord2[2] - coord1[2];
|
||||
|
||||
stdPath.computeKinematic(rc, distance, deltaHeight, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue