Involved in the biosynthesis of the antimalarial endoperoxide artemisinin (Ref.1, PubMed:27488942). Catalyzes the NAD(P)-dependent oxidation of artemisinin precursors, artemisinic and dihydroartemisinic aldehydes, thus producing artemisinic and dihydroartemisinic acids, respectively (Ref.1). Can use both NAD and NADP as proton donors (Ref.1). (+)-artemisinic aldehyde + H2O + NADP(+) = (+)-artemisinate + 2 H(+) + NADPH (11R)-dihydroartemisinic aldehyde + H2O + NADP(+) = (11R)-dihydroartemisinate + 2 H(+) + NADPH (11R)-dihydroartemisinic aldehyde + H2O + NAD(+) = (11R)-dihydroartemisinate + 2 H(+) + NADH H2O + NADP(+) + octanal = 2 H(+) + NADPH + octanoate (E)-non-2-enal + H2O + NADP(+) = (E)-non-2-enoate + 2 H(+) + NADPH kcat is 1.53 sec(-1) with artemisinic aldehyde as substrate (in the presence of NADP, at pH 8.5 and 30 degrees Celsius) (Ref.1). kcat is 7.74 sec(-1) with dihydroartemisinic aldehyde as substrate (in the presence of NADP, at pH 8.5 and 30 degrees Celsius) (Ref.1). Optimum pH is 8.5. Sesquiterpene biosynthesis. Homotetramer. Expressed both in apical and sub-apical cells of glandular secretory trichomes (PubMed:22195571, Ref.1). Also present in flower buds and, at low levels, in leaves (Ref.1). Also present in non-glandular trichome cells (PubMed:30851440). Artemisinin and derivatives (e.g. artesunate), are antimalarial drugs due to their endoperoxidase properties; they also display multiple pharmacological actions against inflammation,viral infections, and cell and tumor proliferation (PubMed:32514287, PubMed:32405226). Artesunate may be a promising treatment for COVID-19 mediated by the severe acute respiratory syndrome coronavirus 2 (2019-nCoV) (SARS-CoV-2) because of its anti-inflammatory activity, NF-kappaB (nuclear factor kappa B)-coronavirus effect and chloroquine-like endocytosis inhibition mechanism (PubMed:32514287, PubMed:32405226). Yeast (S.cerevisiae) has been engineered to produce artemisinic-acid, a precursor of the antimalarial artemisinin compound, by expressing AMS1/ADS, CYP71AV1, ADH1 and ALDH1 in conjunction with CYB5 and CPR1. Belongs to the aldehyde dehydrogenase family.