mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Debug output
This commit is contained in:
parent
c60bb29303
commit
6aa30f91e6
@ -367,8 +367,6 @@ do -- CARGO_GROUP
|
||||
self:F( {From, Event, To, ToPointVec2, NearRadius } )
|
||||
|
||||
NearRadius = NearRadius or 25
|
||||
|
||||
env.info("FF onenterunboarding")
|
||||
|
||||
local Timer = 1
|
||||
|
||||
@ -383,7 +381,6 @@ do -- CARGO_GROUP
|
||||
--- @param Cargo.Cargo#CARGO Cargo
|
||||
function( Cargo, NearRadius )
|
||||
if not Cargo:IsDestroyed() then
|
||||
env.info("FF blubblub")
|
||||
local ToVec=nil
|
||||
if ToPointVec2==nil then
|
||||
ToVec=self.CargoCarrier:GetPointVec2():GetRandomPointVec2InRadius(2*NearRadius, NearRadius)
|
||||
|
||||
@ -2014,12 +2014,13 @@ do -- Route methods
|
||||
-- Calculate the direct distance between the initial and final points.
|
||||
local LengthDirect=FromCoordinate:Get2DDistance(ToCoordinate)
|
||||
|
||||
env.info(string.format("FF length on road = %.1f km", LengthOnRoad/1000))
|
||||
env.info(string.format("FF length directly = %.1f km", LengthDirect/1000))
|
||||
env.info(string.format("FF length fraction = %.1f km", LengthOnRoad/LengthDirect))
|
||||
env.info(string.format("FF length only road = %.1f km", LengthRoad/1000))
|
||||
env.info(string.format("FF length off road = %.1f km", LengthOffRoad/1000))
|
||||
env.info(string.format("FF percent on road = %.1f", LengthRoad/LengthOnRoad*100))
|
||||
-- Debug info.
|
||||
self:T(string.format("Length on road = %.3f km", LengthOnRoad/1000))
|
||||
self:T(string.format("Length directly = %.3f km", LengthDirect/1000))
|
||||
self:T(string.format("Length fraction = %.3f km", LengthOnRoad/LengthDirect))
|
||||
self:T(string.format("Length only road = %.3f km", LengthRoad/1000))
|
||||
self:T(string.format("Length off road = %.3f km", LengthOffRoad/1000))
|
||||
self:T(string.format("Percent on road = %.1f", LengthRoad/LengthOnRoad*100))
|
||||
|
||||
-- Route, ground waypoints along road.
|
||||
local route={}
|
||||
@ -2032,13 +2033,13 @@ do -- Route methods
|
||||
|
||||
-- Check whether the road is very long compared to direct path.
|
||||
if LongRoad and Shortcut then
|
||||
env.info(string.format("FF longroad and shortcut"))
|
||||
|
||||
-- Road is long ==> we take the short cut.
|
||||
table.insert(route, FromCoordinate:WaypointGround(Speed, OffRoadFormation))
|
||||
table.insert(route, ToCoordinate:WaypointGround(Speed, OffRoadFormation))
|
||||
|
||||
else
|
||||
env.info(string.format("FF longroad and shortcut else"))
|
||||
|
||||
-- Create waypoints.
|
||||
table.insert(route, FromCoordinate:WaypointGround(Speed, OffRoadFormation))
|
||||
table.insert(route, PathOnRoad[2]:WaypointGround(Speed, "On Road"))
|
||||
@ -2047,7 +2048,6 @@ do -- Route methods
|
||||
-- Add the final coordinate because the final might not be on the road.
|
||||
local dist=ToCoordinate:Get2DDistance(PathOnRoad[#PathOnRoad-1])
|
||||
if dist>10 then
|
||||
env.info(string.format("FF longroad and shortcut else dist>10"))
|
||||
table.insert(route, ToCoordinate:WaypointGround(Speed, OffRoadFormation))
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user