You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have some code which decides if a payload has 'landed', and it makes some not brilliant assumptions about what ground level is (refer 'The Colorado Problem'). Ideally we'd be comparing against terrain information, but that would require a lot of Ruaumoko API polls.
However, whenever a prediction is run in Tawhiri (which has direct access to the ruaumoko terrain dataset), it terminates the prediction at ground level. Therefore, the last point in any prediction we get will be ground level in the landing area.
We could extract this ground level altitude and store it, and use that to decide if the payload has landed!
The text was updated successfully, but these errors were encountered:
Something like this might work however since predictions come through websockets this won't work on refresh after predictions have stopped for a sonde
if(vehicle.prediction_target&&vehicle.prediction_target.pdata&&vehicle.prediction_target.alt){varlanding_check_alt_idle=vehicle.prediction_target.alt+300varlanding_check_alt=vehicle.prediction_target.alt+100}else{varlanding_check_alt_idle=600varlanding_check_alt=350}varlanded=(vehicle.max_alt>1500&&// if it has gone upvehicle.ascent_rate<1.0&&// and has negative ascent_rate, aka is descendingnewPosition.gps_alt<landing_check_alt// and is under 350 meters altitude)||(// ornewPosition.gps_alt<landing_check_alt_idle&&// under 600m and has no position update for more than 30 minutes(newDate().getTime()-newPosition.gps_timestamp)>1800000);
Currently we have some code which decides if a payload has 'landed', and it makes some not brilliant assumptions about what ground level is (refer 'The Colorado Problem'). Ideally we'd be comparing against terrain information, but that would require a lot of Ruaumoko API polls.
However, whenever a prediction is run in Tawhiri (which has direct access to the ruaumoko terrain dataset), it terminates the prediction at ground level. Therefore, the last point in any prediction we get will be ground level in the landing area.
We could extract this ground level altitude and store it, and use that to decide if the payload has landed!
The text was updated successfully, but these errors were encountered: