Inspiration

Aggressive driving costs more than most people realize. According to FuelEconomy.gov, speeding, rapid acceleration, and hard braking can reduce fuel economy by 15–30% on highways and 10–40% in stop-and-go traffic. With gas prices reaching $4.33 per gallon nationally on October 15, according to AAA, these habits can quickly add up.

That's why we built Drive Save, an app that brings the excitement of fantasy sports to fuel-efficient driving.

Drive Save uses real-time motion data from your iPhone and a physics-based model to estimate how much extra money your driving habits cost you, turning inefficient driving into a tangible dollar amount.

But awareness alone isn't enough. Drive Save makes improving your driving habits fun and competitive. Friends join leagues of at least four drivers, compete to save the most money, track weekly standings, and celebrate their progress.

By combining physics, financial awareness, and friendly competition, Drive Save transforms everyday driving into a game where better habits mean bigger savings.

The physics model behind Drive Save

We started with a question: what might the same drive cost with different driving habits? Our model explores this through a hypothetical “twin,” using the same vehicle’s parameters to compare selected moments with earlier coasting, less demanding acceleration, or lower cruising speeds.

When a car accelerates, it needs energy to gain speed and overcome road resistance:

$$ E_{\text{wheel}} = \frac{1}{2}m\left(v_2^2-v_1^2\right) + \left(A+B\bar{v}+C\bar{v}^{2}\right)\bar{v}\Delta t $$

The estimated additional fuel used during acceleration is:

$$ \Delta G_{\text{acceleration}} = \frac{rE_{\text{wheel}}}{\eta H} $$

We convert the combined estimated fuel difference into dollars:

$$ C_{\text{avoidable}} = p\left(\Delta G_{\text{acceleration}}+\Delta G_{\text{braking}}+\Delta G_{\text{high speed}}\right) $$ Here, p is the fuel price per gallon.

Tiger Data connects these timestamped observations and calculated results across trips. Its PostgreSQL and TimescaleDB platform supports personal baselines, estimated savings history, and weekly league standings. This connects real-time sensor observations to post-trip financial feedback and longer-term progress.

The result is an estimate of what different habits might save. It depends on assumptions about the vehicle and driving conditions, and its real-world accuracy still needs validation.

Fantasy league-style competition

Inspired by fantasy sports, DriveSave turns fuel-efficient driving into a friendly competition.

  • Create or join leagues: : Compete with friends in private leagues of at least four drivers.

  • Compete individually: Every driver earns a ranking based on their estimated fuel savings.

  • Personalized baselines: Track improvement relative to your own driving history, making competition fairer across different vehicles and driving routines.

  • Weekly leaderboards: See who's saving the most money and climbing the rankings.

  • Track your progress: Review trip history, estimated savings, and improvements over time.

  • Friendly rivalries: Challenge friends, celebrate progress, and motivate each other to develop better driving habits.

How we built Drive Save

We built DriveSave by connecting an iPhone app, a physics-based fuel estimation model, and a cloud backend. Our shared Notion workspace helped us coordinate development and integrate these components.

iPhone App — SwiftUI, Core Motion & Core Location

  • Built a native iOS app using SwiftUI.
  • Used Core Motion to capture acceleration and rotation data, and Core Location to track GPS position and speed.
  • Implemented phone calibration, driving-event detection, and local trip storage.
  • Developed interfaces for vehicle selection, trip receipts, driving history, and fantasy leagues.

Backend — Python & FastAPI

  • Built REST APIs for authentication, vehicle profiles, trip uploads, financial receipts, and league management.
  • Processed timestamped sensor observations and detected driving events.
  • Added data validation and duplicate detection to ensure reliable trip uploads.

Physics-Based Fuel Estimation Model

  • Developed a Python fuel estimator based on vehicle dynamics and energy consumption.
  • Integrated an EPA-derived vehicle catalog to support vehicle-specific calculations.
  • Estimated potentially avoidable fuel consumption from acceleration, braking, and sustained high-speed driving.
  • Converted estimated fuel differences into dollar amounts, generating itemized financial receipts with transparent assumptions.

Cloud Database — Tiger Data (PostgreSQL & TimescaleDB)

  • Leveraged Tiger Data's PostgreSQL and TimescaleDB platform to store timestamped trip data, driving events, and estimated fuel savings.
  • Used SQL queries to calculate personalized driving baselines and track improvements across trips.
  • Powered weekly league leaderboards, connecting individual driving performance to fantasy-style competition.
  • Enabled long-term tracking of financial estimates and driving habits.

Cloud Deployment — Vultr, Docker & Caddy

  • Configured our FastAPI backend for hosting on Vultr's cloud infrastructure.
  • Containerized the backend using Docker for consistent deployment.
  • Used Caddy as a reverse proxy to provide secure HTTPS connections.
  • Connected the iPhone app to a shared cloud API for trip processing, financial receipts, and league updates.

Together, Tiger Data powers our driving analytics and competition, while Vultr provides the cloud infrastructure connecting the entire experience.

Challenge we faced

One of our biggest challenges was getting trip data from the iPhone to the backend and database, then turning it into a financial receipt. A trip could upload and save successfully but still fail to generate a receipt because the fuel model needed information the phone had not included. GPS readings also arrived at slightly different times from the recording’s start and end, causing the model to reject them.

Another challenge was estimating money wasted without overstating what the phone could measure. Motion sensors reveal changes in movement, but they do not directly measure fuel consumption. We had to account for vehicle differences and define realistic comparison scenarios. For example, accelerating quickly does not automatically waste all the energy used to accelerate. We refined the calculations, documented their assumptions, and made clear that the resulting dollar amounts are experimental estimates.

Built With

Share this project:

Updates

Submission history