{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Changed directory to project root: d:\\Projects\\Balloon\\Balloon_GitHub\\App\n"
     ]
    }
   ],
   "source": [
    "from directory_set import set_working_directory_to_app\n",
    "\n",
    "set_working_directory_to_app()\n",
    "\n",
    "from functions import SolarPanel, TrackingType"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "from datetime import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "latitude, longitude, min_altitude = 20, 20, 25000\n",
    "date_departure = datetime(2024, 4, 28)  # Jul 12\n",
    "flight_days = 25\n",
    "\n",
    "efficiency = 0.22  # m2\n",
    "tracking_type = TrackingType.NO_TRACKING\n",
    "required_power = 1200\n",
    "required_energy = 25000\n",
    "safety_coefficient = 1.2\n",
    "surface_density = 0.65"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "SolarPanel.__init__() missing 2 required positional arguments: 'date_departure' and 'flight_days'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[4], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m solar_panel \u001b[38;5;241m=\u001b[39m \u001b[43mSolarPanel\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m      2\u001b[0m \u001b[43m            \u001b[49m\u001b[43mefficiency\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mefficiency\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      3\u001b[0m \u001b[43m            \u001b[49m\u001b[43msafety_coefficient\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msafety_coefficient\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      4\u001b[0m \u001b[43m            \u001b[49m\u001b[43msurface_density\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msurface_density\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      5\u001b[0m \u001b[43m            \u001b[49m\u001b[43mlatitude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlatitude\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      6\u001b[0m \u001b[43m            \u001b[49m\u001b[43mlongitude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mlongitude\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      7\u001b[0m \u001b[43m            \u001b[49m\u001b[43mmin_altitude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmin_altitude\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      8\u001b[0m \u001b[43m            \u001b[49m\u001b[43mtracking_type\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mtracking_type\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m      9\u001b[0m \u001b[43m        \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m     10\u001b[0m solar_panel\u001b[38;5;241m.\u001b[39mset_date(\n\u001b[0;32m     11\u001b[0m     date_departure\u001b[38;5;241m=\u001b[39mdate_departure, flight_days\u001b[38;5;241m=\u001b[39mflight_days\n\u001b[0;32m     12\u001b[0m )\n\u001b[0;32m     13\u001b[0m solar_panel\u001b[38;5;241m.\u001b[39mset_required_energy(required_energy)\n",
      "\u001b[1;31mTypeError\u001b[0m: SolarPanel.__init__() missing 2 required positional arguments: 'date_departure' and 'flight_days'"
     ]
    }
   ],
   "source": [
    "solar_panel = SolarPanel(\n",
    "            efficiency=efficiency,\n",
    "            safety_coefficient=safety_coefficient,\n",
    "            surface_density=surface_density,\n",
    "            latitude=latitude,\n",
    "            longitude=longitude,\n",
    "            min_altitude=min_altitude,\n",
    "            tracking_type=tracking_type,\n",
    "        )\n",
    "solar_panel.set_date(\n",
    "    date_departure=date_departure, flight_days=flight_days\n",
    ")\n",
    "solar_panel.set_required_energy(required_energy)\n",
    "solar_panel.set_required_power(required_power)\n",
    "\n",
    "solar_panel.calculate_energy_power()\n",
    "solar_panel.define_output()\n",
    "\n",
    "solar_panel.plot()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Balloon_01",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
