File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,13 @@ async function getAnimals(req, res) {
2020 } ,
2121 headers
2222 ) ;
23+ if ( animals && animals . features ) {
24+ animals . features . forEach ( ( animal ) => {
25+ animal . properties . id = animal . id ;
26+ } ) ;
27+ delete animals [ '@context' ] ;
28+ }
2329
24- animals . features . forEach ( ( animal ) => {
25- animal . properties . id = animal . id ;
26- } ) ;
27-
28- delete animals [ '@context' ] ;
2930 return res . send ( animals ) ;
3031}
3132
Original file line number Diff line number Diff line change @@ -272,12 +272,12 @@ function sendTractorReadings() {
272272function addAndTrim ( value , add , weather ) {
273273 let newValue ;
274274 if ( weather === 'sunny' ) {
275- newValue = add ? parseFloat ( value ) + 0.003 : parseFloat ( value ) - 0.003 ;
275+ newValue = add ? parseFloat ( value ) + 0.0007 : parseFloat ( value ) - 0.0007 ;
276276 } else {
277- newValue = add ? parseFloat ( value ) + 0.001 : parseFloat ( value ) - 0.001 ;
277+ newValue = add ? parseFloat ( value ) + 0.0003 : parseFloat ( value ) - 0.0003 ;
278278 }
279279
280- return Math . round ( newValue * 1000 ) / 1000 ;
280+ return Math . round ( newValue * 10000 ) / 10000 ;
281281}
282282
283283function randomWalk ( state , deviceId , lng , lat ) {
You can’t perform that action at this time.
0 commit comments