James V, King of Scots, did have a lot of illegitimate children. Martha Pettigrew was not one of them. You can see by James' death date that he could not possible have been her father; beyond that, his illegitimate children all had Stewart as a surname, so it wouldn't make sense that Martha, had she been born many decades earlier, wouldn't also have been acknowledged.