# blueboat_load_calculator.py

def pounds_to_kg(pounds):
    return pounds * 0.453592

# Constants
MAX_LOAD_KG = 15.0

# Component weights (in kg)
norbit_weight_water = 3.5  # Use in-water weight
battery_option_1 = 2 * 1.2      # 2x 1.2 kg batteries
battery_option_2 = 8 * 0.75     # 8x 750 g batteries
rv55_weight = pounds_to_kg(1.34)
dc_power_supply = 0.3
misc_weight = 3.0 ##Mounting bars, small electronics, etc...
starlink_mini = 1.16

def calculate_total_load(use_option=1, include_starlink=False):
    battery_weight = battery_option_1 if use_option == 1 else battery_option_2
    comms_weight = starlink_mini if include_starlink else rv55_weight
    
    total_load = (
        norbit_weight_water +
        battery_weight +
        comms_weight +
        dc_power_supply +
        misc_weight
    )
    
    remaining_capacity = MAX_LOAD_KG - total_load
    return total_load, remaining_capacity

# Display results
for option in [1, 2]:
    for starlink in [False, True]:
        total, remaining = calculate_total_load(option, starlink)
        print(f"--- Battery Option {option} | Starlink: {'Yes' if starlink else 'No'} ---")
        print(f"Total Load: {total:.2f} kg")
        print(f"Remaining Capacity: {remaining:.2f} kg")
        print("Status:", "✅ OK" if remaining >= 0 else "❌ Overloaded")
        print()
