> For the complete documentation index, see [llms.txt](https://raia-software-inc.gitbook.io/tacview-2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raia-software-inc.gitbook.io/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-latitude.md).

# FormatLatitude()

Formats a latitude for display in Tacview.

Use this function when you specifically need to show latitude by itself.

For a complete geographic position, prefer [FormatCoordinates()](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-coordinates.md). It can follow the coordinate format selected by the user, including formats such as MGRS which represent the whole position together instead of using separate longitude and latitude values.

Internally, latitude values are expressed in radians. Only format them when you need to display them.

## Syntax

```lua
latitudeText = FormatLatitude(value [, style [, format]])
```

## Parameters

### value

Type: `number`

Latitude value, in radians.

### style

Type: `FormattingStyle`

Optional.

Default value: `FormattingStyle.Normal`

Controls how compact or detailed the formatted text should be.

| Style                      | Description                                                         |
| -------------------------- | ------------------------------------------------------------------- |
| `FormattingStyle.Minimal`  | Uses the most compact presentation available.                       |
| `FormattingStyle.Normal`   | Uses the normal presentation for most add-ons.                      |
| `FormattingStyle.Detailed` | Uses a more detailed presentation when extra readability is useful. |

### format

Type: `string`

Optional.

Overrides the numeric format used to display the value.

When omitted, Tacview uses the default numeric format for the selected latitude notation.

The format string follows the same numeric formatting rules as `FormatString()`.

## Return value

Type: `string`

Returns the formatted latitude text.

## Remarks

`FormatLatitude()` is useful when latitude needs to appear on its own, for example in a dedicated latitude field or table column.

For a complete position, prefer `FormatCoordinates()`. Formatting longitude and latitude separately prevents Tacview from using formats such as MGRS which represent the complete position as one value.

Keep latitude values in radians while working with them, then format them only when you need to show them.

Do not use this function for data files that need a fixed format. Use `FormatLatitudeForExport()` instead.

## Example

### Display latitude by itself

```lua
local transform = GetObjectTransform(objectHandle)

if transform ~= nil then
	LogInformation("Latitude: {0}", FormatLatitude(transform.latitude))
end
```

## Requirements

Tacview 2.0.0 or later

## See also

* [FormatCoordinates()](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-coordinates.md)
* [FormatLongitude()](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-longitude.md)
* [FormatLatitudeForExport()](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-latitude-for-export.md)
* [FormatString()](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-string.md)
* [String Format Specifiers](/tacview-2-documentation/api-reference/api-reference/text-and-formatting/format-string-notation.md)
* [GetObjectTransform()](/tacview-2-documentation/api-reference/api-reference/object-data/get-object-transform.md)
