<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>utils/ on SAFER Documentation</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/</link><description>Recent content in utils/ on SAFER Documentation</description><generator>Hugo</generator><language>en</language><atom:link href="https://safer-capstone.pages.dev/developer-docs/api-reference/utils/index.xml" rel="self" type="application/rss+xml"/><item><title>background.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/background/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/background/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module defines the Android foreground service task that runs the heat risk prediction pipeline continuously while a monitoring session is active. It also provides helpers for requesting the permissions required to keep a foreground service alive on Android 13+.&lt;/p&gt;</description></item><item><title>backgroundIOS.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/backgroundios/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/backgroundios/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module implements the two iOS background execution paths used during monitoring: a BGTaskScheduler-driven periodic fetch (fired every ~15–30 minutes by the OS) and a HealthKit event-driven path (fired each time the Apple Watch pushes a new heart rate sample). Together they provide periodic full prediction runs and more frequent model updates triggered by fresh HR data.&lt;/p&gt;</description></item><item><title>forecastTime.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/forecasttime/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/forecasttime/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module provides a single conversion function that reduces any date-like value to the canonical UTC hour-boundary string used as the time dimension of weather cache keys.&lt;/p&gt;
&lt;p&gt;Its responsibilities include:&lt;/p&gt;</description></item><item><title>global.d.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/global_d/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/global_d/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This declaration file extends the global namespace to make the logging functions installed by &lt;code&gt;logging.ts&lt;/code&gt; available as typed globals throughout the application, without requiring an explicit import in every file.&lt;/p&gt;</description></item><item><title>localDay.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/localday/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/localday/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module provides the canonical local-day key format (&lt;code&gt;YYYY-MM-DD&lt;/code&gt;) used throughout the work area store and other date-keyed persistence layers. All operations use the device&amp;rsquo;s local timezone, not UTC.&lt;/p&gt;</description></item><item><title>logging.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/logging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/logging/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module implements the application&amp;rsquo;s logging infrastructure. It installs &lt;code&gt;global.log&lt;/code&gt; and &lt;code&gt;global.makeLogger&lt;/code&gt;, writes log entries to per-level rotating files on the device filesystem, and — in debug builds — also persists every entry to a SQLite &lt;code&gt;debug_logs&lt;/code&gt; table for in-app inspection via the Debug screen.&lt;/p&gt;</description></item><item><title>ndfdTime.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/ndfdtime/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/ndfdtime/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module computes the inclusive local-time &lt;code&gt;begin&lt;/code&gt;/&lt;code&gt;end&lt;/code&gt; window sent to the NDFD XML API. NDFD requires local (non-UTC) datetime strings, and the window must be aligned to the anchor hour to produce consistent cache-compatible results.&lt;/p&gt;</description></item><item><title>sessionMonitor.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/sessionmonitor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/sessionmonitor/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module manages the user-initiated &amp;ldquo;active monitoring session&amp;rdquo; — the equivalent of a workout mode. On iOS it uses a continuous GPS location watch to keep the app alive in the background, throttled to run the prediction pipeline at most once per minute. On Android it delegates to the &lt;code&gt;react-native-background-actions&lt;/code&gt; foreground service.&lt;/p&gt;</description></item><item><title>tempUtils.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/temputils/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/temputils/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module provides the two temperature utility functions used across all screens to convert and format core temperature values according to the user&amp;rsquo;s unit system preference.&lt;/p&gt;
&lt;p&gt;Its responsibilities include:&lt;/p&gt;</description></item><item><title>watchOS.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/watchos/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/watchos/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module delivers core body temperature predictions to a paired Apple Watch using &lt;code&gt;react-native-watch-connectivity&lt;/code&gt;. It attempts a foreground message first and falls back to background user-info transfer if the watch is not reachable.&lt;/p&gt;</description></item><item><title>WBGT_physics.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/wbgt_physics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/wbgt_physics/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module provides the physical calculations required to derive solar radiation from sky cover and geographic/temporal context, as well as unit conversion helpers used by the NDFD data normalization layer.&lt;/p&gt;</description></item><item><title>wearOS.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/wearos/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/utils/wearos/</guid><description>&lt;h1 id="purpose"&gt;Purpose&lt;/h1&gt;
&lt;p&gt;This module delivers the current core body temperature prediction and the full 24-hour history to a paired WearOS device via &lt;code&gt;react-native-wear-connectivity&lt;/code&gt;. Unlike the WatchOS module, it includes the full history payload so the watch can render a history graph without its own database access.&lt;/p&gt;</description></item></channel></rss>