Пример #1
0
 void start_to(WayPoint wp)
 {
     wp.Update(VSL);
     if (CFG.Nav[Navigation.GoToTarget] && wp.CloseEnough(VSL))
     {
         CFG.Nav.Off();
         return;
     }
     if (VSL.LandedOrSplashed)
     {
         CFG.AltitudeAboveTerrain = true;
         CFG.VF.OnIfNot(VFlight.AltitudeControl);
         CFG.DesiredAltitude = C.TakeoffAltitude + VSL.Geometry.H;
     }
     else if (CFG.VTOLAssistON)
     {
         VSL.GearOn(false);
     }
     max_speed.Set(CFG.MaxNavSpeed);
     reset_formation();
     SetTarget(wp);
     DistancePID.Reset();
     LateralPID.Reset();
     CorrectionPID.Reset();
     CFG.HF.OnIfNot(HFlight.NoseOnCourse);
     NeedCPS();
 }
Пример #2
0
 void start_to(WayPoint wp)
 {
     VSL.UpdateOnPlanetStats();
     wp.Update(VSL);
     if (CFG.Nav[Navigation.GoToTarget] && wp.CloseEnough(VSL))
     {
         CFG.Nav.Off();
         return;
     }
     if (VSL.LandedOrSplashed)
     {
         CFG.AltitudeAboveTerrain = true;
         CFG.VF.OnIfNot(VFlight.AltitudeControl);
         CFG.DesiredAltitude = PN.TakeoffAltitude + VSL.Geometry.H;
     }
     else if (CFG.VTOLAssistON)
     {
         VSL.GearOn(false);
     }
     reset_formation();
     SetTarget(wp);
     DistancePID.Reset();
     LateralPID.Reset();
     CFG.HF.OnIfNot(HFlight.NoseOnCourse);
     RegisterTo <Radar>();
 }