Luxury Bus Field Trip Calculator

Calculate the cost of a luxury bus field trip

Info

Created On: July 25, 2023
Created By: @CalculatorTools

AI

Model: gpt-3.5-turbo-16k-0613
Time: 58 seconds
Prompt Tokens: 2236
Completion Tokens: 3557
Total Token Cost: 5793

Get This App On Your Website

1. Copy the code above with the iframe and link.
2. Paste the code into your website.
3. Resize the iframe to fit your website.

Javascript, HTML, CSS Code

                    <html>
<head>
<script type="text/javascript"> window.addEventListener('error', function(event) { var message = JSON.parse(JSON.stringify(event.message)); var source = event.filename; var lineno = event.lineno; var colno = event.colno; var error = event.error; window.parent.postMessage({ type: 'iframeError', details: { message: message, source: source, lineno: lineno, colno: colno, error: error ? error.stack : '' } }, '*'); }); window.addEventListener('unhandledrejection', function(event) { window.parent.postMessage({ type: 'iframePromiseRejection', details: { reason: event.reason } }, '*'); }); </script>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Luxury Bus Field Trip Calculator</title>
<meta name="description" content="Calculate the cost of a luxury bus field trip">
<meta name="keywords" content="luxury bus, field trip, calculator">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<!-- Built-In Functions for Apps -->
<script type="text/javascript">
var localStoragePrefix = "ct-169029793268214";
var lastSave = 0;
// save to localstorage
function saveLocal(data) {
if (Date.now() - lastSave < 1000) {
return;
}
// save to cookie
let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict";
cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString();
document.cookie = cookie;
lastSave = Date.now();
}

// load from localstorage
function loadLocal() {
var cookiePrefix = localStoragePrefix + "=";
var cookieStart = document.cookie.indexOf(cookiePrefix);
if (cookieStart > -1) {
let cookieEnd = document.cookie.indexOf(";", cookieStart);
if (cookieEnd == -1) {
cookieEnd = document.cookie.length;
}
var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd);
return JSON.parse(cookieData);
}
}

// Calculate Total Trip Hours
function calculateTotalTripHours() {
var departureDate = $("#departure-date").val();
var departureTime = $("#departure-time").val();
var arriveDate = $("#arrive-date").val();
var arriveTime = $("#arrive-time").val();

if (departureDate === arriveDate && departureTime === arriveTime) {
$("#total-trip-hours").val(24);
} else {
var departureDateTime = new Date(departureDate + " " + departureTime);
var arriveDateTime = new Date(arriveDate + " " + arriveTime);
var hours = (arriveDateTime - departureDateTime) / (1000 * 60 * 60);
$("#total-trip-hours").val(hours);
}
}

// Calculate Number of Vehicles
function calculateNumberOfVehicles() {
var passengersCount = parseInt($("#passengers-count").val());
var numberOfVehicles = Math.ceil(passengersCount / 55);
$("#number-of-vehicles").val(numberOfVehicles);
}

// Calculate Overnight
function calculateOvernight() {
var arriveDate = $("#arrive-date").val();
var arriveTime = $("#arrive-time").val();
var departureDate = $("#departure-date").val();
var numberOfVehiclesOverride = parseInt($("#number-of-vehicles-override").val());

if (numberOfVehiclesOverride > 1 && (new Date(arriveDate) - new Date(departureDate)) > 0) {
$("#overnight").val("Yes");
} else {
$("#overnight").val("No");
}
}

// Calculate Cost based on Rate
function calculateCostBasedOnRate() {
var overnight = $("#overnight").val();
var location = $("#location").val();
var drivingTime = parseInt($("#estimated-driving-time").val());

if (overnight === "Yes") {
$("#cost-based-on-rate").val(0);
} else {
var rateTable;
if (location === "LI/NYC") {
rateTable = [
[3.0, 354.86],
[4.0, 313.43],
[5.0, 291.46],
[6.0, 262.95],
[7.0, 232.78],
[8.0, 214.16],
[9.0, 209.54],
[10.0, 204.98]
];
} else {
rateTable = [
[4.0, 363.49],
[5.0, 339.30],
[6.0, 315.13],
[7.0, 297.00],
[8.0, 290.93],
[9.0, 284.88],
[10.0, 278.85]
];
}

var cost = 0;
for (var i = 0; i < rateTable.length; i++) {
if (drivingTime >= rateTable[i][0]) {
cost = rateTable[i][1];
} else {
break;
}
}

if (location === "LI/NYC" && drivingTime < 3) {
cost = 0;
}

$("#cost-based-on-rate").val(cost);
}
}

// Calculate Gratuity per Driver, per Bus, per Day
function calculateGratuityPerDay() {
var totalRoundTripCost = parseInt($("#total-round-trip-cost").val());
var estimatedDrivingTime = parseInt($("#estimated-driving-time").val());
var reliefDrivers = parseInt($("#relief-drivers").val());
var gratuityPerDay = (Math.max(1, reliefDrivers) + (estimatedDrivingTime > 9 ? reliefDrivers : 0)) * 40;
$("#gratuity-per-day").val(gratuityPerDay);
}

