X Tutup
Skip to content

Improved station traffic control communications#4987

Merged
sturnclaw merged 15 commits intopioneerspacesim:masterfrom
WKFO:stationatc
Nov 12, 2020
Merged

Improved station traffic control communications#4987
sturnclaw merged 15 commits intopioneerspacesim:masterfrom
WKFO:stationatc

Conversation

@WKFO
Copy link
Contributor

@WKFO WKFO commented Oct 27, 2020

Calm down, I just came back with a fresh repository.

  • When player requests launch, actually talk to them

  • Give a heads up for traffic during departure

  • Give a heads up for traffic during approach

  • If a ground station, provide local gravity and atmosphere information

  • Give a heads up upon entering and exiting the family friendly "no weapons, no trash dumping" airspace

  • Display local gravity and pressure on station lobby

@WKFO
Copy link
Contributor Author

WKFO commented Oct 28, 2020

Would we also want to be able to ask ground stations for the local gravity and atmospheric pressure readings without requesting landing? I don't know how I would code that yet, but wanted to ask anyway.

@Gliese852
Copy link
Contributor

@WKFO imho this data can be viewed in the database, is it worth bothering the dispatcher?

@WKFO
Copy link
Contributor Author

WKFO commented Oct 28, 2020

Real airports provide pressure data for planes to calibrate their altimeters, as well as wind/gust data on runway approach. We don't have such things of course, but I wanted to give Pioneer a similar flight sim-y feeling. I see it as more of a world building element rather than gameplay. (So if databases are not available/faulty for some reason and ship instruments are wrong, the station readings will be what you trust)

This was my reasoning, and I don't know if it is worth it or not, this is why I'm asking you guys :)

@The-EG
Copy link
Contributor

The-EG commented Oct 29, 2020

Real airports provide pressure data for planes to calibrate their altimeters, as well as wind/gust data on runway approach. We don't have such things of course, but I wanted to give Pioneer a similar flight sim-y feeling. I see it as more of a world building element rather than gameplay. (So if databases are not available/faulty for some reason and ship instruments are wrong, the station readings will be what you trust)

This was my reasoning, and I don't know if it is worth it or not, this is why I'm asking you guys :)

My first thought when I saw this was the flight sims I used to play, and I love the idea.

I think it's also a chance to introduce some flavor too, if that's something of interest. I can't remember which flight sim it was, but one would do some interesting things like:
If you wandered off the taxi ways while taxing to/from a runway, ground control would thank you for mowing the grass and then politely ask you to use the taxiways in the future.
If you flew into the airport airspace without permission it would announce/broadcast a warning to all aircraft of your presence.

I think things like that, and what you are doing here go a long way to feeling like you're interacting with someone at a station rather than landing at a completely automated facility.

@WKFO WKFO marked this pull request as ready for review November 1, 2020 12:05
Copy link
Member

@impaktor impaktor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I've made som suggestions, not required changes.

},
"WATCH_FOR_TRAFFIC_ON_APPROACH": {
"description": "",
"message": "Please watch for traffic on your approach."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

native speakers: is "look out for" better than "watch for"? Both OK?

EDIT:

<sturnclaw> "please be aware of traffic" if you want to be stuffy, "please
            watch for traffic" if you want to sound semi-formal. I doubt ATC
            would be saying "please look for traffic", as it's not directive
            enough.  [08:48]
<sturnclaw> "watch" somewhat implies "keep a watch for" traffic as in
            avoidance, whereas "look" can be interpreted to mean "go find
            traffic" with the intent to crash into it :D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Please mind the traffic on your approach"?

},
"LAUNCH_PERMISSION_GRANTED_DEPART_QUICK": {
"description": "",
"message": "Permission granted. Please do not clutter the landing area and depart quickly."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "please do not loiter ..." is more apt, than "clutter"?

Copy link
Member

@impaktor impaktor Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looking at the code, this is for when the station is under heavy load, which is a nice touch, but maybe it should be crammed in there as well, like "We're close to maximum traffic (docking?) capacity, please do not clutter/loiter ...."

Actually, perhaps "landing area" should be "docking (area?)", which might work better with both planet side and orbital stations? Does one dock with ground stations? Maybe just nitpicking...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same "docking"/"landing" dilemma here, and space stations have pads instead of docking ports, so I went with "landing".

outMsg += " " + stringf(Lang::STATION_GRAV, formatarg("grav", gravity, "f.2"));
}
}
if (GetNearbyTraffic(50000) > 0) { //50km
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nearby traffic variable in lua side is 20km, and here 50km? Ignore this comment if this is correct, I'm not doing a detailed reading of the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite remember if I did that 20km on purpose... They should probably be equal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to share the variable, so it's imported across c++/lua side? Or maybe that's overkill?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like that requires some brain effort, so I'm not figuring it out today. I just changed the value to 50km for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The orbital SOI is 20km, maybe that's why?

@WKFO
Copy link
Contributor Author

WKFO commented Nov 4, 2020

I have quite some informal-ish strings ready to be included into the station comms, but they stand out a bit too much among the generic random messages and I would rather have them when we have a way to classify the formality/cheesiness of a space station traffic controller via factions and/or lawlessness (or maybe even put some of them as easter eggs). I'm not going to implement it in this PR or probably any time soon, but just as a note, I'm leaving this comment here.

sd.maxOffset = std::max((pPort->maxShipSize / 2 - bboxRad), float(pPort->maxShipSize / 5.0));
sd.maxOffset *= sd.maxOffset;
outMsg = stringf(Lang::CLEARANCE_GRANTED_BAY_N, formatarg("bay", i + 1));
if (this->IsGroundStation()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that this logic be moved into Lua and triggered with an onDockingClearanceGranted / onDockingClearanceDenied event. This reduces code duplication and moves the code that's merely concerned with pretty-printing the UI away from the code that's responsible for determining whether docking is even possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll see what I can do.

Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and refactored the way we handle docking clearance messages to move it to Lua; looking back, it was a bit harder of a task than I originally envisioned.

Feel free to give it a look over and let me know if I messed anything up. At this point, I like where this PR is at and I'm good to merge it in when you are.

@WKFO
Copy link
Contributor Author

WKFO commented Nov 12, 2020

A quick playtest shows that when requesting docking clearance, the Comms.Message output shows ship's atmospheric pressure instead of the station's. I don't get why though, the code looked good to me.

screenshot-20201112-131301

(Should say "...pressure is 0.80 atm")

Also the gravity value shown is in m/s^2, not g. We need to divide it by 9.80665 (or rounded-up 9.81) to get it in unit g.

@sturnclaw
Copy link
Member

Yep, I totally missed dividing gravity, my bad. I'll take a look at the pressure issue; I'm not sure what's going on there either.

@sturnclaw
Copy link
Member

I'm using the exact same method call that you are to display pressure when docked; I'm not sure what's going on there. For now, I'll say that this PR is good to merge (once conflicts are cleared up), and we'll adjust that behavior going forward.

@sturnclaw sturnclaw merged commit 46fa423 into pioneerspacesim:master Nov 12, 2020
@WKFO WKFO deleted the stationatc branch December 2, 2020 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup