#include <stdio.h>
#include <stdlib.h>

#include "config.h"

#include "depth.h"

static double
density (void) {
    static Config *cfg = NULL;
    static double density;
    if (!cfg) {
        //cfg = config_parse_default ();
        //int freshwater = config_get_boolean_or_default (cfg, "vehicle.freshwater", 1);
        int freshwater = 1;
        if (freshwater)
            density = DEPTH_RHO_FRESHWATER;
        else
            density = DEPTH_RHO_SEAWATER;
    }
    return density;
}

double
depth_dfs_simple (double p_gage) {
    return p_gage / (DEPTH_GRAVITY * density ());
}

#include "depth.h"
