Before a guest unlocks a cart, resort golf cart rental software should confirm six things: the guest was invited, their ID is checked, they meet the minimum age, they signed the rental agreement, the cart has enough battery, and the cart is at the pickup area. Zones come after unlock, and they warn and record. They never stop the cart.
That is the whole rule set. The rest of this post turns it into a small Python script you can read in five minutes, then looks at where a script ends and a rental platform begins.
What should resort golf cart rental software check before unlock?
It should check the guest and the cart separately, and it should report every failed check at once.
The guest checks are about who is riding:
- Invited guest. A resort fleet is private. Only people the staff have added should see the carts at all.
- ID checked. Someone, or some step in the app, has confirmed the guest is who they say they are.
- Minimum age. The property sets a minimum rider age and the software enforces it.
- Signed rental agreement. No signature, no ride.
The cart checks are about whether this cart is fit to go:
- Enough battery. A cart that dies halfway to the villa becomes a staff recovery job.
- At the pickup area. A cart parked somewhere else is probably mid-use, abandoned, or waiting for service.
Reporting all the reasons together matters. A guest who fixes one problem and then meets a second one will walk to the front desk, which is the trip self-serve rental was meant to remove.
How do you store a resort zone as data?
Store each zone as a polygon: a named list of coordinate pairs that traces its edge. The pickup area, the beach and the service yard are all the same kind of object with different names.
The standard to follow is GeoJSON, defined in RFC 7946. Two of its rules matter here. Positions are written longitude first, then latitude. And a polygon's linear ring is closed, meaning its first and last positions are the same. The rings in the code below follow that order and repeat the first point at the end.
The common bug is swapping latitude and longitude. Many map apps show latitude first, so people paste coordinates in that order. The code still runs, but the zone lands in the wrong part of the world and every cart reads as outside it. If your pickup check fails for every cart on day one, look at the coordinate order first.
How does the pre-ride check work in Python?
It is three small functions: one geometry test, one unlock decision, and one zone check that only reports.
from dataclasses import dataclass, field
from datetime import date
# A zone is a GeoJSON-style ring: [longitude, latitude] pairs, first point repeated at the end.
Ring = list[tuple[float, float]]
def inside(point: tuple[float, float], ring: Ring) -> bool:
"""Ray casting: count how often a ray from the point crosses the ring's edges."""
x, y = point
hit = False
for (x1, y1), (x2, y2) in zip(ring, ring[1:]):
if (y1 > y) != (y2 > y):
cross_x = x1 + (y - y1) * (x2 - x1) / (y2 - y1)
if x < cross_x:
hit = not hit
return hit
@dataclass
class Guest:
name: str
invited: bool
id_checked: bool
birth_date: date
agreement_signed: bool
@dataclass
class Cart:
cart_id: str
battery_pct: int
position: tuple[float, float]
locked: bool = True
@dataclass
class ResortRules:
min_age: int
min_battery_pct: int
pickup_zone: Ring
no_go_zones: dict[str, Ring] = field(default_factory=dict)
def age_on(birth: date, today: date) -> int:
return today.year - birth.year - ((today.month, today.day) < (birth.month, birth.day))
def unlock_problems(guest: Guest, cart: Cart, rules: ResortRules, today: date) -> list[str]:
"""Return every reason the unlock should wait. An empty list means: unlock."""
problems = []
if not guest.invited:
problems.append("guest is not on this property's invited list")
if not guest.id_checked:
problems.append("ID check not done")
if age_on(guest.birth_date, today) < rules.min_age:
problems.append(f"guest is under the minimum age of {rules.min_age}")
if not guest.agreement_signed:
problems.append("rental agreement not signed")
if cart.battery_pct < rules.min_battery_pct:
problems.append(f"{cart.cart_id} battery at {cart.battery_pct}% (minimum {rules.min_battery_pct}%)")
if not inside(cart.position, rules.pickup_zone):
problems.append(f"{cart.cart_id} is not at the pickup area")
return problems
def zone_events(cart: Cart, rules: ResortRules) -> list[dict]:
"""Zones only warn the rider and record the breach. Nothing here slows or stops the cart."""
events = []
for name, ring in rules.no_go_zones.items():
if inside(cart.position, ring):
events.append({"cart": cart.cart_id, "zone": name,
"action": "warn rider + record breach"})
return events
if __name__ == "__main__":
pickup = [(55.1400, 25.0700), (55.1410, 25.0700), (55.1410, 25.0710), (55.1400, 25.0710), (55.1400, 25.0700)]
beach = [(55.1420, 25.0690), (55.1440, 25.0690), (55.1440, 25.0705), (55.1420, 25.0705), (55.1420, 25.0690)]
rules = ResortRules(min_age=16, min_battery_pct=30, pickup_zone=pickup, no_go_zones={"beach": beach})
guest = Guest("Room 214", invited=True, id_checked=True,
birth_date=date(2011, 3, 2), agreement_signed=False)
cart = Cart("C-07", battery_pct=22, position=(55.1405, 25.0705))
for p in unlock_problems(guest, cart, rules, today=date(2026, 11, 19)):
print("wait:", p)
adult = Guest("Room 118", True, True, date(1988, 7, 9), True)
ready = Cart("C-11", battery_pct=81, position=(55.1404, 25.0702))
print("C-11 problems:", unlock_problems(adult, ready, rules, today=date(2026, 11, 19)))
ready.position = (55.1430, 25.0698) # the guest drives onto the beach
print(zone_events(ready, rules))
Here is what each function does.
inside is a point-in-polygon test using ray casting. Picture a straight line drawn from the cart's position out to one side. Count how many times that line crosses the zone's edge. An odd count means the cart is inside, and an even count means it is outside. This one function answers both location questions: is the cart at the pickup area, and has it entered a zone?
unlock_problems returns every reason to wait. It does not stop at the first failure. An empty list means unlock. That design keeps the decision and the explanation in one place, so the app can show the guest exactly what to fix.
zone_events only warns and records. It looks at where the cart is, and if the cart is inside a no-go zone it returns an event describing what to do: warn the rider and record the breach. It has no command to slow or stop anything.
Running the script prints this:
wait: guest is under the minimum age of 16
wait: rental agreement not signed
wait: C-07 battery at 22% (minimum 30%)
C-11 problems: []
[{'cart': 'C-11', 'zone': 'beach', 'action': 'warn rider + record breach'}]
The first guest gets three reasons to wait in one pass. Cart C-11 has no problems, so it unlocks. Later, C-11 is on the beach, and the result is a warning and a record.
Two plain notes on the numbers. The sample coordinates are made-up points, not a real property. The minimum age of 16 and the battery floor of 30% are example settings. Each property sets its own, and neither is a legal rule. Check the rules that apply where you operate.
What should happen when a guest drives into a no-go zone?
The rider should get a warning and the breach should be recorded. The cart should keep moving.
Stopping a cart remotely sounds safer than it is. The cart may be on a slope, at a crossing, or carrying a family. Position readings also drift, so a cart on the path beside the beach can read as on the beach for a few seconds. A warning that fires by mistake is a small annoyance, but a cart that halts by mistake leaves a guest stranded and puts a staff member on a recovery run.
A record gives the resort something useful afterwards: which guest, which cart, which zone, at what time. Staff can speak to the guest, and managers can see whether one zone keeps getting breached and needs a sign or a barrier.
Rule-based check or full rental platform: what changes?
The rules stay the same. What changes is who keeps the data, who keeps the history, and who does the work every day.
| A pre-ride check script like this one | Resort golf cart rental software | |
|---|---|---|
| Who keeps the guest list | You, in a dictionary or a file | Staff invite guests to a private fleet |
| ID and age check | A true/false value you supply | Done in the guest app before the ride |
| Signed agreement | A flag you set by hand | Signed in the app and stored with the rental |
| Battery reading | A number you type in | Read from the cart |
| Zones (warn + record) | Prints an event to the screen | Warns the rider and saves the breach |
| Payments | Not covered | Taken in the app |
| Audit trail of every ride | Only what you choose to log | Kept for each ride |
| Staff time | Someone has to run it and feed it data | Runs on its own; staff review alerts |
A script like this is good for learning the logic and for prototyping rules before you commit to them. A platform keeps records and runs every day, including the days nobody is watching.
What should you ask before you buy resort golf cart rental software?
Ask how the checks above work in practice, and ask to see each one happen on a real cart.
- How do staff add guests, and can anyone outside that list see or unlock a cart?
- Where do the ID check, minimum age and rental agreement happen, and can we set the age ourselves?
- What battery level blocks an unlock, and can we change it?
- When a guest enters a no-go zone, what exactly happens to the cart? Does anything ever slow or stop it?
- What is recorded for each ride and each zone breach, and how long is it kept?
- Where does the guest's payment go, and whose account receives it?
- How does a guest unlock the cart, and what happens if their phone has no signal?
- Which languages does the guest app support?
Where does Axons Mobility fit?
Axons Mobility is golf cart and LSV fleet management software, based in Dubai, UAE, for cart makers, dealers and fleet operators. At Axons Mobility we see resort teams ask for the same list this script checks, so that is how our resort golf cart rental software works. Staff invite guests to a private fleet. The ID check, the minimum rider age and the rental agreement all happen in the app. Guests unlock by scanning the cart's QR code in the resort's branded app, or by tapping a key card where the cart has a reader.
A service area warns guests who leave the grounds. No-go zones such as the beach or the service yard warn the guest and record the breach. Zones never slow or stop a cart. Payments go straight into the resort's own Stripe account, and the guest app runs in 8 languages.
The next step is to read the resort page linked above and compare it against the eight questions. There is also a 15-day free trial if you would rather test the checks on your own carts.
Tejal Laxkar is Co-founder & Director (Strategic Partnerships & Sales) at Axons Mobility, Dubai.
Top comments (0)