For the claustrophobic, it’s the most anxiety-inducing experience imaginable. For everyone else, it’s a cold version of hell.

You’re sitting on a trans-Pacific flight, settling in with your noise cancelling headphones and The Marvelous Mrs. Maisel, and the next thing you know the captain comes on saying there’s a medical emergency and you’re landing somewhere in remote, ice-covered Canada.

“Well ok,” you think. “We don’t want anyone dying. And that Tony Shalhoub is pretty funny. I can sit here for an hour.”

You land somewhere cold and snowy, the person having the emergency is removed, and you get all settled in to continue on your way to Hong Kong.

But the plane doesn’t move.

An entire season of Mrs. Maisel later and the plane’s in the same spot. The pilot gets on and thanks you for your patience (like you had a choice) and mumbles something about a mechanical issue. Hours pass, and you’re still stuck on the plane because the two customs officers at this remote Canadian airport are both snug in bed and not leaving any time soon.

It gets darker. It gets colder. All you’ve been offered to eat is a bag of pretzels and whatever’s in the mezze plate. After 16 cold, starving hours you finally get a replacement plane, but your flying spirit is effectively broken.

This first-world apocalyptic nightmare actually happened to a planeload of folks on a United Airlines flight last month, who spent 16 hours on the tarmac at Goose Bay airport in Newfoundland. Though US law mandates that airlines give you the option to deplane after a three-hour delay — four for international flights — because the plane was in Canada those rules didn’t apply. And all 250 people aboard were forced to spend a cold, cramped night in Atlantic Canada.

Though this situation is extreme, extended delays on the tarmac happen all the time. So what can you do after you’re involuntarily trapped on a grounded plane? And what is the airline required to do? Well, if you live in or are flying through the United States, all is not lost.

“The US is the only country with tarmac delay rights,” says Johnny Quach, Vice President of Product for passenger rights advocates AirHelp. “But airlines aren’t telling the passengers, and if they don’t know their rights, it’s hard to enforce them if they don’t know them.”

Unlike those poor people in Goose Bay, if your plane is grounded in the US, the airline is required to let you off after three hours. If they don’t, feel free to politely point this out to the flight crew and mention that the entire plane could take legal action.

“It’s the same as if any company doesn’t do what they’re supposed to,” says Quach. “But if people don’t speak out, airlines won’t tell you your rights.”

What, exactly, you’re entitled to is a little harder to define. Unlike with lost baggage and involuntary bumping, there’s not set compensation if airlines don’t let you off an excessively grounded flight.

In order to stave off lawsuits, airlines sometimes offer minimal amounts when passengers are held onboard too long. A friend of mine recently sat on an American Airlines plane for five hours and was offered 12,500 AAdvantage miles, useless to him since he wasn’t an American frequent flier. When he declined they offered him $200, or basically $40 an hour for his time.

Whether or not that’s acceptable is a personal decision and will obviously vary.

“In the case of tarmac delays, there’s no compensation amount. It’s related to your damages, so that’s different case to case,” says Quach.

Tarmac delay laws date back to 2010, spurred by a winter full of horror stories of people stuck on tarmacs for six hours or more. Though the laws have been effective, leading airlines to cancel flights that are excessively delayed rather than hold people hostage, airlines still routinely ignore them.

Frontier Airlines was fined $1.5 million in 2017 for keeping people on the tarmac too long over a number of incidents that year. The previous year, American Airlines was hit with a $1.6 million fine for breaking the same rules. But it’s not always malicious.

“Sometimes airlines are purposely ignorant,” says Quach. “But the second reason, and the one that’s more likely, is airlines don’t know they are supposed to [compensate you]; they don’t know why a flight was late, so it gets really grey.”

One caveat to the laws is if a pilot believes it isn’t safe to deplane, they can opt to keep you on longer than three or four hours. Though this would typically be in extreme cases like tropical storms or fires. And in the case of the United flight, risking an international incident.

Quach suggests keeping all your boarding passes and receipts associated with extra expenses in case the tarmac grounding causes you to miss a connection or spend an extra night away from home. He also stresses that you are proactive about asking for compensation and make it clear to the airline, politely, that you know what you’re entitled to.

Though being trapped on a freezing cold plane overnight in Canadian winter isn’t likely, you may still find yourself sitting on a tarmac longer than you’d have liked. If you do, know your rights and get all the money that’s coming. Airlines aren’t going to pony up any more than they have to, and if you think 16 hours on an unmoving plane is worth more than $200, it’s up to you to get it.