How can I get the top speed of a ship on normal burn?
I don't know of a script command or variable to directly get the normal speed, but it can be calculated.
tGetMaxVelocity() gets you the highest achievable speed when routing additional energy into the engine subsystem. This is 50% more than the ship's regular speed, so the regular speed can be calculated by multiplying the maximum velocity with 2/3.
There's one caveat to that: probably every engine has both a setting for EnergyIn and EnergyOutput. The first dictates how much energy the engine uses each tick when being fully active (at regular speed) and the second setting specifies the amount of energy the engine itself generates each tick. If both values are equal, the engine can operate at regular speed (100%) without needing any additional energy and achieves up to 150% speed when being fed with support energy.
If EnergyOutput is actually higher than EnergyIn, the engine will actually exceed the regular speed without needing additional energy, but will still be limited to a maximum of 150% of the regular speed. Using the above calculation, however, gets you the regular speed, but not the actual speed the engine is really capable of.
The other way around is even worse: if EnergyOutput is lower than EnergyIn, the engine will not be able to reach the regular speed without any additional support energy. It also won't get to the usual 150% speed level, even if being fed enough support energy.
tGetMaxVelocity() will NOT account for that (nor will the GUI) and will still report the theoretical 150% speed, even though the engine operates below that level. This leaves you with a calculated regular speed way above the actual engine's capabilities.
I don't know a good way to get around these two cases. Especially the second one is pretty bad as you'll calculate a speed way too fast for your engine while in the first case you'll just slow down your ship a bit, which alone would be tolerable. That being said, I'd consider it bad practice to actually include such an engine in your mod (with EnergyOutput being lower than EnergyIn), as it also screws up the manual speed panel on the GUI. Avoiding that, the simple calculation above should be sufficient for most needs.