mavlink/MAVSDK-Java

how to catch the simulator warning message

wangpuxia opened this issue · 2 comments

code like this:

drone.getMission ( ).startMission ( ).doOnError ( err -> logger.info ( " mission start exception : " + err.getMessage ( ) ) ).andThen ( drone.getMission ( ).getMissionProgress ( ).doOnError ( err -> logger.info ( " mission start progress exception : " + err.getMessage ( ) ) ).map ( mission ->
{
return mission.getCurrent ( ).doubleValue ( ) / mission.getTotal ( ).doubleValue ( ) ;

				} ).distinctUntilChanged ( ) ).subscribe ( percent ->
				{
					logger.info (String.valueOf ( percent ) ) ;
				} , throwable ->
				{
					logger.error (  throwable.getMessage ( ) ) ;
				} ) ;

jmavsim simulator console warning : [mission feasibility_checker] First waypoint too far away: 1208m, 900 max

but logger is :mission start exception : UNKNOWN: Denied

how to catch the jmavsim warning message ?

I don't understand your question. The error is:

First waypoint too far away: 1208m, 900 max

If you set a first waypoint closer to the location of the drone, then startMission() should not return an error.