Hi
I'm no expert at this since my boat is not kept afloat, but I would put a shore power line in and use this to charge the battery.
Just be sure that is one off the electronic chargers, whice will actualy switch off before destroying the battery.
This will keep the battery alive, but do get a cover anyway, keeps the boat nice and dry, and you can even sleep under it if you have to
Solar panel, hmmm nice... I think this might be the next toy for my boat
Rene