// Calculate Cost of Relief Driver
function calculateCostOfReliefDriver() {
var overnight = $("#overnight").val();
var estimatedDrivingTime = parseInt($("#estimated-driving-time").val());
var passengersCount = parseInt($("#passengers-count").val());
var costOfReliefDriver = 0;

if (overnight === "Yes") {
costOfReliefDriver = 0;
} else {
if (estimatedDrivingTime > 9) {
costOfReliefDriver = estimatedDrivingTime * 98.33 * Math.ceil(passengersCount / 55);
}

$("#cost-of-relief-driver").val(costOfReliefDriver);
}
}

// Calculate Grand Total Cost of Round Trip
function calculateGrandTotalCostRoundTrip() {
var overnight = $("#overnight").val();
var totalRoundTripCost = parseInt($("#total-round-trip-cost").val());
var gratuitiesRoundTrip = parseInt($("#gratuities-round-trip").val());
var grandTotalCostRoundTrip = 0;

if (overnight !== "Yes") {
grandTotalCostRoundTrip = totalRoundTripCost + gratuitiesRoundTrip;
}

$("#grand-total-cost-round-trip").val(grandTotalCostRoundTrip);
}

// Calculate Grand Total Cost for One Way
function calculateGrandTotalCostOneWay() {
var overnight = $("#overnight").val();
var totalOneWayCost = parseInt($("#total-one-way-cost").val());
var gratuitiesOneWay = parseInt($("#gratuities-one-way").val());
var grandTotalCostOneWay = 0;

if (overnight !== "Yes") {
grandTotalCostOneWay = totalOneWayCost + gratuitiesOneWay;
}

$("#grand-total-cost-one-way").val(grandTotalCostOneWay);
}

// Calculate Grand Total Cost for Drop/Pick
function calculateGrandTotalCostDropPick() {
var overnight = $("#overnight").val();
var totalDropPickCost = parseInt($("#total-drop-pick-cost").val());
var gratuitiesDropPick = parseInt($("#gratuities-drop-pick").val());
var grandTotalCostDropPick = 0;

if (overnight !== "Yes") {
grandTotalCostDropPick = totalDropPickCost + gratuitiesDropPick;
}

$("#grand-total-cost-drop-pick").val(grandTotalCostDropPick);
}

// Calculate Grand Total Cost for Overnight Trips
function calculateGrandTotalCostOvernightTrips() {
var overnight = $("#overnight").val();
var totalOvernightCost = parseInt($("#total-overnight-cost").val());
var gratuitiesOvernight = parseInt($("#gratuities-overnight").val());
var grandTotalCostOvernightTrips = 0;

if (overnight === "Yes") {
grandTotalCostOvernightTrips = totalOvernightCost + gratuitiesOvernight;
}

$("#grand-total-cost-overnight-trips").val(grandTotalCostOvernightTrips);
}
</script>

<style>
/* App CSS Goes Here */
</style>

<link rel="canonical" href="https://calculator.tools/prompt/2316/">
<meta charset="utf-8">
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
<h1>Luxury Bus Field Trip Calculator</h1>

<h2>Section 1: Trip Time & Date</h2>
<div class="form-group">
<label for="departure-date">Departure Date:</label>
<input type="date" id="departure-date" onchange="calculateTotalTripHours()" value="">
</div>

<div class="form-group">
<label for="departure-time">Departure Time:</label>
<input type="time" id="departure-time" onchange="calculateTotalTripHours()" value="">
</div>

<div class="form-group">
<label for="arrive-date">Arrive at School Date:</label>
<input type="date" id="arrive-date" onchange="calculateTotalTripHours(); calculateOvernight()" value="">
</div>

<div class="form-group">
<label for="arrive-time">Arrive at School Time:</label>
<input type="time" id="arrive-time" onchange="calculateTotalTripHours(); calculateOvernight()" value="">
</div>

<div class="form-group">
<label for="total-trip-hours">Total Trip Hours:</label>
<input type="number" id="total-trip-hours" readonly value="">
</div>

<h2>Section 2: Trip Information</h2>
<div class="form-group">
<label for="location">Location:</label>
<select id="location" onchange="calculateCostBasedOnRate()">
<option value="LI/NYC">LI/NYC</option>
<option value="Outside LI/NYC">Outside LI/NYC</option>
</select>
</div>

<div class="form-group">
<label for="passengers-count">Passengers Count:</label>
<input type="number" id="passengers-count" onchange="calculateNumberOfVehicles()" value="">
</div>

<div class="form-group">
<label for="number-of-vehicles">Number of Vehicles:</label>
<input type="number" id="number-of-vehicles" readonly value="">
</div>

<div class="form-group">
<label for="number-of-vehicles-override">Number of Vehicles Override:</label>
<input type="number" id="number-of-vehicles-override" value="">
</div>

<div class="form-group">
<label for="overnight">Overnight:</label>
<input type="text" id="overnight" readonly value="">
</div>

