diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testplan.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/tests/testplan.cpp b/tests/testplan.cpp index 5ef7b7187..1c4d0fab2 100644 --- a/tests/testplan.cpp +++ b/tests/testplan.cpp @@ -58,10 +58,10 @@ void setupPlan(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(79, 260) * 60 / M_OR_FT(23, 75); - plan_add_segment(dp, 0, gas_mod(&ean36, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(79, 260), 0, 0, 1); - plan_add_segment(dp, 30*60 - droptime, M_OR_FT(79, 260), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&ean36, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(79, 260), 0, 0, 1, OC); + plan_add_segment(dp, 30*60 - droptime, M_OR_FT(79, 260), 0, 0, 1, OC); } void setupPlanVpmb45m30mTx(struct diveplan *dp) @@ -86,10 +86,10 @@ void setupPlanVpmb45m30mTx(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(45, 150) * 60 / M_OR_FT(23, 75); - plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(45, 150), 0, 0, 1); - plan_add_segment(dp, 30*60 - droptime, M_OR_FT(45, 150), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(45, 150), 0, 0, 1, OC); + plan_add_segment(dp, 30*60 - droptime, M_OR_FT(45, 150), 0, 0, 1, OC); } void setupPlanVpmb60m10mTx(struct diveplan *dp) @@ -114,10 +114,10 @@ void setupPlanVpmb60m10mTx(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(60, 200) * 60 / M_OR_FT(23, 75); - plan_add_segment(dp, 0, gas_mod(&tx50_15, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1); - plan_add_segment(dp, 10*60 - droptime, M_OR_FT(60, 200), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&tx50_15, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1, OC); + plan_add_segment(dp, 10*60 - droptime, M_OR_FT(60, 200), 0, 0, 1, OC); } void setupPlanVpmb60m30minAir(struct diveplan *dp) @@ -136,8 +136,8 @@ void setupPlanVpmb60m30minAir(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(60, 200) * 60 / M_OR_FT(99, 330); - plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1); - plan_add_segment(dp, 30*60 - droptime, M_OR_FT(60, 200), 0, 0, 1); + plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1, OC); + plan_add_segment(dp, 30*60 - droptime, M_OR_FT(60, 200), 0, 0, 1, OC); } void setupPlanVpmb60m30minEan50(struct diveplan *dp) @@ -159,9 +159,9 @@ void setupPlanVpmb60m30minEan50(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(60, 200) * 60 / M_OR_FT(99, 330); - plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1); - plan_add_segment(dp, 30*60 - droptime, M_OR_FT(60, 200), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1, OC); + plan_add_segment(dp, 30*60 - droptime, M_OR_FT(60, 200), 0, 0, 1, OC); } void setupPlanVpmb60m30minTx(struct diveplan *dp) @@ -183,9 +183,9 @@ void setupPlanVpmb60m30minTx(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(60, 200) * 60 / M_OR_FT(99, 330); - plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1); - plan_add_segment(dp, 30*60 - droptime, M_OR_FT(60, 200), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(60, 200), 0, 0, 1, OC); + plan_add_segment(dp, 30*60 - droptime, M_OR_FT(60, 200), 0, 0, 1, OC); } void setupPlanVpmbMultiLevelAir(struct diveplan *dp) @@ -204,10 +204,10 @@ void setupPlanVpmbMultiLevelAir(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(20, 66) * 60 / M_OR_FT(99, 330); - plan_add_segment(dp, droptime, M_OR_FT(20, 66), 0, 0, 1); - plan_add_segment(dp, 10*60 - droptime, M_OR_FT(20, 66), 0, 0, 1); - plan_add_segment(dp, 1*60, M_OR_FT(60, 200), 0, 0, 1); - plan_add_segment(dp, 29*60, M_OR_FT(60, 200), 0, 0, 1); + plan_add_segment(dp, droptime, M_OR_FT(20, 66), 0, 0, 1, OC); + plan_add_segment(dp, 10*60 - droptime, M_OR_FT(20, 66), 0, 0, 1, OC); + plan_add_segment(dp, 1*60, M_OR_FT(60, 200), 0, 0, 1, OC); + plan_add_segment(dp, 29*60, M_OR_FT(60, 200), 0, 0, 1, OC); } void setupPlanVpmb100m60min(struct diveplan *dp) @@ -231,10 +231,10 @@ void setupPlanVpmb100m60min(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(100, 330) * 60 / M_OR_FT(99, 330); - plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(100, 330), 0, 0, 1); - plan_add_segment(dp, 60*60 - droptime, M_OR_FT(100, 330), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(100, 330), 0, 0, 1, OC); + plan_add_segment(dp, 60*60 - droptime, M_OR_FT(100, 330), 0, 0, 1, OC); } void setupPlanVpmb100m10min(struct diveplan *dp) @@ -258,10 +258,10 @@ void setupPlanVpmb100m10min(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(100, 330) * 60 / M_OR_FT(99, 330); - plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(100, 330), 0, 0, 1); - plan_add_segment(dp, 10*60 - droptime, M_OR_FT(100, 330), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(100, 330), 0, 0, 1, OC); + plan_add_segment(dp, 10*60 - droptime, M_OR_FT(100, 330), 0, 0, 1, OC); } void setupPlanVpmb30m20min(struct diveplan *dp) @@ -280,8 +280,8 @@ void setupPlanVpmb30m20min(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(30, 100) * 60 / M_OR_FT(18, 60); - plan_add_segment(dp, droptime, M_OR_FT(30, 100), 0, 0, 1); - plan_add_segment(dp, 20*60 - droptime, M_OR_FT(30, 100), 0, 0, 1); + plan_add_segment(dp, droptime, M_OR_FT(30, 100), 0, 0, 1, OC); + plan_add_segment(dp, 20*60 - droptime, M_OR_FT(30, 100), 0, 0, 1, OC); } void setupPlanVpmb100mTo70m30min(struct diveplan *dp) @@ -307,13 +307,13 @@ void setupPlanVpmb100mTo70m30min(struct diveplan *dp) free_dps(dp); int droptime = M_OR_FT(100, 330) * 60 / M_OR_FT(18, 60); - plan_add_segment(dp, 0, gas_mod(&tx21_35, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1); - plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1); - plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 3, 0, 1); - plan_add_segment(dp, droptime, M_OR_FT(100, 330), 0, 0, 1); - plan_add_segment(dp, 20*60 - droptime, M_OR_FT(100, 330), 0, 0, 1); - plan_add_segment(dp, 3*60, M_OR_FT(70, 230), 0, 0, 1); - plan_add_segment(dp, (30 - 20 - 3) * 60, M_OR_FT(70, 230), 0, 0, 1); + plan_add_segment(dp, 0, gas_mod(&tx21_35, po2, &displayed_dive, M_OR_FT(3,10)).mm, 1, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&ean50, po2, &displayed_dive, M_OR_FT(3,10)).mm, 2, 0, 1, OC); + plan_add_segment(dp, 0, gas_mod(&oxygen, po2, &displayed_dive, M_OR_FT(3,10)).mm, 3, 0, 1, OC); + plan_add_segment(dp, droptime, M_OR_FT(100, 330), 0, 0, 1, OC); + plan_add_segment(dp, 20*60 - droptime, M_OR_FT(100, 330), 0, 0, 1, OC); + plan_add_segment(dp, 3*60, M_OR_FT(70, 230), 0, 0, 1, OC); + plan_add_segment(dp, (30 - 20 - 3) * 60, M_OR_FT(70, 230), 0, 0, 1, OC); } /* We compare the calculated runtimes against two values: |