Loading...
Searching...
No Matches
cmp.c File Reference

## Functions

int | novas_equals_cat_entry (const cat_entry *a, const cat_entry *b)
| Checks if two catalog entries define the same parameters, within the typical tolerances associated to these.
int | novas_equals_frame (const novas_frame *a, const novas_frame *b)
| Checks if two observing frames are essentially the same, within typical tolerances.
int | novas_equals_near_earth (const in_space *a, const in_space *b)
| Checks if two near-Earth locations and motions match within 1 mm and 1 mm/s, respectively.
int | novas_equals_object (const object *a, const object *b)
| Checks if two astronomical targets are the same within typical tolerances.
int | novas_equals_observer (const observer *a, const observer *b)
| Checks if two observers are essentially the same within the tolerances associated to their defining components.
int | novas_equals_on_surface (const on_surface *a, const on_surface *b)
| Checks if two geodetic locations, and the weather parameters defined for them, match.
int | novas_equals_orbital (const novas_orbital *a, const novas_orbital *b)
| Checks if two Keplerian orbitals match, within typical tolerances.
int | novas_equals_orbsys (const novas_orbital_system *a, const novas_orbital_system *b)
| Checks if two orbital systems match within typical tolerances.
int | novas_equals_planet_bundle (const novas_planet_bundle *a, const novas_planet_bundle *b)
| Checks if two bundles containing Solar-system baricentric planet positions and velocities are effectively the same.
int | novas_equals_sky_pos (const sky_pos *a, const sky_pos *b)
| Checks if two apparent positions on the observer's sky are the same within typical tolerances.
int | novas_equals_ssb_posvel (const in_space *a, const in_space *b)
| Checks if two Solar-system locations and motions match within 1 m and ~1 mm/s, respectively.
int | novas_equals_timespec (const novas_timespec *a, const novas_timespec *b)
| Checks if two time specifications are the same within 10-7 days (~100 μs).
int | novas_equals_vector (const double *a, const double *b, double tol)
| Checks if two 3D vectors are effectively the same, within the specified absolute tolerance.

## Detailed Description

Date
  Created on May 8, 2026

Author
  Attila Kovacs

Since
  1.7

Set of functions to check for effective equality between SuperNOVAS data sturctures within typical tolerances.

## Function Documentation

## novas_equals_planet_bundle()

int novas_equals_planet_bundle | ( | const novas_planet_bundle * | a,
|  | const novas_planet_bundle * | b )

Checks if two bundles containing Solar-system baricentric planet positions and velocities are effectively the same.

The two bundles are considered equals if:

- they contain data for the same set of planets.
- the planets with data have positions matching within 1 m.
- the planets with data have velocities matching within 1 mm/s.

NOTES:

- Two NULL (undefined) planet bundles are considered not equal.
- A planet bundle may not equal itself if it contains NAN or infinite components for the planets they are supposed to have data for, since NAN != NAN and INFINITE != INFINITE.

Parameters

  a | a planet position / velocity bundle
  b | another planet position / velocity bundle

Returns
  TRUE (1) if the two bundles are essentially the same within tolerances, or else FALSE (0).

Since
  1.7

Author
  Attila Kovacs

References novas_planet_bundle::mask, NOVAS_AU, novas_equals_vector(), NOVAS_PLANETS, novas_planet_bundle::pos, and novas_planet_bundle::vel.

Referenced by novas_equals_frame().