<div class="form-group">
<label for="estimated-driving-time">Estimated Driving Time:</label>
<input type="number" id="estimated-driving-time" onchange="calculateCostBasedOnRate(); calculateGratuityPerDay(); calculateCostOfReliefDriver()" value="">
</div>

<h3>Trip Costs for Round Trip</h3>
<div class="form-group">
<label for="total-round-trip-cost">Grand Total Cost of Round Trip:</label>
<input type="number" id="total-round-trip-cost" value="">
</div>

<div class="form-group">
<label for="gratuities-round-trip">Gratuity per Driver, per Bus, per Day:</label>
<input type="number" id="gratuities-round-trip" readonly value="">
</div>

<div class="form-group">
<label for="cost-of-relief-driver">Cost of Relief Driver:</label>
<input type="number" id="cost-of-relief-driver" readonly value="">
</div>

<div class="form-group">
<label for="grand-total-cost-round-trip">Grand Total Cost of Round Trip:</label>
<input type="number" id="grand-total-cost-round-trip" readonly value="">
</div>

<h3>Trip Cost for One Way</h3>
<div class="form-group">
<label for="total-one-way-cost">Grand Total Cost for One Way:</label>
<input type="number" id="total-one-way-cost" value="">
</div>

<div class="form-group">
<label for="gratuities-one-way">Gratuity per Driver, per Bus, per Day:</label>
<input type="number" id="gratuities-one-way" readonly value="">
</div>

<div class="form-group">
<label for="cost-of-relief-driver">Cost of Relief Driver:</label>
<input type="number" id="cost-of-relief-driver" readonly value="">
</div>

<div class="form-group">
<label for="grand-total-cost-one-way">Grand Total Cost for One Way:</label>
<input type="number" id="grand-total-cost-one-way" readonly value="">
</div>

<h3>Trip Cost for Drop/Pick</h3>
<div class="form-group">
<label for="total-drop-pick-cost">Grand Total Cost for Drop/Pick:</label>
<input type="number" id="total-drop-pick-cost" value="">
</div>

<div class="form-group">
<label for="gratuities-drop-pick">Gratuity per Driver, per Bus, per Day:</label>
<input type="number" id="gratuities-drop-pick" readonly value="">
</div>

<div class="form-group">
<label for="cost-of-relief-driver">Cost of Relief Driver:</label>
<input type="number" id="cost-of-relief-driver" readonly value="">
</div>

<div class="form-group">
<label for="grand-total-cost-drop-pick">Grand Total Cost for Drop/Pick:</label>
<input type="number" id="grand-total-cost-drop-pick" readonly value="">
</div>

<h3>Overnight Trips</h3>
<div class="form-group">
<label for="total-overnight-cost">Grand Total Cost for Overnight Trips:</label>
<input type="number" id="total-overnight-cost" value="">
</div>

<div class="form-group">
<label for="gratuities-overnight">Gratuity per Driver, per Bus, per Day:</label>
<input type="number" id="gratuities-overnight" readonly value="">
</div>

<div class="form-group">
<label for="cost-of-relief-driver">Cost of Relief Driver:</label>
<input type="number" id="cost-of-relief-driver" readonly value="">
</div>

<div class="form-group">
<label for="grand-total-cost-overnight-trips">Grand Total Cost for Overnight Trips:</label>
<input type="number" id="grand-total-cost-overnight-trips" readonly value="">
</div>
</div>
<script type="text/javascript"> var localStoragePrefix = "ct-{{ cachebreaker }}"; var lastSave = 0; function saveLocal(data) { if (Date.now() - lastSave < 1000) { return; } let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict"; cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString(); document.cookie = cookie; lastSave = Date.now(); } function loadLocal() { var cookiePrefix = localStoragePrefix + "="; var cookieStart = document.cookie.indexOf(cookiePrefix); if (cookieStart > -1) { let cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = document.cookie.length; } var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd); return JSON.parse(cookieData); } } </script>

<script type="text/javascript"> window.addEventListener('load', function() { var observer = new MutationObserver(function() { window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); observer.observe(document.body, {attributes: true, childList: true, subtree: true}); window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); </script>
</body>
</html>

FAQ

What is Calculator Tools?

Calculator Tools allows you to instantly create and generate any simple one page web app for free and immediately have it online to use and share. This means anything! Mini apps, calculators, trackers, tools, games, puzzles, screensavers... anything you can think of that the AI can handle.

The AI uses Javacript, HTML, and CSS programming to code your app up in moments. This currently uses GPT-4 the latest and most powerful version of the OpenAI GPT language model.

What Do You Mean Make An App?

Have you ever just wanted a simple app but didn't want to learn programming or pay someone to make it for you? Calculator Tools is the solution! Just type in your prompt and the AI will generate a simple app for you in seconds. You can then customize it to your liking and share it with your friends.

AI has become so powerful it is that simple these days.

Does This Use ChatGPT?

It uses GPT-4 which is the most powerful model for ChatGPT.

Calculator Tools does not remember things from prompt to prompt, each image is a unique image that does not reference any of the images or prompts previously supplied.