...and don't forget the many horrible new ways to die that you findFatleaf wrote:Welcome to the life as a test pilotIt's not Uber lasers and injectors all the time, just most of it


Moderators: winston, another_commander
...and don't forget the many horrible new ways to die that you findFatleaf wrote:Welcome to the life as a test pilotIt's not Uber lasers and injectors all the time, just most of it
I think the docking AI is not tailored for huge objects. Whenever you (or an NPC) approaches from behind the dockable object and the AI has to fly the ship around it first, it takes a path too close to the dockable object. The same is true for fuel stations, by the way, and may be the reason why they are surrounded by cargo pods so often. I witnessed an NPC approaching a fuel station from the planet side the other day, so it had to go around the fuel station first. Unfortunately it also didn't pass the fuel station with enough distance, so it smashed right into the structure.snork wrote:I put on my docking computer and felt I had to switch it off and stop suddenly when I was within a quarter of my Python's length away from the edge of the Torus. I reckon the top of my Python was going to catch the edge of the ring. With hindsight (one day I'll order some in advance) I should have taken screendumps.![]()
Fatleaf wrote:Welcome to the life as a test pilotSandJ wrote:Having spent ages visiting all the dockables I was not inclined to risk being destroyed just to see what would happen next if I let the docking computer keep going.It's not Uber lasers and injectors all the time, just most of it
I don't think he underestimated the station collision radius. When checking agains the size, its even a few percents bigger. Its also not the AI. It must have to do with setting the waypoint.Commander McLane wrote:I think the docking AI is not tailored for huge objects. Whenever you (or an NPC) approaches from behind the dockable object and the AI has to fly the ship around it first, it takes a path too close to the dockable object. The same is true for fuel stations, by the way, and may be the reason why they are surrounded by cargo pods so often....
I guess it has to do with how the waypoints for flying around an object are plotted. It seems that the engine tends to underestimate the radius of big objects.
Code: Select all
[dumpState.shipEntity]: Name: Mosquito Sport
[dumpState.shipEntity]: Primary role: trader
[dumpState.shipEntity]: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
[dumpState.shipEntity]: Target: <StationEntity 0x135731800>{"Torus Station" "Torus Station" position: (-62611, 64318.4, 648654) scanClass: CLASS_STATION status: STATUS_ACTIVE}
[dumpState.shipEntity]: Destination: (-62611, 64318.4, 648654)
destination
in above list with the stations position. They are the same! The checkCourseToDestination
should change the coordinates of the station to a safe coordinate. Now I noticed the ship not just crashing with the station, but it even went for its centre and crashed there.Yes, but why. At least the waypoint is calculated correct. I added some logging in the routine that calculates waypoints:Commander McLane wrote:So it looks like the code checks the position of the entity that has to be circumnavigated. But then it doesn't construct waypoints around that position, but makes the position itself into the destination.
Code: Select all
[shipEntity.navigation.hazard]: Ship <ShipEntity 0x13a7b3800>{"Boa Class Cruiser" position: (-68004.8, 70185, 642856) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT} has found a hazzard: <StationEntity 0x1021bd600>{"Torus Station" "Torus Station" position: (-62611, 64318.4, 648654) scanClass: CLASS_STATION status: STATUS_ACTIVE}.
[shipEntity.navigation.safeVector]: Ship <ShipEntity 0x13a7b3800>{"Boa Class Cruiser" position: (-68004.8, 70185, 642856) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT} has found a safeVector: (-68720.5, 67502.3, 644881).
Code: Select all
S.mainStation.position.distanceTo([-68720.5, 67502.3, 644881]) --> 7854.8935546875
Code: Select all
[dumpState.shipEntity]: Destination: (-62611, 64318.4, 648654)
Code: Select all
[ai.takeAction]: Boa Class Cruiser 342 to take action setStateTo: HEAD_FOR_PLANET
[ai.message.receive]: AI route1traderAI.plist for Boa Class Cruiser 342 in state 'HEAD_FOR_PLANET' receives message 'ENTER'. Context: changing state, stack depth: 1
[ai.takeAction]: Boa Class Cruiser 342 to take action setCourseToPlanet
[ai.takeAction]: Boa Class Cruiser 342 to take action setDesiredRangeTo: 30000.0
[ai.takeAction]: Boa Class Cruiser 342 to take action setSpeedFactorTo: 0.35
[ai.takeAction]: Boa Class Cruiser 342 to take action checkCourseToDestination
[shipEntity.navigation.hazard]: Ship <ShipEntity 0x13fc39000>{"Boa Class Cruiser" position: (-70380.1, 70408.9, 643554) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT} has found a hazzard: <StationEntity 0x12874d600>{"Torus Station" "Torus Station" position: (-62611, 64318.4, 648654) scanClass: CLASS_STATION status: STATUS_ACTIVE}.
[shipEntity.navigation.safeVector]: Ship <ShipEntity 0x13fc39000>{"Boa Class Cruiser" position: (-70380.1, 70408.9, 643554) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT} has found a safeVector: (-69733.4, 69835.2, 647096).
[ai.message.receive]: AI route1traderAI.plist for Boa Class Cruiser 342 in state 'HEAD_FOR_PLANET' receives message 'AEGIS_IN_DOCKING_RANGE'. Context: handling deferred message, stack depth: 0
[ai.takeAction]: Boa Class Cruiser 342 to take action dockEscorts
[ai.takeAction]: Boa Class Cruiser 342 to take action setStateTo: GO_TO_STATION
[ai.message.receive]: AI route1traderAI.plist for Boa Class Cruiser 342 in state 'HEAD_FOR_PLANET' receives message 'EXIT'. Context: changing state, stack depth: 1
[ai.message.receive]: AI route1traderAI.plist for Boa Class Cruiser 342 in state 'GO_TO_STATION' receives message 'ENTER'. Context: changing state, stack depth: 1
[ai.takeAction]: Boa Class Cruiser 342 to take action setTargetToSystemStation
[ai.takeAction]: Boa Class Cruiser 342 to take action setDesiredRangeTo: 5000.0
[ai.takeAction]: Boa Class Cruiser 342 to take action setDestinationToTarget
[ai.takeAction]: Boa Class Cruiser 342 to take action checkCourseToDestination
[ai.takeAction]: Boa Class Cruiser 342 to take action setTargetToSystemStation
[ai.takeAction]: Boa Class Cruiser 342 to take action setDesiredRangeTo: 5000.0
[ai.takeAction]: Boa Class Cruiser 342 to take action setDestinationToTarget
[ai.takeAction]: Boa Class Cruiser 342 to take action checkCourseToDestination
[ai.takeAction]: Boa Class Cruiser 342 to take action scanForHostiles
[ai.takeAction]: Boa Class Cruiser 342 to take action pauseAI: 10.0
[ai.message.receive]: AI route1traderAI.plist for Boa Class Cruiser 342 in state 'GO_TO_STATION' receives message 'NOTHING_FOUND'. Context: handling deferred message, stack depth: 0
[ai.message.receive]: AI route1traderAI.plist for Boa Class Cruiser 342 in state 'GO_TO_STATION' receives message 'WAYPOINT_SET'. Context: handling deferred message, stack depth: 0
[ai.takeAction]: Boa Class Cruiser 342 to take action setAITo: gotoWaypointAI.plist
checkCourseToDestination
now does not find a new hazard. Is correct as it only looks for objects on route to the destination. It excludes the destination itself.dropMessages
like:
Code: Select all
"GO_TO_STATION" =
{
ENTER = ("dropMessages: WAYPOINT_SET", setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);