Loading...
Searching...
No Matches
Environment Class Reference

Models atmospheric and gravitational conditions for the flight simulation. More...

`#include <Environment.h>`

## Public Member Functions

| Environment (double surfacePressure, double surfaceTemperature, double launchAltitude)
| Constructs a new Environment.
| ~Environment ()=default
| Default destructor.
double | getAirDensity (double altitude) const
| Returns the atmospheric density at a given altitude.
double | getGravity (double altitude) const
| Returns the gravitational acceleration at a given altitude.
double | getSurfacePressure () const
| Returns the surface pressure at launch site.
double | getSurfaceTemperature () const
| Returns the surface temperature at launch site.
double | getLaunchAltitude () const
| Returns the launch altitude above sea level.

## Private Member Functions

double | getStandardTemperature (double altitude) const
| Internal method to compute standard atmosphere temperature at altitude.
double | getStandardPressure (double altitude) const
| Internal method to compute standard atmosphere pressure at altitude.

## Private Attributes

double | surfacePressure_
| Surface pressure at launch site [Pa].
double | surfaceTemperature_
| Surface temperature at launch site [K].
double | launchAltitude_
| Launch altitude above sea level [m].

## Detailed Description

Models atmospheric and gravitational conditions for the flight simulation.

The Environment class provides atmospheric properties (air density, pressure, temperature) and gravity based on altitude. Future versions may support wind models.

## Constructor & Destructor Documentation

## Environment()

Environment::Environment | ( | double | surfacePressure,
|  | double | surfaceTemperature,
|  | double | launchAltitude )

Constructs a new Environment.

Parameters

  surfacePressure | Surface pressure at launch site (Pascals).
  surfaceTemperature | Surface temperature at launch site (Kelvin).
  launchAltitude | Launch site altitude (meters above sea level).

## ~Environment()

Environment::~Environment | ( |  | ) |

default

Default destructor.

## Member Function Documentation

## getAirDensity()

double Environment::getAirDensity | ( | double | altitude | ) | const

Returns the atmospheric density at a given altitude.

Parameters

  altitude | Altitude above sea level (meters).

Returns
  Air density in kg/m3.

Here is the call graph for this function:

## getGravity()

double Environment::getGravity | ( | double | altitude | ) | const

Returns the gravitational acceleration at a given altitude.

Parameters

  altitude | Altitude above sea level (meters).

Returns
  Gravitational acceleration in m/s2.

## getLaunchAltitude()

double Environment::getLaunchAltitude | ( |  | ) | const

Returns the launch altitude above sea level.

Returns
  Altitude in meters.

## getStandardPressure()

double Environment::getStandardPressure | ( | double | altitude | ) | const

private

Internal method to compute standard atmosphere pressure at altitude.

Parameters

  altitude | Altitude above sea level (meters).

Returns
  Pressure at altitude (Pascals).

Here is the call graph for this function:
Here is the caller graph for this function:

## getStandardTemperature()

double Environment::getStandardTemperature | ( | double | altitude | ) | const

private

Internal method to compute standard atmosphere temperature at altitude.

Parameters

  altitude | Altitude above sea level (meters).

Returns
  Temperature at altitude (Kelvin).

Here is the caller graph for this function:

## getSurfacePressure()

double Environment::getSurfacePressure | ( |  | ) | const

Returns the surface pressure at launch site.

Returns
  Pressure in Pascals.

## getSurfaceTemperature()

double Environment::getSurfaceTemperature | ( |  | ) | const

Returns the surface temperature at launch site.

Returns
  Temperature in Kelvin.

## Member Data Documentation

## launchAltitude_

double Environment::launchAltitude_

private

Launch altitude above sea level [m].

## surfacePressure_

double Environment::surfacePressure_

private

Surface pressure at launch site [Pa].

## surfaceTemperature_

double Environment::surfaceTemperature_

private

Surface temperature at launch site [K].

The documentation for this class was generated from the following files:

- include/Environment.h
- src/Environment.cpp