Closed marcus-aa closed 5 years ago
I think that's a general shortcoming of javascript, I've run into it before in a different scenario. The advice I got was to do something with no effect to it as a number if you want it to be a number, like multiply it by 1 or add 0 to it.
Parsing the altitude from aircraft.json is complicated by changing from a number to a string when "on ground" is indicated.
For example, VRS can not accept the data field in it's json input.
Not a bug per se, but not "best practice" either.
Examples:
"altitude": 37000, "altitude": "ground",
~# cat /run/dump1090-mutability/aircraft.json | jq '.aircraft[] | .altitude' 23550 34975 39000 35025 33000 37000 25425 "ground"