Alrighty, some more pointers for how you can optimize your defensive system purely for this enemy (my design methodology is heavily on optimization for the current enemy, I figure that by the time the second enemy comes around I'll be due for an upgrade and refit anyways. Although I do keep some general capabilities in my navy at any point for assurances.
You're going to want to do this design process a little iteratively as far as all of the ranges go. Design your active sensor, then your Fire Control, and then your missile. Examine how your missiles would be more or less effective at slightly lower or higher ranges, and then if necessary redesign your sensors and fire controls before you send all of the final plans to your scientists for implementation.
Active Sensors:
From your encounter with the enemy you know the size of their ship. From the large number of attackers you can make the assumption that that is there smallest class. If that ends up being incorrect it's not a huge deal, your Active sensors will still spot them eventually, they'll just be a little closer, and these ships will probably have lower range, so it will all work out.
So this knowledge of the enemies hull size gives you the "Minimum Resolution" of your sensor, most of the other options are just filled with your current best technology. The last one is "Sensor Size" this is what you will set to give you your desired range.
Now the best case scenario is that you will be able to target your enemies, fire at them, your missile wave(s) will close on them and kill them, all before they get close enough to your planet to fire on you. Now this may not be possible, you'll have to do some math with their speed and your missile speed to figure out what range sensors and missiles you would need for that to be possible (With a complete guess for how many waves of missiles it would take to destroy each ship). At the very least though you need a range that is larger than theirs, a careful examination of the sensor logs of your destroyed scout ship should give you an idea of their weaponry range, if that isn't easy (maybe your thermal sensors aren't good enough to have given you an accurate time of when they fired missiles) just use their active sensor range as a proxy. I'd aim for having at least a 20% range advantage.
Last note on your active sensors. I mentioned these things are going to draw fire right? Why don't you put them on the Moon instead? All that radioactive fallout will matter a lot less up there, and it's close enough to the Earth that it won't mess with your ranges too much. (I'm assuming that we are talking about ranges that makes the distance between the Earth and Moon seem small, if that's not the case disregard this). Note that the process of constructing PDCs on the moon is a little more complicated. You need to build a packaged PDC, freight it to the moon, build a troop transport, enlist engineering brigades, transport the engineering brigades to the moon, and then assemble the PDCs.
Passive Sensors: Now these won't help you shoot at the enemy, but you should try to have a way to know exactly when the enemy enters your system. Preferably a way that doesn't let them know that you are watching so they can't kill your observer and leave you blind. This means passive sensors. The most straightforward way of doing this is with Observatories. You should know their EM signature and their thermal signature, ignore their thermal signature for now, it will change based on whether the ships' sensors or shields are on, (if they even have any, they may not) so they aren't as reliable. Thermal signatures are constant though, since the AI isn't smart enough to sneak around the system at 10% engine power. Make sure that either Earth has enough observatories to see their engine signatures at the jump point, or that you have enough observatories on a planet/moon/asteroid closer to that jump point. (If Asteroid orbits are on you may need to move the observatories occasionally.)
Fire Control: This is easy assuming your Active Sensor and Fire Control will both be in PDCs on earth. Just make the ranges the same, if the AS is on the moon you may need some wiggling, or just ignore the difference.
Missile Design:
Now this is where the real optimization will come in, because you are going to need to balance not only range, but speed, hit chance, and damage.
We are going to need to start constraining aspects of our missile to narrow down our design choices until we have a finished design.
- Lets start with one constraint: We are going to make a 1 strength warhead. This means that if you have a technology warhead strength of 4 you just need .25 MSP of warhead. The reason that we are going to stick with a 1 strength warhead is because at low tech levels getting any more than that gets pretty expensive in terms of missile size, more importantly, our targets are small targets. Since they are small targets we know that they don't have a lot of surface area, aka their armor belts are not very long. That means that even if we get unlucky and don't get overlapping hits, that bad luck will have a pretty small effect. However a very, very large ship will have a lot more armor points to lose with random peppering before taking actual damage underneath, so it's more important to have the piercing capabilities a 9 or 16 strength Warhead gives you.
- The next constraint is range. We are aiming for a range exactly equal to that of our FC. Just change the Fuel that you carry to achieve that. Note that you will have to readjust this after every subsequent change you make, especially to Engine.
- Now we want to maximize the hit chance of our missile by purchasing Engine Speed and Agility. You know how fast your target was moving, so you should actually be able to look at the automatically calculated percent chance to hit. Look at the missile agility article I posted above for the exact formula that will help you get the optimal engine/agility mix.
Note that these chances don't take into account point defenses. Since your enemies are small we will assume that they don't have point defenses and hope for the best. If you fight an enemy with point defenses then it is more important to favor engine than agility, as speed helps you avoid getting hit as well as hit the enemy. - Note that launchers come in integer sizes, there is no use for a size 1.5 missile. Throw more engines and agility on it to get it to 2.
After this process is over you should have your first missile design. At this point you are done, you can have your scientists research everything and start building. Or...
Save the design (in the game or by writing down the numbers) and you should be able to find the "expected damage per missile" which is the warhead strength multiplied by the chance to hit. If you'd like to you can try a different version of the missile with a higher or lower range (make sure you at least have a higher range than your enemy). If a missile with a 5% range advantage rather than a 20% range advantage will hit half again as often it may be worth it. If you do end up changing the missile range you may want to return to the Active Sensors and Fire Controls and tweak them as well.
Now it's possible that at this point you really can't get a good missile designed, maybe the enemies range is just so high that building a missile that goes that far just leaves you with a fat slow target by the time it gets to the ship. Well there are some advanced options for that too. From least complex to most complex:
- Make a two stage missile. The first stage won't need to go fast at all (just faster than the enemy ships), and won't need any agility at all. Have it get within 2-5 million kilometers of the enemy (or closer, we are assuming no PD, but... if that assumption is wrong at this point you don't suffer slightly increased missile attrition, you could suffer a lot more attrition) before firing off it's own missile(s) that can go much faster without needing hardly any fuel.
- Make a two stage missile, but the first stage is a drone. They go much slower than missiles, but have 10x the engine efficiency. This is probably the best route to go if you are having range troubles. Although you should probably definitely carry more than one missile as your final payload. Note that drones are a lot more expensive than missiles, but for small scale defensive use that's not much of an issue.
(A note on both of those previous choices, larger missiles will mean larger launchers, which need much longer reload times, so be aware. Also note that if you are launching drones with 4-6 missiles on board you should probably only have one launcher per FC, instead of having multiple launchers per FC, given that your targets are pretty small).
- Lastly you could try to go with fighters operating out of hangars instead. They will easily give the missiles the ranges that they need. However if you don't have Box Launchers their utility suffers a lot, and if you don't have the engine tech to make your fighters faster than them then they will get destroyed very easily. Overall this isn't really a short term solution, as you need to have been planning for this with your research tree for awhile before it's really viable. (You need fighter engines, box launchers, and some of the miniature maintenance rooms, and fuel pods at a minimum.) In your situation of "I have no navy and an enemy that could be coming right now!" it's better to go the missile route as that will be up and running much faster. It's also a more complicated solution that requires more mastery of the mechanics, but it is a good exercise.
Last note for you, once you do get your planetary defenses in order, your priority should be to get defences built out on the jump point. Ships transiting the jump point are helpless (can't see, shoot, or move) for a good one to three minutes, that is the best place to fight off a higher tech enemy.