Real-Time Trajectory Planning For Groundand Aerial Vehicles In A Dynamic Environment