Commit 4e0e3fa2 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

qjs_wrapper.c: fix altitude

parent eba60e64
......@@ -149,7 +149,7 @@ static JSValue js_new_position(JSContext *ctx, JSValueConst thisVal,
newPositionArray = getPositionArray();
s->latitude = (double)positionArray[LATITUDE] / 1e7;
s->longitude = (double)positionArray[LONGITUDE] / 1e7;
s->altitude = (UA_Double)(positionArray[REL_ALTITUDE] / 1000);
s->altitude = (UA_Double)(positionArray[ABS_ALTITUDE] / 1000);
s->timestamp = positionArray[TIMESTAMP];
JS_SetOpaque(obj, s);
free(newPositionArray);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment